diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index a8915fb4606d9..07867d4a7611d 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -331,6 +331,7 @@ com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.0.0-beta com.azure.resourcemanager:azure-resourcemanager-loadtestservice;1.0.0-beta.1;1.0.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-automanage;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0-beta.1;1.0.0-beta.2 +com.azure.resourcemanager:azure-resourcemanager-appservice-generated;1.0.0-beta.1;1.0.0-beta.1 com.azure.tools:azure-sdk-archetype;1.0.0;1.0.0 # Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current diff --git a/pom.xml b/pom.xml index 9cb3ad482fa80..3989f989eb76b 100644 --- a/pom.xml +++ b/pom.xml @@ -719,6 +719,7 @@ sdk/apimanagement sdk/appconfiguration sdk/applicationinsights + sdk/appservice sdk/attestation sdk/automanage sdk/automation diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/CHANGELOG.md b/sdk/appservice/azure-resourcemanager-appservice-generated/CHANGELOG.md new file mode 100644 index 0000000000000..66f58cb75e5f1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0-beta.1 (2022-01-07) + +- Azure Resource Manager AppService client library for Java. This package contains Microsoft Azure SDK for AppService Management SDK. WebSite Management Client. Package tag package-2021-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/README.md b/sdk/appservice/azure-resourcemanager-appservice-generated/README.md new file mode 100644 index 0000000000000..adacadc3f8f86 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/README.md @@ -0,0 +1,102 @@ +# Azure Resource Manager AppService client library for Java + +Azure Resource Manager AppService client library for Java. + +This package contains Microsoft Azure SDK for AppService Management SDK. WebSite Management Client. Package tag package-2021-03. 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 + +We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better. + +If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together. + +Thank you in advance for your collaboration. We really appreciate your time! + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-appservice-generated;current}) +```xml + + com.azure.resourcemanager + azure-resourcemanager-appservice-generated + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Include the recommended packages + +Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. + +[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. + +### Authentication + +By default, Azure Active Directory token authentication depends on correct configure of following environment variables. + +- `AZURE_CLIENT_ID` for Azure client ID. +- `AZURE_TENANT_ID` for Azure tenant ID. +- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. + +In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. + +With above configuration, `azure` client can be authenticated by following code: + +```java +AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +TokenCredential credential = new DefaultAzureCredentialBuilder() + .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) + .build(); +AppServiceManager manager = AppServiceManager + .authenticate(credential, profile); +``` + +The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. + +See [Authentication][authenticate] for more options. + +## Key concepts + +See [API design][design] for general introduction on design and key concepts on Azure Management Libraries. + +## Examples + +[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/appservice/azure-resourcemanager-appservice-generated/SAMPLE.md) + + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request + + +[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity +[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty +[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md +[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/SAMPLE.md b/sdk/appservice/azure-resourcemanager-appservice-generated/SAMPLE.md new file mode 100644 index 0000000000000..eb35d54f33a1c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/SAMPLE.md @@ -0,0 +1,4807 @@ +# Code snippets and samples + + +## AppServiceEnvironments + +- [GetInboundNetworkDependenciesEndpoints](#appserviceenvironments_getinboundnetworkdependenciesendpoints) +- [GetOutboundNetworkDependenciesEndpoints](#appserviceenvironments_getoutboundnetworkdependenciesendpoints) + +## AppServicePlans + +- [CreateOrUpdate](#appserviceplans_createorupdate) +- [Delete](#appserviceplans_delete) +- [GetByResourceGroup](#appserviceplans_getbyresourcegroup) +- [List](#appserviceplans_list) +- [ListByResourceGroup](#appserviceplans_listbyresourcegroup) +- [Update](#appserviceplans_update) + +## CertificateOrdersDiagnostics + +- [GetAppServiceCertificateOrderDetectorResponse](#certificateordersdiagnostics_getappservicecertificateorderdetectorresponse) +- [ListAppServiceCertificateOrderDetectorResponse](#certificateordersdiagnostics_listappservicecertificateorderdetectorresponse) + +## CertificateRegistrationProvider + +- [ListOperations](#certificateregistrationprovider_listoperations) + +## Certificates + +- [CreateOrUpdate](#certificates_createorupdate) +- [Delete](#certificates_delete) +- [GetByResourceGroup](#certificates_getbyresourcegroup) +- [List](#certificates_list) +- [ListByResourceGroup](#certificates_listbyresourcegroup) +- [Update](#certificates_update) + +## ContainerApps + +- [CreateOrUpdate](#containerapps_createorupdate) +- [Delete](#containerapps_delete) +- [GetByResourceGroup](#containerapps_getbyresourcegroup) +- [List](#containerapps_list) +- [ListByResourceGroup](#containerapps_listbyresourcegroup) +- [ListSecrets](#containerapps_listsecrets) + +## ContainerAppsRevisions + +- [ActivateRevision](#containerappsrevisions_activaterevision) +- [DeactivateRevision](#containerappsrevisions_deactivaterevision) +- [GetRevision](#containerappsrevisions_getrevision) +- [ListRevisions](#containerappsrevisions_listrevisions) +- [RestartRevision](#containerappsrevisions_restartrevision) + +## DeletedWebApps + +- [GetDeletedWebAppByLocation](#deletedwebapps_getdeletedwebappbylocation) +- [ListByLocation](#deletedwebapps_listbylocation) + +## Diagnostics + +- [ExecuteSiteAnalysis](#diagnostics_executesiteanalysis) +- [ExecuteSiteAnalysisSlot](#diagnostics_executesiteanalysisslot) +- [ExecuteSiteDetector](#diagnostics_executesitedetector) +- [ExecuteSiteDetectorSlot](#diagnostics_executesitedetectorslot) +- [GetHostingEnvironmentDetectorResponse](#diagnostics_gethostingenvironmentdetectorresponse) +- [GetSiteAnalysis](#diagnostics_getsiteanalysis) +- [GetSiteAnalysisSlot](#diagnostics_getsiteanalysisslot) +- [GetSiteDetector](#diagnostics_getsitedetector) +- [GetSiteDetectorResponse](#diagnostics_getsitedetectorresponse) +- [GetSiteDetectorResponseSlot](#diagnostics_getsitedetectorresponseslot) +- [GetSiteDetectorSlot](#diagnostics_getsitedetectorslot) +- [GetSiteDiagnosticCategory](#diagnostics_getsitediagnosticcategory) +- [GetSiteDiagnosticCategorySlot](#diagnostics_getsitediagnosticcategoryslot) +- [ListHostingEnvironmentDetectorResponses](#diagnostics_listhostingenvironmentdetectorresponses) +- [ListSiteAnalyses](#diagnostics_listsiteanalyses) +- [ListSiteAnalysesSlot](#diagnostics_listsiteanalysesslot) +- [ListSiteDetectorResponses](#diagnostics_listsitedetectorresponses) +- [ListSiteDetectorResponsesSlot](#diagnostics_listsitedetectorresponsesslot) +- [ListSiteDetectors](#diagnostics_listsitedetectors) +- [ListSiteDetectorsSlot](#diagnostics_listsitedetectorsslot) +- [ListSiteDiagnosticCategories](#diagnostics_listsitediagnosticcategories) +- [ListSiteDiagnosticCategoriesSlot](#diagnostics_listsitediagnosticcategoriesslot) + +## DomainRegistrationProvider + +- [ListOperations](#domainregistrationprovider_listoperations) + +## Domains + +- [Renew](#domains_renew) +- [TransferOut](#domains_transferout) + +## Global + +- [GetDeletedWebApp](#global_getdeletedwebapp) +- [GetDeletedWebAppSnapshots](#global_getdeletedwebappsnapshots) +- [GetSubscriptionOperationWithAsyncResponse](#global_getsubscriptionoperationwithasyncresponse) + +## KubeEnvironments + +- [CreateOrUpdate](#kubeenvironments_createorupdate) +- [Delete](#kubeenvironments_delete) +- [GetByResourceGroup](#kubeenvironments_getbyresourcegroup) +- [List](#kubeenvironments_list) +- [ListByResourceGroup](#kubeenvironments_listbyresourcegroup) +- [Update](#kubeenvironments_update) + +## Provider + +- [GetFunctionAppStacks](#provider_getfunctionappstacks) +- [GetFunctionAppStacksForLocation](#provider_getfunctionappstacksforlocation) +- [GetWebAppStacks](#provider_getwebappstacks) +- [GetWebAppStacksForLocation](#provider_getwebappstacksforlocation) +- [ListOperations](#provider_listoperations) + +## ResourceHealthMetadata + +- [GetBySite](#resourcehealthmetadata_getbysite) +- [GetBySiteSlot](#resourcehealthmetadata_getbysiteslot) +- [List](#resourcehealthmetadata_list) +- [ListByResourceGroup](#resourcehealthmetadata_listbyresourcegroup) +- [ListBySite](#resourcehealthmetadata_listbysite) +- [ListBySiteSlot](#resourcehealthmetadata_listbysiteslot) + +## ResourceProvider + +- [ListCustomHostnameSites](#resourceprovider_listcustomhostnamesites) +- [VerifyHostingEnvironmentVnet](#resourceprovider_verifyhostingenvironmentvnet) + +## StaticSites + +- [ApproveOrRejectPrivateEndpointConnection](#staticsites_approveorrejectprivateendpointconnection) +- [CreateOrUpdateStaticSite](#staticsites_createorupdatestaticsite) +- [CreateOrUpdateStaticSiteAppSettings](#staticsites_createorupdatestaticsiteappsettings) +- [CreateOrUpdateStaticSiteBuildAppSettings](#staticsites_createorupdatestaticsitebuildappsettings) +- [CreateOrUpdateStaticSiteBuildFunctionAppSettings](#staticsites_createorupdatestaticsitebuildfunctionappsettings) +- [CreateOrUpdateStaticSiteCustomDomain](#staticsites_createorupdatestaticsitecustomdomain) +- [CreateOrUpdateStaticSiteFunctionAppSettings](#staticsites_createorupdatestaticsitefunctionappsettings) +- [CreateUserRolesInvitationLink](#staticsites_createuserrolesinvitationlink) +- [CreateZipDeploymentForStaticSite](#staticsites_createzipdeploymentforstaticsite) +- [CreateZipDeploymentForStaticSiteBuild](#staticsites_createzipdeploymentforstaticsitebuild) +- [Delete](#staticsites_delete) +- [DeletePrivateEndpointConnection](#staticsites_deleteprivateendpointconnection) +- [DeleteStaticSiteBuild](#staticsites_deletestaticsitebuild) +- [DeleteStaticSiteCustomDomain](#staticsites_deletestaticsitecustomdomain) +- [DeleteStaticSiteUser](#staticsites_deletestaticsiteuser) +- [DetachStaticSite](#staticsites_detachstaticsite) +- [DetachUserProvidedFunctionAppFromStaticSite](#staticsites_detachuserprovidedfunctionappfromstaticsite) +- [DetachUserProvidedFunctionAppFromStaticSiteBuild](#staticsites_detachuserprovidedfunctionappfromstaticsitebuild) +- [GetByResourceGroup](#staticsites_getbyresourcegroup) +- [GetPrivateEndpointConnection](#staticsites_getprivateendpointconnection) +- [GetPrivateEndpointConnectionList](#staticsites_getprivateendpointconnectionlist) +- [GetPrivateLinkResources](#staticsites_getprivatelinkresources) +- [GetStaticSiteBuild](#staticsites_getstaticsitebuild) +- [GetStaticSiteBuilds](#staticsites_getstaticsitebuilds) +- [GetStaticSiteCustomDomain](#staticsites_getstaticsitecustomdomain) +- [GetUserProvidedFunctionAppForStaticSite](#staticsites_getuserprovidedfunctionappforstaticsite) +- [GetUserProvidedFunctionAppForStaticSiteBuild](#staticsites_getuserprovidedfunctionappforstaticsitebuild) +- [GetUserProvidedFunctionAppsForStaticSite](#staticsites_getuserprovidedfunctionappsforstaticsite) +- [GetUserProvidedFunctionAppsForStaticSiteBuild](#staticsites_getuserprovidedfunctionappsforstaticsitebuild) +- [List](#staticsites_list) +- [ListByResourceGroup](#staticsites_listbyresourcegroup) +- [ListStaticSiteAppSettings](#staticsites_liststaticsiteappsettings) +- [ListStaticSiteBuildAppSettings](#staticsites_liststaticsitebuildappsettings) +- [ListStaticSiteBuildFunctionAppSettings](#staticsites_liststaticsitebuildfunctionappsettings) +- [ListStaticSiteBuildFunctions](#staticsites_liststaticsitebuildfunctions) +- [ListStaticSiteConfiguredRoles](#staticsites_liststaticsiteconfiguredroles) +- [ListStaticSiteCustomDomains](#staticsites_liststaticsitecustomdomains) +- [ListStaticSiteFunctionAppSettings](#staticsites_liststaticsitefunctionappsettings) +- [ListStaticSiteFunctions](#staticsites_liststaticsitefunctions) +- [ListStaticSiteSecrets](#staticsites_liststaticsitesecrets) +- [ListStaticSiteUsers](#staticsites_liststaticsiteusers) +- [PreviewWorkflow](#staticsites_previewworkflow) +- [RegisterUserProvidedFunctionAppWithStaticSite](#staticsites_registeruserprovidedfunctionappwithstaticsite) +- [RegisterUserProvidedFunctionAppWithStaticSiteBuild](#staticsites_registeruserprovidedfunctionappwithstaticsitebuild) +- [ResetStaticSiteApiKey](#staticsites_resetstaticsiteapikey) +- [UpdateStaticSite](#staticsites_updatestaticsite) +- [UpdateStaticSiteUser](#staticsites_updatestaticsiteuser) +- [ValidateCustomDomainCanBeAddedToStaticSite](#staticsites_validatecustomdomaincanbeaddedtostaticsite) + +## TopLevelDomains + +- [Get](#topleveldomains_get) +- [List](#topleveldomains_list) +- [ListAgreements](#topleveldomains_listagreements) + +## WebApps + +- [ApproveOrRejectPrivateEndpointConnection](#webapps_approveorrejectprivateendpointconnection) +- [ApproveOrRejectPrivateEndpointConnectionSlot](#webapps_approveorrejectprivateendpointconnectionslot) +- [DeletePrivateEndpointConnection](#webapps_deleteprivateendpointconnection) +- [DeletePrivateEndpointConnectionSlot](#webapps_deleteprivateendpointconnectionslot) +- [GetAppSettingKeyVaultReference](#webapps_getappsettingkeyvaultreference) +- [GetAppSettingKeyVaultReferenceSlot](#webapps_getappsettingkeyvaultreferenceslot) +- [GetAppSettingsKeyVaultReferences](#webapps_getappsettingskeyvaultreferences) +- [GetAppSettingsKeyVaultReferencesSlot](#webapps_getappsettingskeyvaultreferencesslot) +- [GetFtpAllowed](#webapps_getftpallowed) +- [GetFtpAllowedSlot](#webapps_getftpallowedslot) +- [GetInstanceInfo](#webapps_getinstanceinfo) +- [GetInstanceInfoSlot](#webapps_getinstanceinfoslot) +- [GetNetworkTraceOperation](#webapps_getnetworktraceoperation) +- [GetNetworkTraceOperationSlot](#webapps_getnetworktraceoperationslot) +- [GetNetworkTraceOperationSlotV2](#webapps_getnetworktraceoperationslotv2) +- [GetNetworkTraceOperationV2](#webapps_getnetworktraceoperationv2) +- [GetNetworkTraces](#webapps_getnetworktraces) +- [GetNetworkTracesSlot](#webapps_getnetworktracesslot) +- [GetNetworkTracesSlotV2](#webapps_getnetworktracesslotv2) +- [GetNetworkTracesV2](#webapps_getnetworktracesv2) +- [GetPrivateEndpointConnection](#webapps_getprivateendpointconnection) +- [GetPrivateEndpointConnectionSlot](#webapps_getprivateendpointconnectionslot) +- [GetPrivateLinkResources](#webapps_getprivatelinkresources) +- [GetPrivateLinkResourcesSlot](#webapps_getprivatelinkresourcesslot) +- [GetScmAllowed](#webapps_getscmallowed) +- [GetScmAllowedSlot](#webapps_getscmallowedslot) +- [ListBasicPublishingCredentialsPolicies](#webapps_listbasicpublishingcredentialspolicies) +- [ListBasicPublishingCredentialsPoliciesSlot](#webapps_listbasicpublishingcredentialspoliciesslot) +- [ListSiteBackups](#webapps_listsitebackups) +- [ListSiteBackupsSlot](#webapps_listsitebackupsslot) +- [StartNetworkTrace](#webapps_startnetworktrace) +- [StartNetworkTraceSlot](#webapps_startnetworktraceslot) +- [StartWebSiteNetworkTraceOperation](#webapps_startwebsitenetworktraceoperation) +- [StartWebSiteNetworkTraceOperationSlot](#webapps_startwebsitenetworktraceoperationslot) +- [StopNetworkTrace](#webapps_stopnetworktrace) +- [StopNetworkTraceSlot](#webapps_stopnetworktraceslot) +- [StopWebSiteNetworkTrace](#webapps_stopwebsitenetworktrace) +- [StopWebSiteNetworkTraceSlot](#webapps_stopwebsitenetworktraceslot) +- [UpdateFtpAllowed](#webapps_updateftpallowed) +- [UpdateFtpAllowedSlot](#webapps_updateftpallowedslot) +- [UpdateScmAllowed](#webapps_updatescmallowed) +- [UpdateScmAllowedSlot](#webapps_updatescmallowedslot) +### AppServiceEnvironments_GetInboundNetworkDependenciesEndpoints + +```java +import com.azure.core.util.Context; + +/** Samples for AppServiceEnvironments GetInboundNetworkDependenciesEndpoints. */ +public final class AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetInboundNetworkDependenciesEndpoints.json + */ + /** + * Sample code: Get Inbound Network Dependencies Endpoints. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getInboundNetworkDependenciesEndpoints( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .appServiceEnvironments() + .getInboundNetworkDependenciesEndpoints("Sample-WestUSResourceGroup", "SampleAse", Context.NONE); + } +} +``` + +### AppServiceEnvironments_GetOutboundNetworkDependenciesEndpoints + +```java +import com.azure.core.util.Context; + +/** Samples for AppServiceEnvironments GetOutboundNetworkDependenciesEndpoints. */ +public final class AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetOutboundNetworkDependenciesEndpoints.json + */ + /** + * Sample code: Get Outbound Network Dependencies Endpoints. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getOutboundNetworkDependenciesEndpoints( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .appServiceEnvironments() + .getOutboundNetworkDependenciesEndpoints("Sample-WestUSResourceGroup", "SampleAse", Context.NONE); + } +} +``` + +### AppServicePlans_CreateOrUpdate + +```java +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; + +/** Samples for AppServicePlans CreateOrUpdate. */ +public final class AppServicePlansCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateAppServicePlan.json + */ + /** + * Sample code: Create Or Update App Service plan. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateAppServicePlan( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .appServicePlans() + .define("testsf6141") + .withRegion("East US") + .withExistingResourceGroup("testrg123") + .withSku( + new SkuDescription().withName("P1").withTier("Premium").withSize("P1").withFamily("P").withCapacity(1)) + .withKind("app") + .create(); + } +} +``` + +### AppServicePlans_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for AppServicePlans Delete. */ +public final class AppServicePlansDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteAppServicePlan.json + */ + /** + * Sample code: Delete App Service plan. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAppServicePlan(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.appServicePlans().deleteWithResponse("testrg123", "testsf6141", Context.NONE); + } +} +``` + +### AppServicePlans_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for AppServicePlans GetByResourceGroup. */ +public final class AppServicePlansGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetAppServicePlan.json + */ + /** + * Sample code: Get App Service plan. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppServicePlan(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.appServicePlans().getByResourceGroupWithResponse("testrg123", "testsf6141", Context.NONE); + } +} +``` + +### AppServicePlans_List + +```java +import com.azure.core.util.Context; + +/** Samples for AppServicePlans List. */ +public final class AppServicePlansListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListAppServicePlans.json + */ + /** + * Sample code: List App Service plans. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppServicePlans(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.appServicePlans().list(null, Context.NONE); + } +} +``` + +### AppServicePlans_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for AppServicePlans ListByResourceGroup. */ +public final class AppServicePlansListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListAppServicePlansByResourceGroup.json + */ + /** + * Sample code: List App Service plans by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppServicePlansByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.appServicePlans().listByResourceGroup("testrg123", Context.NONE); + } +} +``` + +### AppServicePlans_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlan; + +/** Samples for AppServicePlans Update. */ +public final class AppServicePlansUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/PatchAppServicePlan.json + */ + /** + * Sample code: Patch Service plan. + * + * @param manager Entry point to AppServiceManager. + */ + public static void patchServicePlan(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + AppServicePlan resource = + manager + .appServicePlans() + .getByResourceGroupWithResponse("testrg123", "testsf6141", Context.NONE) + .getValue(); + resource.update().withKind("app").apply(); + } +} +``` + +### CertificateOrdersDiagnostics_GetAppServiceCertificateOrderDetectorResponse + +```java +import com.azure.core.util.Context; + +/** Samples for CertificateOrdersDiagnostics GetAppServiceCertificateOrderDetectorResponse. */ +public final class CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + */ + /** + * Sample code: Get app service certificate order detector response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppServiceCertificateOrderDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .certificateOrdersDiagnostics() + .getAppServiceCertificateOrderDetectorResponseWithResponse( + "Sample-WestUSResourceGroup", + "SampleCertificateOrderName", + "AutoRenewStatus", + null, + null, + null, + Context.NONE); + } +} +``` + +### CertificateOrdersDiagnostics_ListAppServiceCertificateOrderDetectorResponse + +```java +import com.azure.core.util.Context; + +/** Samples for CertificateOrdersDiagnostics ListAppServiceCertificateOrderDetectorResponse. */ +public final class CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json + */ + /** + * Sample code: List app service certificate detector response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppServiceCertificateDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .certificateOrdersDiagnostics() + .listAppServiceCertificateOrderDetectorResponse( + "Sample-WestUSResourceGroup", "SampleCertificateOrderName", Context.NONE); + } +} +``` + +### CertificateRegistrationProvider_ListOperations + +```java +import com.azure.core.util.Context; + +/** Samples for CertificateRegistrationProvider ListOperations. */ +public final class CertificateRegistrationProviderListOperationsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-01/examples/ListOperations.json + */ + /** + * Sample code: List operations. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listOperations(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificateRegistrationProviders().listOperations(Context.NONE); + } +} +``` + +### Certificates_CreateOrUpdate + +```java +import java.util.Arrays; + +/** Samples for Certificates CreateOrUpdate. */ +public final class CertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateCertificate.json + */ + /** + * Sample code: Create Or Update Certificate. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateCertificate( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .certificates() + .define("testc6282") + .withRegion("East US") + .withExistingResourceGroup("testrg123") + .withPassword("") + .withHostNames(Arrays.asList("ServerCert")) + .create(); + } +} +``` + +### Certificates_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates Delete. */ +public final class CertificatesDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteCertificate.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificates().deleteWithResponse("testrg123", "testc6282", Context.NONE); + } +} +``` + +### Certificates_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates GetByResourceGroup. */ +public final class CertificatesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetCertificate.json + */ + /** + * Sample code: Get Certificate. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getCertificate(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificates().getByResourceGroupWithResponse("testrg123", "testc6282", Context.NONE); + } +} +``` + +### Certificates_List + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates List. */ +public final class CertificatesListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListCertificates.json + */ + /** + * Sample code: List Certificates for subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listCertificatesForSubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificates().list(null, Context.NONE); + } +} +``` + +### Certificates_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates ListByResourceGroup. */ +public final class CertificatesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListCertificatesByResourceGroup.json + */ + /** + * Sample code: List Certificates by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listCertificatesByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificates().listByResourceGroup("testrg123", Context.NONE); + } +} +``` + +### Certificates_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.Certificate; + +/** Samples for Certificates Update. */ +public final class CertificatesUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/PatchCertificate.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to AppServiceManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + Certificate resource = + manager.certificates().getByResourceGroupWithResponse("testrg123", "testc6282", Context.NONE).getValue(); + resource.update().apply(); + } +} +``` + +### ContainerApps_CreateOrUpdate + +```java +import com.azure.resourcemanager.appservice.generated.models.Configuration; +import com.azure.resourcemanager.appservice.generated.models.Container; +import com.azure.resourcemanager.appservice.generated.models.CustomScaleRule; +import com.azure.resourcemanager.appservice.generated.models.Dapr; +import com.azure.resourcemanager.appservice.generated.models.Ingress; +import com.azure.resourcemanager.appservice.generated.models.Scale; +import com.azure.resourcemanager.appservice.generated.models.ScaleRule; +import com.azure.resourcemanager.appservice.generated.models.Template; +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/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateContainerApp.json + */ + /** + * Sample code: Create or Update Container App. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateContainerApp( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withKind("containerApp") + .withKubeEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube") + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000))) + .withTemplate( + new Template() + .withContainers( + Arrays + .asList( + new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0"))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("httpscalingrule") + .withCustom( + new CustomScaleRule() + .withType("http") + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withDapr(new Dapr().withEnabled(true).withAppPort(3000))) + .create(); + } + + @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; + } +} +``` + +### ContainerApps_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerApps Delete. */ +public final class ContainerAppsDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteContainerApp.json + */ + /** + * Sample code: Delete Container App. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteContainerApp(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().delete("rg", "testWorkerApp0", Context.NONE); + } +} +``` + +### ContainerApps_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerApps GetByResourceGroup. */ +public final class ContainerAppsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetContainerApp.json + */ + /** + * Sample code: Get Container App. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getContainerApp(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", Context.NONE); + } +} +``` + +### ContainerApps_List + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerApps List. */ +public final class ContainerAppsListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppsBySubscription.json + */ + /** + * Sample code: List Container Apps by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listContainerAppsByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().list(Context.NONE); + } +} +``` + +### ContainerApps_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerApps ListByResourceGroup. */ +public final class ContainerAppsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppsByResourceGroup.json + */ + /** + * Sample code: List Container Apps by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listContainerAppsByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().listByResourceGroup("rg", Context.NONE); + } +} +``` + +### ContainerApps_ListSecrets + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerApps ListSecrets. */ +public final class ContainerAppsListSecretsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppSecrets.json + */ + /** + * Sample code: List Container Apps Secrets. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listContainerAppsSecrets( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().listSecretsWithResponse("testcontainerApp0", Context.NONE); + } +} +``` + +### ContainerAppsRevisions_ActivateRevision + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions ActivateRevision. */ +public final class ContainerAppsRevisionsActivateRevisionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ActivateRevision.json + */ + /** + * Sample code: Activate Container App's revision. + * + * @param manager Entry point to AppServiceManager. + */ + public static void activateContainerAppSRevision( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerAppsRevisions() + .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} +``` + +### ContainerAppsRevisions_DeactivateRevision + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions DeactivateRevision. */ +public final class ContainerAppsRevisionsDeactivateRevisionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeactivateRevision.json + */ + /** + * Sample code: Deactivate Container App's revision. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deactivateContainerAppSRevision( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerAppsRevisions() + .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} +``` + +### ContainerAppsRevisions_GetRevision + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions GetRevision. */ +public final class ContainerAppsRevisionsGetRevisionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetRevision.json + */ + /** + * Sample code: Get Container App's revision. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getContainerAppSRevision( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerAppsRevisions() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} +``` + +### ContainerAppsRevisions_ListRevisions + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions ListRevisions. */ +public final class ContainerAppsRevisionsListRevisionsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListRevisions.json + */ + /** + * Sample code: List Container App's revisions. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listContainerAppSRevisions( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", Context.NONE); + } +} +``` + +### ContainerAppsRevisions_RestartRevision + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions RestartRevision. */ +public final class ContainerAppsRevisionsRestartRevisionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/RestartRevision.json + */ + /** + * Sample code: Restart Container App's revision. + * + * @param manager Entry point to AppServiceManager. + */ + public static void restartContainerAppSRevision( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerAppsRevisions() + .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} +``` + +### DeletedWebApps_GetDeletedWebAppByLocation + +```java +import com.azure.core.util.Context; + +/** Samples for DeletedWebApps GetDeletedWebAppByLocation. */ +public final class DeletedWebAppsGetDeletedWebAppByLocationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetDeletedWebAppByLocation.json + */ + /** + * Sample code: Get Deleted Web App by Location. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDeletedWebAppByLocation( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.deletedWebApps().getDeletedWebAppByLocationWithResponse("West US 2", "9", Context.NONE); + } +} +``` + +### DeletedWebApps_ListByLocation + +```java +import com.azure.core.util.Context; + +/** Samples for DeletedWebApps ListByLocation. */ +public final class DeletedWebAppsListByLocationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListDeletedWebAppsByLocation.json + */ + /** + * Sample code: List Deleted Web App by Location. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listDeletedWebAppByLocation( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.deletedWebApps().listByLocation("West US 2", Context.NONE); + } +} +``` + +### Diagnostics_ExecuteSiteAnalysis + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ExecuteSiteAnalysis. */ +public final class DiagnosticsExecuteSiteAnalysisSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysis.json + */ + /** + * Sample code: Execute site analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteAnalysisWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "availability", + "apprestartanalyses", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json + */ + /** + * Sample code: Execute site slot analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteSlotAnalysis( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteAnalysisWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "availability", + "apprestartanalyses", + null, + null, + null, + Context.NONE); + } +} +``` + +### Diagnostics_ExecuteSiteAnalysisSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ExecuteSiteAnalysisSlot. */ +public final class DiagnosticsExecuteSiteAnalysisSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysis.json + */ + /** + * Sample code: Execute site analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteAnalysisSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "availability", + "apprestartanalyses", + "Production", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json + */ + /** + * Sample code: Execute site slot analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteSlotAnalysis( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteAnalysisSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "availability", + "apprestartanalyses", + "staging", + null, + null, + null, + Context.NONE); + } +} +``` + +### Diagnostics_ExecuteSiteDetector + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ExecuteSiteDetector. */ +public final class DiagnosticsExecuteSiteDetectorSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetector.json + */ + /** + * Sample code: Execute site detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteDetectorWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "sitecrashes", + "availability", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json + */ + /** + * Sample code: Execute site slot detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteSlotDetector( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteDetectorWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "sitecrashes", + "availability", + null, + null, + null, + Context.NONE); + } +} +``` + +### Diagnostics_ExecuteSiteDetectorSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ExecuteSiteDetectorSlot. */ +public final class DiagnosticsExecuteSiteDetectorSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetector.json + */ + /** + * Sample code: Execute site detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteDetectorSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "sitecrashes", + "availability", + "Production", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json + */ + /** + * Sample code: Execute site slot detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteSlotDetector( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteDetectorSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "sitecrashes", + "availability", + "staging", + null, + null, + null, + Context.NONE); + } +} +``` + +### Diagnostics_GetHostingEnvironmentDetectorResponse + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetHostingEnvironmentDetectorResponse. */ +public final class DiagnosticsGetHostingEnvironmentDetectorResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + */ + /** + * Sample code: Get App Service Environment Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppServiceEnvironmentDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getHostingEnvironmentDetectorResponseWithResponse( + "Sample-WestUSResourceGroup", + "SampleAppServiceEnvironment", + "runtimeavailability", + null, + null, + null, + Context.NONE); + } +} +``` + +### Diagnostics_GetSiteAnalysis + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteAnalysis. */ +public final class DiagnosticsGetSiteAnalysisSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysisSlot.json + */ + /** + * Sample code: Get App Slot Analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteAnalysisWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysis.json + */ + /** + * Sample code: Get App Analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteAnalysisWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", Context.NONE); + } +} +``` + +### Diagnostics_GetSiteAnalysisSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteAnalysisSlot. */ +public final class DiagnosticsGetSiteAnalysisSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysisSlot.json + */ + /** + * Sample code: Get App Slot Analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteAnalysisSlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", "staging", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysis.json + */ + /** + * Sample code: Get App Analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteAnalysisSlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", "Production", Context.NONE); + } +} +``` + +### Diagnostics_GetSiteDetector + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDetector. */ +public final class DiagnosticsGetSiteDetectorSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetector.json + */ + /** + * Sample code: Get App Detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorSlot.json + */ + /** + * Sample code: Get App Slot Detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", Context.NONE); + } +} +``` + +### Diagnostics_GetSiteDetectorResponse + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDetectorResponse. */ +public final class DiagnosticsGetSiteDetectorResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + */ + /** + * Sample code: Get App Slot Detector Response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorResponseWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "runtimeavailability", null, null, null, Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponse.json + */ + /** + * Sample code: Get App Detector Response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorResponseWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "runtimeavailability", null, null, null, Context.NONE); + } +} +``` + +### Diagnostics_GetSiteDetectorResponseSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDetectorResponseSlot. */ +public final class DiagnosticsGetSiteDetectorResponseSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + */ + /** + * Sample code: Get App Slot Detector Response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorResponseSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "runtimeavailability", + "staging", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponse.json + */ + /** + * Sample code: Get App Detector Response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorResponseSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "runtimeavailability", + "staging", + null, + null, + null, + Context.NONE); + } +} +``` + +### Diagnostics_GetSiteDetectorSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDetectorSlot. */ +public final class DiagnosticsGetSiteDetectorSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetector.json + */ + /** + * Sample code: Get App Detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorSlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", "Production", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorSlot.json + */ + /** + * Sample code: Get App Slot Detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorSlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", "staging", Context.NONE); + } +} +``` + +### Diagnostics_GetSiteDiagnosticCategory + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDiagnosticCategory. */ +public final class DiagnosticsGetSiteDiagnosticCategorySamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + */ + /** + * Sample code: Get App Diagnostic Category. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDiagnosticCategory( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDiagnosticCategoryWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + */ + /** + * Sample code: Get App Slot Diagnostic Category. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDiagnosticCategory( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDiagnosticCategoryWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } +} +``` + +### Diagnostics_GetSiteDiagnosticCategorySlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDiagnosticCategorySlot. */ +public final class DiagnosticsGetSiteDiagnosticCategorySlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + */ + /** + * Sample code: Get App Diagnostic Category. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDiagnosticCategory( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDiagnosticCategorySlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "Production", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + */ + /** + * Sample code: Get App Slot Diagnostic Category. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDiagnosticCategory( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDiagnosticCategorySlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "staging", Context.NONE); + } +} +``` + +### Diagnostics_ListHostingEnvironmentDetectorResponses + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListHostingEnvironmentDetectorResponses. */ +public final class DiagnosticsListHostingEnvironmentDetectorResponsesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json + */ + /** + * Sample code: Get App Service Environment Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppServiceEnvironmentDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listHostingEnvironmentDetectorResponses( + "Sample-WestUSResourceGroup", "SampleAppServiceEnvironment", Context.NONE); + } +} +``` + +### Diagnostics_ListSiteAnalyses + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteAnalyses. */ +public final class DiagnosticsListSiteAnalysesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalyses.json + */ + /** + * Sample code: List App Analyses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppAnalyses(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteAnalyses("Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalysesSlot.json + */ + /** + * Sample code: List App Slot Analyses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotAnalyses(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteAnalyses("Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } +} +``` + +### Diagnostics_ListSiteAnalysesSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteAnalysesSlot. */ +public final class DiagnosticsListSiteAnalysesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalyses.json + */ + /** + * Sample code: List App Analyses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppAnalyses(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteAnalysesSlot( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "Production", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalysesSlot.json + */ + /** + * Sample code: List App Slot Analyses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotAnalyses(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteAnalysesSlot("Sample-WestUSResourceGroup", "SampleApp", "availability", "staging", Context.NONE); + } +} +``` + +### Diagnostics_ListSiteDetectorResponses + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDetectorResponses. */ +public final class DiagnosticsListSiteDetectorResponsesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json + */ + /** + * Sample code: Get App Slot Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteDetectorResponses("Sample-WestUSResourceGroup", "SampleApp", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponses.json + */ + /** + * Sample code: Get App Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteDetectorResponses("Sample-WestUSResourceGroup", "SampleApp", Context.NONE); + } +} +``` + +### Diagnostics_ListSiteDetectorResponsesSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDetectorResponsesSlot. */ +public final class DiagnosticsListSiteDetectorResponsesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json + */ + /** + * Sample code: Get App Slot Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectorResponsesSlot("Sample-WestUSResourceGroup", "SampleApp", "staging", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponses.json + */ + /** + * Sample code: Get App Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectorResponsesSlot("Sample-WestUSResourceGroup", "SampleApp", "staging", Context.NONE); + } +} +``` + +### Diagnostics_ListSiteDetectors + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDetectors. */ +public final class DiagnosticsListSiteDetectorsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectors.json + */ + /** + * Sample code: List App Detectors. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppDetectors(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectors("Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorsSlot.json + */ + /** + * Sample code: List App Slot Detectors. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotDetectors(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectors("Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } +} +``` + +### Diagnostics_ListSiteDetectorsSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDetectorsSlot. */ +public final class DiagnosticsListSiteDetectorsSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectors.json + */ + /** + * Sample code: List App Detectors. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppDetectors(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectorsSlot( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "Production", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorsSlot.json + */ + /** + * Sample code: List App Slot Detectors. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotDetectors(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectorsSlot("Sample-WestUSResourceGroup", "SampleApp", "availability", "staging", Context.NONE); + } +} +``` + +### Diagnostics_ListSiteDiagnosticCategories + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDiagnosticCategories. */ +public final class DiagnosticsListSiteDiagnosticCategoriesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json + */ + /** + * Sample code: List App Slot Diagnostic Categories. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotDiagnosticCategories( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteDiagnosticCategories("Sample-WestUSResourceGroup", "SampleApp", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategories.json + */ + /** + * Sample code: List App Diagnostic Categories. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppDiagnosticCategories( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteDiagnosticCategories("Sample-WestUSResourceGroup", "SampleApp", Context.NONE); + } +} +``` + +### Diagnostics_ListSiteDiagnosticCategoriesSlot + +```java +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDiagnosticCategoriesSlot. */ +public final class DiagnosticsListSiteDiagnosticCategoriesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json + */ + /** + * Sample code: List App Slot Diagnostic Categories. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotDiagnosticCategories( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDiagnosticCategoriesSlot("Sample-WestUSResourceGroup", "SampleApp", "staging", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategories.json + */ + /** + * Sample code: List App Diagnostic Categories. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppDiagnosticCategories( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDiagnosticCategoriesSlot("Sample-WestUSResourceGroup", "SampleApp", "Production", Context.NONE); + } +} +``` + +### DomainRegistrationProvider_ListOperations + +```java +import com.azure.core.util.Context; + +/** Samples for DomainRegistrationProvider ListOperations. */ +public final class DomainRegistrationProviderListOperationsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/ListOperations.json + */ + /** + * Sample code: List operations. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listOperations(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.domainRegistrationProviders().listOperations(Context.NONE); + } +} +``` + +### Domains_Renew + +```java +import com.azure.core.util.Context; + +/** Samples for Domains Renew. */ +public final class DomainsRenewSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/RenewDomain.json + */ + /** + * Sample code: Renew an existing domain. + * + * @param manager Entry point to AppServiceManager. + */ + public static void renewAnExistingDomain(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.domains().renewWithResponse("RG", "example.com", Context.NONE); + } +} +``` + +### Domains_TransferOut + +```java +import com.azure.core.util.Context; + +/** Samples for Domains TransferOut. */ +public final class DomainsTransferOutSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/TransferOutDomain.json + */ + /** + * Sample code: Transfer out domain. + * + * @param manager Entry point to AppServiceManager. + */ + public static void transferOutDomain(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.domains().transferOutWithResponse("testrg123", "example.com", Context.NONE); + } +} +``` + +### Global_GetDeletedWebApp + +```java +import com.azure.core.util.Context; + +/** Samples for Global GetDeletedWebApp. */ +public final class GlobalGetDeletedWebAppSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetDeletedWebApp.json + */ + /** + * Sample code: Get Deleted Web App. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDeletedWebApp(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.globals().getDeletedWebAppWithResponse("9", Context.NONE); + } +} +``` + +### Global_GetDeletedWebAppSnapshots + +```java +import com.azure.core.util.Context; + +/** Samples for Global GetDeletedWebAppSnapshots. */ +public final class GlobalGetDeletedWebAppSnapshotsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetDeletedWebAppSnapshots.json + */ + /** + * Sample code: Get Deleted Web App Snapshots. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDeletedWebAppSnapshots( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.globals().getDeletedWebAppSnapshotsWithResponse("9", Context.NONE); + } +} +``` + +### Global_GetSubscriptionOperationWithAsyncResponse + +```java +import com.azure.core.util.Context; + +/** Samples for Global GetSubscriptionOperationWithAsyncResponse. */ +public final class GlobalGetSubscriptionOperationWithAsyncResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSubscriptionOperationWithAsyncResponse.json + */ + /** + * Sample code: Gets an operation in a subscription and given region. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getsAnOperationInASubscriptionAndGivenRegion( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .globals() + .getSubscriptionOperationWithAsyncResponseWithResponse( + "West US", "34adfa4f-cedf-4dc0-ba29-b6d1a69ab5d5", Context.NONE); + } +} +``` + +### KubeEnvironments_CreateOrUpdate + +```java +/** Samples for KubeEnvironments CreateOrUpdate. */ +public final class KubeEnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_CreateOrUpdate.json + */ + /** + * Sample code: Create kube environments. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createKubeEnvironments( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .kubeEnvironments() + .define("testkubeenv") + .withRegion("East US") + .withExistingResourceGroup("examplerg") + .withStaticIp("1.2.3.4") + .create(); + } +} +``` + +### KubeEnvironments_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for KubeEnvironments Delete. */ +public final class KubeEnvironmentsDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_Delete.json + */ + /** + * Sample code: Delete kube environment by name. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteKubeEnvironmentByName( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.kubeEnvironments().delete("examplerg", "examplekenv", Context.NONE); + } +} +``` + +### KubeEnvironments_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for KubeEnvironments GetByResourceGroup. */ +public final class KubeEnvironmentsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_Get.json + */ + /** + * Sample code: Get kube environments by name. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getKubeEnvironmentsByName( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.kubeEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", Context.NONE); + } +} +``` + +### KubeEnvironments_List + +```java +import com.azure.core.util.Context; + +/** Samples for KubeEnvironments List. */ +public final class KubeEnvironmentsListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_ListBySubscription.json + */ + /** + * Sample code: List kube environments by subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listKubeEnvironmentsBySubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.kubeEnvironments().list(Context.NONE); + } +} +``` + +### KubeEnvironments_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for KubeEnvironments ListByResourceGroup. */ +public final class KubeEnvironmentsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_ListByResourceGroup.json + */ + /** + * Sample code: List kube environments by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listKubeEnvironmentsByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.kubeEnvironments().listByResourceGroup("examplerg", Context.NONE); + } +} +``` + +### KubeEnvironments_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironment; + +/** Samples for KubeEnvironments Update. */ +public final class KubeEnvironmentsUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_Update.json + */ + /** + * Sample code: Update kube environments. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateKubeEnvironments( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + KubeEnvironment resource = + manager + .kubeEnvironments() + .getByResourceGroupWithResponse("examplerg", "testkubeenv", Context.NONE) + .getValue(); + resource.update().apply(); + } +} +``` + +### Provider_GetFunctionAppStacks + +```java +import com.azure.core.util.Context; + +/** Samples for Provider GetFunctionAppStacks. */ +public final class ProviderGetFunctionAppStacksSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetFunctionAppStacks.json + */ + /** + * Sample code: Get Function App Stacks. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFunctionAppStacks(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().getFunctionAppStacks(null, Context.NONE); + } +} +``` + +### Provider_GetFunctionAppStacksForLocation + +```java +import com.azure.core.util.Context; + +/** Samples for Provider GetFunctionAppStacksForLocation. */ +public final class ProviderGetFunctionAppStacksForLocationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetFunctionAppStacksForLocation.json + */ + /** + * Sample code: Get Locations Function App Stacks. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getLocationsFunctionAppStacks( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().getFunctionAppStacksForLocation("westus", null, Context.NONE); + } +} +``` + +### Provider_GetWebAppStacks + +```java +import com.azure.core.util.Context; + +/** Samples for Provider GetWebAppStacks. */ +public final class ProviderGetWebAppStacksSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebAppStacks.json + */ + /** + * Sample code: Get Web App Stacks. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getWebAppStacks(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().getWebAppStacks(null, Context.NONE); + } +} +``` + +### Provider_GetWebAppStacksForLocation + +```java +import com.azure.core.util.Context; + +/** Samples for Provider GetWebAppStacksForLocation. */ +public final class ProviderGetWebAppStacksForLocationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebAppStacksForLocation.json + */ + /** + * Sample code: Get Locations Web App Stacks. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getLocationsWebAppStacks( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().getWebAppStacksForLocation("westus", null, Context.NONE); + } +} +``` + +### Provider_ListOperations + +```java +import com.azure.core.util.Context; + +/** Samples for Provider ListOperations. */ +public final class ProviderListOperationsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListOperations.json + */ + /** + * Sample code: List operations. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listOperations(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().listOperations(Context.NONE); + } +} +``` + +### ResourceHealthMetadata_GetBySite + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata GetBySite. */ +public final class ResourceHealthMetadataGetBySiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetResourceHealthMetadataBySite.json + */ + /** + * Sample code: Get ResourceHealthMetadata. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getResourceHealthMetadata( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceHealthMetadatas() + .getBySiteWithResponse("Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", Context.NONE); + } +} +``` + +### ResourceHealthMetadata_GetBySiteSlot + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata GetBySiteSlot. */ +public final class ResourceHealthMetadataGetBySiteSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetResourceHealthMetadataBySite.json + */ + /** + * Sample code: Get ResourceHealthMetadata. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getResourceHealthMetadata( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceHealthMetadatas() + .getBySiteSlotWithResponse( + "Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", "Production", Context.NONE); + } +} +``` + +### ResourceHealthMetadata_List + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata List. */ +public final class ResourceHealthMetadataListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataBySubscription.json + */ + /** + * Sample code: List ResourceHealthMetadata for a subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listResourceHealthMetadataForASubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.resourceHealthMetadatas().list(Context.NONE); + } +} +``` + +### ResourceHealthMetadata_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata ListByResourceGroup. */ +public final class ResourceHealthMetadataListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataByResourceGroup.json + */ + /** + * Sample code: List ResourceHealthMetadata for a resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listResourceHealthMetadataForAResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.resourceHealthMetadatas().listByResourceGroup("Default-Web-NorthCentralUS", Context.NONE); + } +} +``` + +### ResourceHealthMetadata_ListBySite + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata ListBySite. */ +public final class ResourceHealthMetadataListBySiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataBySite.json + */ + /** + * Sample code: List ResourceHealthMetadata for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listResourceHealthMetadataForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceHealthMetadatas() + .listBySite("Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", Context.NONE); + } +} +``` + +### ResourceHealthMetadata_ListBySiteSlot + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata ListBySiteSlot. */ +public final class ResourceHealthMetadataListBySiteSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataBySite.json + */ + /** + * Sample code: List ResourceHealthMetadata for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listResourceHealthMetadataForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceHealthMetadatas() + .listBySiteSlot("Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", "Production", Context.NONE); + } +} +``` + +### ResourceProvider_ListCustomHostnameSites + +```java +import com.azure.core.util.Context; + +/** Samples for ResourceProvider ListCustomHostnameSites. */ +public final class ResourceProviderListCustomHostnameSitesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListCustomHostNameSites.json + */ + /** + * Sample code: Get custom hostnames under subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getCustomHostnamesUnderSubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.resourceProviders().listCustomHostnameSites(Context.NONE); + } +} +``` + +### ResourceProvider_VerifyHostingEnvironmentVnet + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.VnetParameters; + +/** Samples for ResourceProvider VerifyHostingEnvironmentVnet. */ +public final class ResourceProviderVerifyHostingEnvironmentVnetSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/VerifyHostingEnvironmentVnet.json + */ + /** + * Sample code: VerifyHostingEnvironmentVnet. + * + * @param manager Entry point to AppServiceManager. + */ + public static void verifyHostingEnvironmentVnet( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceProviders() + .verifyHostingEnvironmentVnetWithResponse( + new VnetParameters() + .withVnetResourceGroup("vNet123rg") + .withVnetName("vNet123") + .withVnetSubnetName("vNet123SubNet"), + Context.NONE); + } +} +``` + +### StaticSites_ApproveOrRejectPrivateEndpointConnection + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; + +/** Samples for StaticSites ApproveOrRejectPrivateEndpointConnection. */ +public final class StaticSitesApproveOrRejectPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ApproveRejectSitePrivateEndpointConnection.json + */ + /** + * Sample code: Approves or rejects a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void approvesOrRejectsAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .approveOrRejectPrivateEndpointConnection( + "rg", + "testSite", + "connection", + new PrivateLinkConnectionApprovalRequestResource() + .withPrivateLinkServiceConnectionState( + new PrivateLinkConnectionState() + .withStatus("Approved") + .withDescription("Approved by admin.") + .withActionsRequired("")), + Context.NONE); + } +} +``` + +### StaticSites_CreateOrUpdateStaticSite + +```java +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildProperties; + +/** Samples for StaticSites CreateOrUpdateStaticSite. */ +public final class StaticSitesCreateOrUpdateStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSite.json + */ + /** + * Sample code: Create or update a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .defineStaticSite("testStaticSite0") + .withRegion("West US 2") + .withExistingResourceGroup("rg") + .withSku(new SkuDescription().withName("Basic").withTier("Basic")) + .withRepositoryUrl("https://github.com/username/RepoName") + .withBranch("master") + .withRepositoryToken("repoToken123") + .withBuildProperties( + new StaticSiteBuildProperties() + .withAppLocation("app") + .withApiLocation("api") + .withAppArtifactLocation("build")) + .create(); + } +} +``` + +### StaticSites_CreateOrUpdateStaticSiteAppSettings + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StaticSites CreateOrUpdateStaticSiteAppSettings. */ +public final class StaticSitesCreateOrUpdateStaticSiteAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteAppSettings.json + */ + /** + * Sample code: Creates or updates the app settings of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createsOrUpdatesTheAppSettingsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createOrUpdateStaticSiteAppSettingsWithResponse( + "rg", + "testStaticSite0", + new StringDictionaryInner().withProperties(mapOf("setting1", "someval", "setting2", "someval2")), + 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; + } +} +``` + +### StaticSites_CreateOrUpdateStaticSiteBuildAppSettings + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StaticSites CreateOrUpdateStaticSiteBuildAppSettings. */ +public final class StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json + */ + /** + * Sample code: Creates or updates the function app settings of a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createsOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createOrUpdateStaticSiteBuildAppSettingsWithResponse( + "rg", + "testStaticSite0", + "12", + new StringDictionaryInner().withProperties(mapOf("setting1", "someval", "setting2", "someval2")), + 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; + } +} +``` + +### StaticSites_CreateOrUpdateStaticSiteBuildFunctionAppSettings + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StaticSites CreateOrUpdateStaticSiteBuildFunctionAppSettings. */ +public final class StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json + */ + /** + * Sample code: Creates or updates the function app settings of a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createsOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponse( + "rg", + "testStaticSite0", + "12", + new StringDictionaryInner().withProperties(mapOf("setting1", "someval", "setting2", "someval2")), + 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; + } +} +``` + +### StaticSites_CreateOrUpdateStaticSiteCustomDomain + +```java +/** Samples for StaticSites CreateOrUpdateStaticSiteCustomDomain. */ +public final class StaticSitesCreateOrUpdateStaticSiteCustomDomainSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteCustomDomain.json + */ + /** + * Sample code: Create or update a custom domain for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateACustomDomainForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .defineStaticSiteCustomDomain("custom.domain.net") + .withExistingStaticSite("rg", "testStaticSite0") + .create(); + } +} +``` + +### StaticSites_CreateOrUpdateStaticSiteFunctionAppSettings + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StaticSites CreateOrUpdateStaticSiteFunctionAppSettings. */ +public final class StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json + */ + /** + * Sample code: Creates or updates the function app settings of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createsOrUpdatesTheFunctionAppSettingsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createOrUpdateStaticSiteFunctionAppSettingsWithResponse( + "rg", + "testStaticSite0", + new StringDictionaryInner().withProperties(mapOf("setting1", "someval", "setting2", "someval2")), + 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; + } +} +``` + +### StaticSites_CreateUserRolesInvitationLink + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationRequestResource; + +/** Samples for StaticSites CreateUserRolesInvitationLink. */ +public final class StaticSitesCreateUserRolesInvitationLinkSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateUserRolesInvitationLink.json + */ + /** + * Sample code: Create an invitation link for a user for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createAnInvitationLinkForAUserForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createUserRolesInvitationLinkWithResponse( + "rg", + "testStaticSite0", + new StaticSiteUserInvitationRequestResource() + .withDomain("happy-sea-15afae3e.azurestaticwebsites.net") + .withProvider("aad") + .withUserDetails("username") + .withRoles("admin,contributor") + .withNumHoursToExpiration(1), + Context.NONE); + } +} +``` + +### StaticSites_CreateZipDeploymentForStaticSite + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteZipDeploymentArmResource; + +/** Samples for StaticSites CreateZipDeploymentForStaticSite. */ +public final class StaticSitesCreateZipDeploymentForStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StaticSiteZipDeploy.json + */ + /** + * Sample code: Deploy a site from a zipped package. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deployASiteFromAZippedPackage( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createZipDeploymentForStaticSite( + "rg", + "testStaticSite0", + new StaticSiteZipDeploymentArmResource() + .withAppZipUrl( + "https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/app-zipdeploy.zip") + .withApiZipUrl( + "https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/api-zipdeploy.zip") + .withDeploymentTitle("Update index.html") + .withProvider("testProvider") + .withFunctionLanguage("testFunctionLanguage"), + Context.NONE); + } +} +``` + +### StaticSites_CreateZipDeploymentForStaticSiteBuild + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteZipDeploymentArmResource; + +/** Samples for StaticSites CreateZipDeploymentForStaticSiteBuild. */ +public final class StaticSitesCreateZipDeploymentForStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StaticSiteBuildZipDeploy.json + */ + /** + * Sample code: Deploy a site from a zipped package to a particular static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deployASiteFromAZippedPackageToAParticularStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createZipDeploymentForStaticSiteBuild( + "rg", + "testStaticSite0", + "12", + new StaticSiteZipDeploymentArmResource() + .withAppZipUrl( + "https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/app-zipdeploy.zip") + .withApiZipUrl( + "https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/api-zipdeploy.zip") + .withDeploymentTitle("Update index.html") + .withProvider("testProvider") + .withFunctionLanguage("testFunctionLanguage"), + Context.NONE); + } +} +``` + +### StaticSites_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites Delete. */ +public final class StaticSitesDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteStaticSite.json + */ + /** + * Sample code: Delete a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAStaticSite(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().delete("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_DeletePrivateEndpointConnection + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites DeletePrivateEndpointConnection. */ +public final class StaticSitesDeletePrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteSitePrivateEndpointConnection.json + */ + /** + * Sample code: Delete a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().deletePrivateEndpointConnection("rg", "testSite", "connection", Context.NONE); + } +} +``` + +### StaticSites_DeleteStaticSiteBuild + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites DeleteStaticSiteBuild. */ +public final class StaticSitesDeleteStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteStaticSiteBuild.json + */ + /** + * Sample code: Delete a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().deleteStaticSiteBuild("rg", "testStaticSite0", "12", Context.NONE); + } +} +``` + +### StaticSites_DeleteStaticSiteCustomDomain + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites DeleteStaticSiteCustomDomain. */ +public final class StaticSitesDeleteStaticSiteCustomDomainSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteStaticSiteCustomDomain.json + */ + /** + * Sample code: Delete a custom domain for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteACustomDomainForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().deleteStaticSiteCustomDomain("rg", "testStaticSite0", "custom.domain.net", Context.NONE); + } +} +``` + +### StaticSites_DeleteStaticSiteUser + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites DeleteStaticSiteUser. */ +public final class StaticSitesDeleteStaticSiteUserSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteStaticSiteUser.json + */ + /** + * Sample code: Delete a user for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAUserForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().deleteStaticSiteUserWithResponse("rg", "testStaticSite0", "aad", "1234", Context.NONE); + } +} +``` + +### StaticSites_DetachStaticSite + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites DetachStaticSite. */ +public final class StaticSitesDetachStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DetachStaticSite.json + */ + /** + * Sample code: Detach a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void detachAStaticSite(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().detachStaticSite("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_DetachUserProvidedFunctionAppFromStaticSite + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites DetachUserProvidedFunctionAppFromStaticSite. */ +public final class StaticSitesDetachUserProvidedFunctionAppFromStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json + */ + /** + * Sample code: Detach the user provided function app from the static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void detachTheUserProvidedFunctionAppFromTheStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .detachUserProvidedFunctionAppFromStaticSiteWithResponse( + "rg", "testStaticSite0", "testFunctionApp", Context.NONE); + } +} +``` + +### StaticSites_DetachUserProvidedFunctionAppFromStaticSiteBuild + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites DetachUserProvidedFunctionAppFromStaticSiteBuild. */ +public final class StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json + */ + /** + * Sample code: Detach the user provided function app from the static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void detachTheUserProvidedFunctionAppFromTheStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .detachUserProvidedFunctionAppFromStaticSiteBuildWithResponse( + "rg", "testStaticSite0", "12", "testFunctionApp", Context.NONE); + } +} +``` + +### StaticSites_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetByResourceGroup. */ +public final class StaticSitesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSite.json + */ + /** + * Sample code: Get details for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getByResourceGroupWithResponse("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_GetPrivateEndpointConnection + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetPrivateEndpointConnection. */ +public final class StaticSitesGetPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateEndpointConnection.json + */ + /** + * Sample code: Get a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getPrivateEndpointConnectionWithResponse("rg", "testSite", "connection", Context.NONE); + } +} +``` + +### StaticSites_GetPrivateEndpointConnectionList + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetPrivateEndpointConnectionList. */ +public final class StaticSitesGetPrivateEndpointConnectionListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateEndpointConnectionList.json + */ + /** + * Sample code: Get a list of private endpoint connections associated with a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAListOfPrivateEndpointConnectionsAssociatedWithASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getPrivateEndpointConnectionList("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_GetPrivateLinkResources + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetPrivateLinkResources. */ +public final class StaticSitesGetPrivateLinkResourcesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateLinkResources.json + */ + /** + * Sample code: Get private link resources of a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getPrivateLinkResourcesOfASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getPrivateLinkResourcesWithResponse("rg", "testSite", Context.NONE); + } +} +``` + +### StaticSites_GetStaticSiteBuild + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetStaticSiteBuild. */ +public final class StaticSitesGetStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSiteBuild.json + */ + /** + * Sample code: Get a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAStaticSiteBuild(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getStaticSiteBuildWithResponse("rg", "testStaticSite0", "12", Context.NONE); + } +} +``` + +### StaticSites_GetStaticSiteBuilds + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetStaticSiteBuilds. */ +public final class StaticSitesGetStaticSiteBuildsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSiteBuilds.json + */ + /** + * Sample code: Get all builds for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAllBuildsForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getStaticSiteBuilds("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_GetStaticSiteCustomDomain + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetStaticSiteCustomDomain. */ +public final class StaticSitesGetStaticSiteCustomDomainSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSiteCustomDomain.json + */ + /** + * Sample code: Get custom domain for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getCustomDomainForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .getStaticSiteCustomDomainWithResponse("rg", "testStaticSite0", "custom.domain.net", Context.NONE); + } +} +``` + +### StaticSites_GetUserProvidedFunctionAppForStaticSite + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetUserProvidedFunctionAppForStaticSite. */ +public final class StaticSitesGetUserProvidedFunctionAppForStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetUserProvidedFunctionAppForStaticSite.json + */ + /** + * Sample code: Get details of the user provided function app registered with a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .getUserProvidedFunctionAppForStaticSiteWithResponse( + "rg", "testStaticSite0", "testFunctionApp", Context.NONE); + } +} +``` + +### StaticSites_GetUserProvidedFunctionAppForStaticSiteBuild + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetUserProvidedFunctionAppForStaticSiteBuild. */ +public final class StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + */ + /** + * Sample code: Get details of the user provided function app registered with a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + "rg", "testStaticSite0", "default", "testFunctionApp", Context.NONE); + } +} +``` + +### StaticSites_GetUserProvidedFunctionAppsForStaticSite + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetUserProvidedFunctionAppsForStaticSite. */ +public final class StaticSitesGetUserProvidedFunctionAppsForStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetUserProvidedFunctionAppsForStaticSite.json + */ + /** + * Sample code: Get details of the user provided function apps registered with a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getUserProvidedFunctionAppsForStaticSite("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_GetUserProvidedFunctionAppsForStaticSiteBuild + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites GetUserProvidedFunctionAppsForStaticSiteBuild. */ +public final class StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json + */ + /** + * Sample code: Get details of the user provided function apps registered with a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .getUserProvidedFunctionAppsForStaticSiteBuild("rg", "testStaticSite0", "default", Context.NONE); + } +} +``` + +### StaticSites_List + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites List. */ +public final class StaticSitesListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetAllStaticSites.json + */ + /** + * Sample code: Get all static sites in a subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAllStaticSitesInASubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().list(Context.NONE); + } +} +``` + +### StaticSites_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListByResourceGroup. */ +public final class StaticSitesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSites.json + */ + /** + * Sample code: Get static sites for a resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getStaticSitesForAResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listByResourceGroup("rg", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteAppSettings + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteAppSettings. */ +public final class StaticSitesListStaticSiteAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteAppSettings.json + */ + /** + * Sample code: Get app settings of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSettingsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteAppSettingsWithResponse("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteBuildAppSettings + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteBuildAppSettings. */ +public final class StaticSitesListStaticSiteBuildAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteBuildAppSettings.json + */ + /** + * Sample code: Get app settings of a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSettingsOfAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteBuildAppSettingsWithResponse("rg", "testStaticSite0", "12", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteBuildFunctionAppSettings + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteBuildFunctionAppSettings. */ +public final class StaticSitesListStaticSiteBuildFunctionAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteBuildFunctionAppSettings.json + */ + /** + * Sample code: Get function app settings of a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFunctionAppSettingsOfAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .listStaticSiteBuildFunctionAppSettingsWithResponse("rg", "testStaticSite0", "12", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteBuildFunctions + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteBuildFunctions. */ +public final class StaticSitesListStaticSiteBuildFunctionsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteBuildFunctions.json + */ + /** + * Sample code: Gets the functions of a particular static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getsTheFunctionsOfAParticularStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteBuildFunctions("rg", "testStaticSite0", "default", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteConfiguredRoles + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteConfiguredRoles. */ +public final class StaticSitesListStaticSiteConfiguredRolesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteConfiguredRoles.json + */ + /** + * Sample code: Lists the configured roles for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listsTheConfiguredRolesForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteConfiguredRolesWithResponse("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteCustomDomains + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteCustomDomains. */ +public final class StaticSitesListStaticSiteCustomDomainsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSiteCustomDomains.json + */ + /** + * Sample code: List custom domains for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listCustomDomainsForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteCustomDomains("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteFunctionAppSettings + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteFunctionAppSettings. */ +public final class StaticSitesListStaticSiteFunctionAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteFunctionAppSettings.json + */ + /** + * Sample code: Get function app settings of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFunctionAppSettingsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteFunctionAppSettingsWithResponse("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteFunctions + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteFunctions. */ +public final class StaticSitesListStaticSiteFunctionsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteFunctions.json + */ + /** + * Sample code: Gets the functions of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getsTheFunctionsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteFunctions("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteSecrets + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteSecrets. */ +public final class StaticSitesListStaticSiteSecretsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteSecrets.json + */ + /** + * Sample code: List secrets for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listSecretsForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteSecretsWithResponse("rg", "testStaticSite0", Context.NONE); + } +} +``` + +### StaticSites_ListStaticSiteUsers + +```java +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteUsers. */ +public final class StaticSitesListStaticSiteUsersSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteUsers.json + */ + /** + * Sample code: List users for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listUsersForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteUsers("rg", "testStaticSite0", "all", Context.NONE); + } +} +``` + +### StaticSites_PreviewWorkflow + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildProperties; +import com.azure.resourcemanager.appservice.generated.models.StaticSitesWorkflowPreviewRequest; + +/** Samples for StaticSites PreviewWorkflow. */ +public final class StaticSitesPreviewWorkflowSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GenerateStaticSiteWorkflowPreview.json + */ + /** + * Sample code: Generates a preview workflow file for the static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void generatesAPreviewWorkflowFileForTheStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .previewWorkflowWithResponse( + "West US 2", + new StaticSitesWorkflowPreviewRequest() + .withRepositoryUrl("https://github.com/username/RepoName") + .withBranch("master") + .withBuildProperties( + new StaticSiteBuildProperties() + .withAppLocation("app") + .withApiLocation("api") + .withAppArtifactLocation("build")), + Context.NONE); + } +} +``` + +### StaticSites_RegisterUserProvidedFunctionAppWithStaticSite + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; + +/** Samples for StaticSites RegisterUserProvidedFunctionAppWithStaticSite. */ +public final class StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json + */ + /** + * Sample code: Register a user provided function app with a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void registerAUserProvidedFunctionAppWithAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .registerUserProvidedFunctionAppWithStaticSite( + "rg", + "testStaticSite0", + "testFunctionApp", + new StaticSiteUserProvidedFunctionAppArmResourceInner() + .withFunctionAppResourceId( + "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp") + .withFunctionAppRegion("West US 2"), + true, + Context.NONE); + } +} +``` + +### StaticSites_RegisterUserProvidedFunctionAppWithStaticSiteBuild + +```java +/** Samples for StaticSites RegisterUserProvidedFunctionAppWithStaticSiteBuild. */ +public final class StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json + */ + /** + * Sample code: Register a user provided function app with a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void registerAUserProvidedFunctionAppWithAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .defineStaticSiteUserProvidedFunctionAppArmResource("testFunctionApp") + .withExistingBuild("rg", "testStaticSite0", "default") + .withFunctionAppResourceId( + "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp") + .withFunctionAppRegion("West US 2") + .withIsForced(true) + .create(); + } +} +``` + +### StaticSites_ResetStaticSiteApiKey + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteResetPropertiesArmResource; + +/** Samples for StaticSites ResetStaticSiteApiKey. */ +public final class StaticSitesResetStaticSiteApiKeySamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ResetStaticSiteApiKey.json + */ + /** + * Sample code: Reset the api key for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void resetTheApiKeyForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .resetStaticSiteApiKeyWithResponse( + "rg", + "testStaticSite0", + new StaticSiteResetPropertiesArmResource() + .withRepositoryToken("repoToken123") + .withShouldUpdateRepository(true), + Context.NONE); + } +} +``` + +### StaticSites_UpdateStaticSite + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteArmResource; + +/** Samples for StaticSites UpdateStaticSite. */ +public final class StaticSitesUpdateStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/PatchStaticSite.json + */ + /** + * Sample code: Patch a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void patchAStaticSite(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + StaticSiteArmResource resource = + manager.staticSites().getByResourceGroupWithResponse("rg", "testStaticSite0", Context.NONE).getValue(); + resource.update().apply(); + } +} +``` + +### StaticSites_UpdateStaticSiteUser + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; + +/** Samples for StaticSites UpdateStaticSiteUser. */ +public final class StaticSitesUpdateStaticSiteUserSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdateStaticSiteUser.json + */ + /** + * Sample code: Create or update a user for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateAUserForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .updateStaticSiteUserWithResponse( + "rg", + "testStaticSite0", + "aad", + "1234", + new StaticSiteUserArmResourceInner().withRoles("contributor"), + Context.NONE); + } +} +``` + +### StaticSites_ValidateCustomDomainCanBeAddedToStaticSite + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainRequestPropertiesArmResource; + +/** Samples for StaticSites ValidateCustomDomainCanBeAddedToStaticSite. */ +public final class StaticSitesValidateCustomDomainCanBeAddedToStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ValidateStaticSiteCustomDomain.json + */ + /** + * Sample code: Validate a custom domain for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void validateACustomDomainForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .validateCustomDomainCanBeAddedToStaticSite( + "rg", + "testStaticSite0", + "custom.domain.net", + new StaticSiteCustomDomainRequestPropertiesArmResource(), + Context.NONE); + } +} +``` + +### TopLevelDomains_Get + +```java +import com.azure.core.util.Context; + +/** Samples for TopLevelDomains Get. */ +public final class TopLevelDomainsGetSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/GetTopLevelDomain.json + */ + /** + * Sample code: Get Top Level Domain. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTopLevelDomain(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.topLevelDomains().getWithResponse("com", Context.NONE); + } +} +``` + +### TopLevelDomains_List + +```java +import com.azure.core.util.Context; + +/** Samples for TopLevelDomains List. */ +public final class TopLevelDomainsListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/ListTopLevelDomains.json + */ + /** + * Sample code: List Top Level Domains. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listTopLevelDomains(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.topLevelDomains().list(Context.NONE); + } +} +``` + +### TopLevelDomains_ListAgreements + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomainAgreementOption; + +/** Samples for TopLevelDomains ListAgreements. */ +public final class TopLevelDomainsListAgreementsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/ListTopLevelDomainAgreements.json + */ + /** + * Sample code: List Top Level Domain Agreements. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listTopLevelDomainAgreements( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .topLevelDomains() + .listAgreements( + "in", + new TopLevelDomainAgreementOption().withIncludePrivacy(true).withForTransfer(false), + Context.NONE); + } +} +``` + +### WebApps_ApproveOrRejectPrivateEndpointConnection + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; + +/** Samples for WebApps ApproveOrRejectPrivateEndpointConnection. */ +public final class WebAppsApproveOrRejectPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ApproveRejectSitePrivateEndpointConnection.json + */ + /** + * Sample code: Approves or rejects a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void approvesOrRejectsAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .approveOrRejectPrivateEndpointConnection( + "rg", + "testSite", + "connection", + new PrivateLinkConnectionApprovalRequestResource() + .withPrivateLinkServiceConnectionState( + new PrivateLinkConnectionState() + .withStatus("Approved") + .withDescription("Approved by admin.") + .withActionsRequired("")), + Context.NONE); + } +} +``` + +### WebApps_ApproveOrRejectPrivateEndpointConnectionSlot + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; + +/** Samples for WebApps ApproveOrRejectPrivateEndpointConnectionSlot. */ +public final class WebAppsApproveOrRejectPrivateEndpointConnectionSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json + */ + /** + * Sample code: Approves or rejects a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void approvesOrRejectsAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .approveOrRejectPrivateEndpointConnectionSlot( + "rg", + "testSite", + "connection", + "stage", + new PrivateLinkConnectionApprovalRequestResource() + .withPrivateLinkServiceConnectionState( + new PrivateLinkConnectionState() + .withStatus("Approved") + .withDescription("Approved by admin.") + .withActionsRequired("")), + Context.NONE); + } +} +``` + +### WebApps_DeletePrivateEndpointConnection + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps DeletePrivateEndpointConnection. */ +public final class WebAppsDeletePrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteSitePrivateEndpointConnection.json + */ + /** + * Sample code: Delete a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().deletePrivateEndpointConnection("rg", "testSite", "connection", Context.NONE); + } +} +``` + +### WebApps_DeletePrivateEndpointConnectionSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps DeletePrivateEndpointConnectionSlot. */ +public final class WebAppsDeletePrivateEndpointConnectionSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteSitePrivateEndpointConnectionSlot.json + */ + /** + * Sample code: Delete a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().deletePrivateEndpointConnectionSlot("rg", "testSite", "connection", "stage", Context.NONE); + } +} +``` + +### WebApps_GetAppSettingKeyVaultReference + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetAppSettingKeyVaultReference. */ +public final class WebAppsGetAppSettingKeyVaultReferenceSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetKeyVaultReferencesForAppSetting.json + */ + /** + * Sample code: Get Azure Key Vault app setting reference. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAzureKeyVaultAppSettingReference( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getAppSettingKeyVaultReferenceWithResponse("testrg123", "testc6282", "setting", Context.NONE); + } +} +``` + +### WebApps_GetAppSettingKeyVaultReferenceSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetAppSettingKeyVaultReferenceSlot. */ +public final class WebAppsGetAppSettingKeyVaultReferenceSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + */ + /** + * Sample code: Get Azure Key Vault slot app setting reference. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAzureKeyVaultSlotAppSettingReference( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getAppSettingKeyVaultReferenceSlotWithResponse("testrg123", "testc6282", "setting", "stage", Context.NONE); + } +} +``` + +### WebApps_GetAppSettingsKeyVaultReferences + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetAppSettingsKeyVaultReferences. */ +public final class WebAppsGetAppSettingsKeyVaultReferencesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetKeyVaultReferencesForAppSettings.json + */ + /** + * Sample code: Get Azure Key Vault references for app settings. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAzureKeyVaultReferencesForAppSettings( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getAppSettingsKeyVaultReferences("testrg123", "testc6282", Context.NONE); + } +} +``` + +### WebApps_GetAppSettingsKeyVaultReferencesSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetAppSettingsKeyVaultReferencesSlot. */ +public final class WebAppsGetAppSettingsKeyVaultReferencesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json + */ + /** + * Sample code: Get Azure Key Vault references for app settings for slot. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAzureKeyVaultReferencesForAppSettingsForSlot( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getAppSettingsKeyVaultReferencesSlot("testrg123", "testc6282", "stage", Context.NONE); + } +} +``` + +### WebApps_GetFtpAllowed + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetFtpAllowed. */ +public final class WebAppsGetFtpAllowedSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicy.json + */ + /** + * Sample code: Get FTP Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFTPAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getFtpAllowedWithResponse("rg", "testSite", Context.NONE); + } +} +``` + +### WebApps_GetFtpAllowedSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetFtpAllowedSlot. */ +public final class WebAppsGetFtpAllowedSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicySlot.json + */ + /** + * Sample code: Get FTP Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFTPAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getFtpAllowedSlotWithResponse("rg", "testSite", "stage", Context.NONE); + } +} +``` + +### WebApps_GetInstanceInfo + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetInstanceInfo. */ +public final class WebAppsGetInstanceInfoSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSiteInstanceInfo.json + */ + /** + * Sample code: Get site instance info. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getSiteInstanceInfo(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getInstanceInfoWithResponse("testrg123", "tests346", "134987120", Context.NONE); + } +} +``` + +### WebApps_GetInstanceInfoSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetInstanceInfoSlot. */ +public final class WebAppsGetInstanceInfoSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSiteInstanceInfo.json + */ + /** + * Sample code: Get site instance info. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getSiteInstanceInfo(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getInstanceInfoSlotWithResponse("testrg123", "tests346", "134987120", "staging", Context.NONE); + } +} +``` + +### WebApps_GetNetworkTraceOperation + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraceOperation. */ +public final class WebAppsGetNetworkTraceOperationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Get the current status of a network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTheCurrentStatusOfANetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTraceOperationWithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", Context.NONE); + } +} +``` + +### WebApps_GetNetworkTraceOperationSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraceOperationSlot. */ +public final class WebAppsGetNetworkTraceOperationSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Get the current status of a network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTheCurrentStatusOfANetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTraceOperationSlotWithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", "Production", Context.NONE); + } +} +``` + +### WebApps_GetNetworkTraceOperationSlotV2 + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraceOperationSlotV2. */ +public final class WebAppsGetNetworkTraceOperationSlotV2Samples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Get the current status of a network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTheCurrentStatusOfANetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTraceOperationSlotV2WithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", "Production", Context.NONE); + } +} +``` + +### WebApps_GetNetworkTraceOperationV2 + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraceOperationV2. */ +public final class WebAppsGetNetworkTraceOperationV2Samples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Get the current status of a network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTheCurrentStatusOfANetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTraceOperationV2WithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", Context.NONE); + } +} +``` + +### WebApps_GetNetworkTraces + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraces. */ +public final class WebAppsGetNetworkTracesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json + */ + /** + * Sample code: Get NetworkTraces for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getNetworkTracesForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTracesWithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", Context.NONE); + } +} +``` + +### WebApps_GetNetworkTracesSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTracesSlot. */ +public final class WebAppsGetNetworkTracesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json + */ + /** + * Sample code: Get NetworkTraces for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getNetworkTracesForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTracesSlotWithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", "Production", Context.NONE); + } +} +``` + +### WebApps_GetNetworkTracesSlotV2 + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTracesSlotV2. */ +public final class WebAppsGetNetworkTracesSlotV2Samples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json + */ + /** + * Sample code: Get NetworkTraces for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getNetworkTracesForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTracesSlotV2WithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", "Production", Context.NONE); + } +} +``` + +### WebApps_GetNetworkTracesV2 + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTracesV2. */ +public final class WebAppsGetNetworkTracesV2Samples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json + */ + /** + * Sample code: Get NetworkTraces for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getNetworkTracesForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTracesV2WithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", Context.NONE); + } +} +``` + +### WebApps_GetPrivateEndpointConnection + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetPrivateEndpointConnection. */ +public final class WebAppsGetPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateEndpointConnection.json + */ + /** + * Sample code: Get a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getPrivateEndpointConnectionWithResponse("rg", "testSite", "connection", Context.NONE); + } +} +``` + +### WebApps_GetPrivateEndpointConnectionSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetPrivateEndpointConnectionSlot. */ +public final class WebAppsGetPrivateEndpointConnectionSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateEndpointConnectionSlot.json + */ + /** + * Sample code: Get a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getPrivateEndpointConnectionSlotWithResponse("rg", "testSite", "connection", "stage", Context.NONE); + } +} +``` + +### WebApps_GetPrivateLinkResources + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetPrivateLinkResources. */ +public final class WebAppsGetPrivateLinkResourcesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateLinkResources.json + */ + /** + * Sample code: Get private link resources of a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getPrivateLinkResourcesOfASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getPrivateLinkResourcesWithResponse("rg", "testSite", Context.NONE); + } +} +``` + +### WebApps_GetPrivateLinkResourcesSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetPrivateLinkResourcesSlot. */ +public final class WebAppsGetPrivateLinkResourcesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateLinkResourcesSlot.json + */ + /** + * Sample code: Get private link resources of a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getPrivateLinkResourcesOfASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getPrivateLinkResourcesSlotWithResponse("rg", "testSite", "stage", Context.NONE); + } +} +``` + +### WebApps_GetScmAllowed + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetScmAllowed. */ +public final class WebAppsGetScmAllowedSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicy.json + */ + /** + * Sample code: Get SCM Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getSCMAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getScmAllowedWithResponse("rg", "testSite", Context.NONE); + } +} +``` + +### WebApps_GetScmAllowedSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps GetScmAllowedSlot. */ +public final class WebAppsGetScmAllowedSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicySlot.json + */ + /** + * Sample code: Get SCM Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getSCMAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getScmAllowedSlotWithResponse("rg", "testSite", "stage", Context.NONE); + } +} +``` + +### WebApps_ListBasicPublishingCredentialsPolicies + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps ListBasicPublishingCredentialsPolicies. */ +public final class WebAppsListBasicPublishingCredentialsPoliciesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListPublishingCredentialsPolicies.json + */ + /** + * Sample code: List Publishing Credentials Policies. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listPublishingCredentialsPolicies( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().listBasicPublishingCredentialsPolicies("testrg123", "testsite", Context.NONE); + } +} +``` + +### WebApps_ListBasicPublishingCredentialsPoliciesSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps ListBasicPublishingCredentialsPoliciesSlot. */ +public final class WebAppsListBasicPublishingCredentialsPoliciesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListPublishingCredentialsPoliciesSlot.json + */ + /** + * Sample code: List Publishing Credentials Policies. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listPublishingCredentialsPolicies( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().listBasicPublishingCredentialsPoliciesSlot("testrg123", "testsite", "staging", Context.NONE); + } +} +``` + +### WebApps_ListSiteBackups + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps ListSiteBackups. */ +public final class WebAppsListSiteBackupsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListSlotBackups.json + */ + /** + * Sample code: List backups. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listBackups(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().listSiteBackups("testrg123", "tests346", Context.NONE); + } +} +``` + +### WebApps_ListSiteBackupsSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps ListSiteBackupsSlot. */ +public final class WebAppsListSiteBackupsSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListSlotBackups.json + */ + /** + * Sample code: List backups. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listBackups(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().listSiteBackupsSlot("testrg123", "tests346", "staging", Context.NONE); + } +} +``` + +### WebApps_StartNetworkTrace + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps StartNetworkTrace. */ +public final class WebAppsStartNetworkTraceSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Start a new network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void startANewNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().startNetworkTrace("testrg123", "SampleApp", 60, null, null, Context.NONE); + } +} +``` + +### WebApps_StartNetworkTraceSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps StartNetworkTraceSlot. */ +public final class WebAppsStartNetworkTraceSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Start a new network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void startANewNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().startNetworkTraceSlot("testrg123", "SampleApp", "Production", 60, null, null, Context.NONE); + } +} +``` + +### WebApps_StartWebSiteNetworkTraceOperation + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps StartWebSiteNetworkTraceOperation. */ +public final class WebAppsStartWebSiteNetworkTraceOperationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Start a new network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void startANewNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().startWebSiteNetworkTraceOperation("testrg123", "SampleApp", 60, null, null, Context.NONE); + } +} +``` + +### WebApps_StartWebSiteNetworkTraceOperationSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps StartWebSiteNetworkTraceOperationSlot. */ +public final class WebAppsStartWebSiteNetworkTraceOperationSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Start a new network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void startANewNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .startWebSiteNetworkTraceOperationSlot( + "testrg123", "SampleApp", "Production", 60, null, null, Context.NONE); + } +} +``` + +### WebApps_StopNetworkTrace + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps StopNetworkTrace. */ +public final class WebAppsStopNetworkTraceSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json + */ + /** + * Sample code: Stop a currently running network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void stopACurrentlyRunningNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().stopNetworkTraceWithResponse("testrg123", "SampleApp", Context.NONE); + } +} +``` + +### WebApps_StopNetworkTraceSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps StopNetworkTraceSlot. */ +public final class WebAppsStopNetworkTraceSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json + */ + /** + * Sample code: Stop a currently running network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void stopACurrentlyRunningNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().stopNetworkTraceSlotWithResponse("testrg123", "SampleApp", "Production", Context.NONE); + } +} +``` + +### WebApps_StopWebSiteNetworkTrace + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps StopWebSiteNetworkTrace. */ +public final class WebAppsStopWebSiteNetworkTraceSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json + */ + /** + * Sample code: Stop a currently running network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void stopACurrentlyRunningNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().stopWebSiteNetworkTraceWithResponse("testrg123", "SampleApp", Context.NONE); + } +} +``` + +### WebApps_StopWebSiteNetworkTraceSlot + +```java +import com.azure.core.util.Context; + +/** Samples for WebApps StopWebSiteNetworkTraceSlot. */ +public final class WebAppsStopWebSiteNetworkTraceSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json + */ + /** + * Sample code: Stop a currently running network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void stopACurrentlyRunningNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().stopWebSiteNetworkTraceSlotWithResponse("testrg123", "SampleApp", "Production", Context.NONE); + } +} +``` + +### WebApps_UpdateFtpAllowed + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** Samples for WebApps UpdateFtpAllowed. */ +public final class WebAppsUpdateFtpAllowedSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicy.json + */ + /** + * Sample code: Update FTP Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateFTPAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .updateFtpAllowedWithResponse( + "rg", "testSite", new CsmPublishingCredentialsPoliciesEntityInner().withAllow(true), Context.NONE); + } +} +``` + +### WebApps_UpdateFtpAllowedSlot + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** Samples for WebApps UpdateFtpAllowedSlot. */ +public final class WebAppsUpdateFtpAllowedSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicySlot.json + */ + /** + * Sample code: Update FTP Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateFTPAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .updateFtpAllowedSlotWithResponse( + "rg", + "testSite", + "stage", + new CsmPublishingCredentialsPoliciesEntityInner().withAllow(true), + Context.NONE); + } +} +``` + +### WebApps_UpdateScmAllowed + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** Samples for WebApps UpdateScmAllowed. */ +public final class WebAppsUpdateScmAllowedSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicy.json + */ + /** + * Sample code: Update SCM Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateSCMAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .updateScmAllowedWithResponse( + "rg", "testSite", new CsmPublishingCredentialsPoliciesEntityInner().withAllow(true), Context.NONE); + } +} +``` + +### WebApps_UpdateScmAllowedSlot + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** Samples for WebApps UpdateScmAllowedSlot. */ +public final class WebAppsUpdateScmAllowedSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicySlot.json + */ + /** + * Sample code: Update SCM Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateSCMAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .updateScmAllowedSlotWithResponse( + "rg", + "testSite", + "stage", + new CsmPublishingCredentialsPoliciesEntityInner().withAllow(true), + Context.NONE); + } +} +``` + diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/pom.xml b/sdk/appservice/azure-resourcemanager-appservice-generated/pom.xml new file mode 100644 index 0000000000000..68d8639e1347e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/pom.xml @@ -0,0 +1,81 @@ + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure.resourcemanager + azure-resourcemanager-appservice-generated + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for AppService Management + This package contains Microsoft Azure SDK for AppService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. WebSite Management Client. Package tag package-2021-03. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + true + false + + + + + + com.azure + azure-core + 1.24.0 + + + com.azure + azure-core-management + 1.5.0 + + + + + + org.revapi + revapi-maven-plugin + 0.14.6 + + + + + java.method.addedToInterface + + + true + .* + com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)* + + + + + + + + diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/AppServiceManager.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/AppServiceManager.java new file mode 100644 index 0000000000000..89005e3b37c46 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/AppServiceManager.java @@ -0,0 +1,489 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated; + +import com.azure.core.credential.TokenCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.util.Configuration; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.WebSiteManagementClient; +import com.azure.resourcemanager.appservice.generated.implementation.AppServiceCertificateOrdersImpl; +import com.azure.resourcemanager.appservice.generated.implementation.AppServiceEnvironmentsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.AppServicePlansImpl; +import com.azure.resourcemanager.appservice.generated.implementation.CertificateOrdersDiagnosticsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.CertificateRegistrationProvidersImpl; +import com.azure.resourcemanager.appservice.generated.implementation.CertificatesImpl; +import com.azure.resourcemanager.appservice.generated.implementation.ContainerAppsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.ContainerAppsRevisionsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.DeletedWebAppsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.DiagnosticsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.DomainRegistrationProvidersImpl; +import com.azure.resourcemanager.appservice.generated.implementation.DomainsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.GlobalsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.KubeEnvironmentsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.ProvidersImpl; +import com.azure.resourcemanager.appservice.generated.implementation.RecommendationsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.ResourceHealthMetadatasImpl; +import com.azure.resourcemanager.appservice.generated.implementation.ResourceProvidersImpl; +import com.azure.resourcemanager.appservice.generated.implementation.StaticSitesImpl; +import com.azure.resourcemanager.appservice.generated.implementation.TopLevelDomainsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.WebAppsImpl; +import com.azure.resourcemanager.appservice.generated.implementation.WebSiteManagementClientBuilder; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrders; +import com.azure.resourcemanager.appservice.generated.models.AppServiceEnvironments; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlans; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrdersDiagnostics; +import com.azure.resourcemanager.appservice.generated.models.CertificateRegistrationProviders; +import com.azure.resourcemanager.appservice.generated.models.Certificates; +import com.azure.resourcemanager.appservice.generated.models.ContainerApps; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppsRevisions; +import com.azure.resourcemanager.appservice.generated.models.DeletedWebApps; +import com.azure.resourcemanager.appservice.generated.models.Diagnostics; +import com.azure.resourcemanager.appservice.generated.models.DomainRegistrationProviders; +import com.azure.resourcemanager.appservice.generated.models.Domains; +import com.azure.resourcemanager.appservice.generated.models.Globals; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironments; +import com.azure.resourcemanager.appservice.generated.models.Providers; +import com.azure.resourcemanager.appservice.generated.models.Recommendations; +import com.azure.resourcemanager.appservice.generated.models.ResourceHealthMetadatas; +import com.azure.resourcemanager.appservice.generated.models.ResourceProviders; +import com.azure.resourcemanager.appservice.generated.models.StaticSites; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomains; +import com.azure.resourcemanager.appservice.generated.models.WebApps; +import java.time.Duration; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +/** Entry point to AppServiceManager. WebSite Management Client. */ +public final class AppServiceManager { + private AppServiceCertificateOrders appServiceCertificateOrders; + + private CertificateOrdersDiagnostics certificateOrdersDiagnostics; + + private CertificateRegistrationProviders certificateRegistrationProviders; + + private Domains domains; + + private TopLevelDomains topLevelDomains; + + private DomainRegistrationProviders domainRegistrationProviders; + + private AppServiceEnvironments appServiceEnvironments; + + private AppServicePlans appServicePlans; + + private Certificates certificates; + + private ContainerApps containerApps; + + private ContainerAppsRevisions containerAppsRevisions; + + private DeletedWebApps deletedWebApps; + + private Diagnostics diagnostics; + + private Globals globals; + + private KubeEnvironments kubeEnvironments; + + private Providers providers; + + private Recommendations recommendations; + + private ResourceHealthMetadatas resourceHealthMetadatas; + + private ResourceProviders resourceProviders; + + private StaticSites staticSites; + + private WebApps webApps; + + private final WebSiteManagementClient clientObject; + + private AppServiceManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + this.clientObject = + new WebSiteManagementClientBuilder() + .pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); + } + + /** + * Creates an instance of AppService service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the AppService service API instance. + */ + public static AppServiceManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return configure().authenticate(credential, profile); + } + + /** + * Gets a Configurable instance that can be used to create AppServiceManager with optional configuration. + * + * @return the Configurable instance allowing configurations. + */ + public static Configurable configure() { + return new AppServiceManager.Configurable(); + } + + /** The Configurable allowing configurations to be set. */ + public static final class Configurable { + private final ClientLogger logger = new ClientLogger(Configurable.class); + + private HttpClient httpClient; + private HttpLogOptions httpLogOptions; + private final List policies = new ArrayList<>(); + private final List scopes = new ArrayList<>(); + private RetryPolicy retryPolicy; + private Duration defaultPollInterval; + + private Configurable() { + } + + /** + * Sets the http client. + * + * @param httpClient the HTTP client. + * @return the configurable object itself. + */ + public Configurable withHttpClient(HttpClient httpClient) { + this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); + return this; + } + + /** + * Sets the logging options to the HTTP pipeline. + * + * @param httpLogOptions the HTTP log options. + * @return the configurable object itself. + */ + public Configurable withLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); + return this; + } + + /** + * Adds the pipeline policy to the HTTP pipeline. + * + * @param policy the HTTP pipeline policy. + * @return the configurable object itself. + */ + public Configurable withPolicy(HttpPipelinePolicy policy) { + this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); + return this; + } + + /** + * Adds the scope to permission sets. + * + * @param scope the scope. + * @return the configurable object itself. + */ + public Configurable withScope(String scope) { + this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); + return this; + } + + /** + * Sets the retry policy to the HTTP pipeline. + * + * @param retryPolicy the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); + return this; + } + + /** + * Sets the default poll interval, used when service does not provide "Retry-After" header. + * + * @param defaultPollInterval the default poll interval. + * @return the configurable object itself. + */ + public Configurable withDefaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + if (this.defaultPollInterval.isNegative()) { + throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + } + return this; + } + + /** + * Creates an instance of AppService service API entry point. + * + * @param credential the credential to use. + * @param profile the Azure profile for client. + * @return the AppService service API instance. + */ + public AppServiceManager authenticate(TokenCredential credential, AzureProfile profile) { + Objects.requireNonNull(credential, "'credential' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + + StringBuilder userAgentBuilder = new StringBuilder(); + userAgentBuilder + .append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.appservice.generated") + .append("/") + .append("1.0.0-beta.1"); + if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { + userAgentBuilder + .append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); + } else { + userAgentBuilder.append(" (auto-generated)"); + } + + if (scopes.isEmpty()) { + scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); + } + if (retryPolicy == null) { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } + List policies = new ArrayList<>(); + policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new RequestIdPolicy()); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(retryPolicy); + policies.add(new AddDatePolicy()); + policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies + .addAll( + this + .policies + .stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); + return new AppServiceManager(httpPipeline, profile, defaultPollInterval); + } + } + + /** @return Resource collection API of AppServiceCertificateOrders. */ + public AppServiceCertificateOrders appServiceCertificateOrders() { + if (this.appServiceCertificateOrders == null) { + this.appServiceCertificateOrders = + new AppServiceCertificateOrdersImpl(clientObject.getAppServiceCertificateOrders(), this); + } + return appServiceCertificateOrders; + } + + /** @return Resource collection API of CertificateOrdersDiagnostics. */ + public CertificateOrdersDiagnostics certificateOrdersDiagnostics() { + if (this.certificateOrdersDiagnostics == null) { + this.certificateOrdersDiagnostics = + new CertificateOrdersDiagnosticsImpl(clientObject.getCertificateOrdersDiagnostics(), this); + } + return certificateOrdersDiagnostics; + } + + /** @return Resource collection API of CertificateRegistrationProviders. */ + public CertificateRegistrationProviders certificateRegistrationProviders() { + if (this.certificateRegistrationProviders == null) { + this.certificateRegistrationProviders = + new CertificateRegistrationProvidersImpl(clientObject.getCertificateRegistrationProviders(), this); + } + return certificateRegistrationProviders; + } + + /** @return Resource collection API of Domains. */ + public Domains domains() { + if (this.domains == null) { + this.domains = new DomainsImpl(clientObject.getDomains(), this); + } + return domains; + } + + /** @return Resource collection API of TopLevelDomains. */ + public TopLevelDomains topLevelDomains() { + if (this.topLevelDomains == null) { + this.topLevelDomains = new TopLevelDomainsImpl(clientObject.getTopLevelDomains(), this); + } + return topLevelDomains; + } + + /** @return Resource collection API of DomainRegistrationProviders. */ + public DomainRegistrationProviders domainRegistrationProviders() { + if (this.domainRegistrationProviders == null) { + this.domainRegistrationProviders = + new DomainRegistrationProvidersImpl(clientObject.getDomainRegistrationProviders(), this); + } + return domainRegistrationProviders; + } + + /** @return Resource collection API of AppServiceEnvironments. */ + public AppServiceEnvironments appServiceEnvironments() { + if (this.appServiceEnvironments == null) { + this.appServiceEnvironments = + new AppServiceEnvironmentsImpl(clientObject.getAppServiceEnvironments(), this); + } + return appServiceEnvironments; + } + + /** @return Resource collection API of AppServicePlans. */ + public AppServicePlans appServicePlans() { + if (this.appServicePlans == null) { + this.appServicePlans = new AppServicePlansImpl(clientObject.getAppServicePlans(), this); + } + return appServicePlans; + } + + /** @return Resource collection API of Certificates. */ + public Certificates certificates() { + if (this.certificates == null) { + this.certificates = new CertificatesImpl(clientObject.getCertificates(), this); + } + return certificates; + } + + /** @return Resource collection API of ContainerApps. */ + public ContainerApps containerApps() { + if (this.containerApps == null) { + this.containerApps = new ContainerAppsImpl(clientObject.getContainerApps(), this); + } + return containerApps; + } + + /** @return Resource collection API of ContainerAppsRevisions. */ + public ContainerAppsRevisions containerAppsRevisions() { + if (this.containerAppsRevisions == null) { + this.containerAppsRevisions = + new ContainerAppsRevisionsImpl(clientObject.getContainerAppsRevisions(), this); + } + return containerAppsRevisions; + } + + /** @return Resource collection API of DeletedWebApps. */ + public DeletedWebApps deletedWebApps() { + if (this.deletedWebApps == null) { + this.deletedWebApps = new DeletedWebAppsImpl(clientObject.getDeletedWebApps(), this); + } + return deletedWebApps; + } + + /** @return Resource collection API of Diagnostics. */ + public Diagnostics diagnostics() { + if (this.diagnostics == null) { + this.diagnostics = new DiagnosticsImpl(clientObject.getDiagnostics(), this); + } + return diagnostics; + } + + /** @return Resource collection API of Globals. */ + public Globals globals() { + if (this.globals == null) { + this.globals = new GlobalsImpl(clientObject.getGlobals(), this); + } + return globals; + } + + /** @return Resource collection API of KubeEnvironments. */ + public KubeEnvironments kubeEnvironments() { + if (this.kubeEnvironments == null) { + this.kubeEnvironments = new KubeEnvironmentsImpl(clientObject.getKubeEnvironments(), this); + } + return kubeEnvironments; + } + + /** @return Resource collection API of Providers. */ + public Providers providers() { + if (this.providers == null) { + this.providers = new ProvidersImpl(clientObject.getProviders(), this); + } + return providers; + } + + /** @return Resource collection API of Recommendations. */ + public Recommendations recommendations() { + if (this.recommendations == null) { + this.recommendations = new RecommendationsImpl(clientObject.getRecommendations(), this); + } + return recommendations; + } + + /** @return Resource collection API of ResourceHealthMetadatas. */ + public ResourceHealthMetadatas resourceHealthMetadatas() { + if (this.resourceHealthMetadatas == null) { + this.resourceHealthMetadatas = + new ResourceHealthMetadatasImpl(clientObject.getResourceHealthMetadatas(), this); + } + return resourceHealthMetadatas; + } + + /** @return Resource collection API of ResourceProviders. */ + public ResourceProviders resourceProviders() { + if (this.resourceProviders == null) { + this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); + } + return resourceProviders; + } + + /** @return Resource collection API of StaticSites. */ + public StaticSites staticSites() { + if (this.staticSites == null) { + this.staticSites = new StaticSitesImpl(clientObject.getStaticSites(), this); + } + return staticSites; + } + + /** @return Resource collection API of WebApps. */ + public WebApps webApps() { + if (this.webApps == null) { + this.webApps = new WebAppsImpl(clientObject.getWebApps(), this); + } + return webApps; + } + + /** + * @return Wrapped service client WebSiteManagementClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. + */ + public WebSiteManagementClient serviceClient() { + return this.clientObject; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServiceCertificateOrdersClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServiceCertificateOrdersClient.java new file mode 100644 index 0000000000000..8fecc1af5939f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServiceCertificateOrdersClient.java @@ -0,0 +1,770 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.AppServiceCertificateOrderInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateEmailInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateOrderActionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSealInner; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrderPatchResource; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificatePatchResource; +import com.azure.resourcemanager.appservice.generated.models.ReissueCertificateOrderRequest; +import com.azure.resourcemanager.appservice.generated.models.RenewCertificateOrderRequest; +import com.azure.resourcemanager.appservice.generated.models.SiteSealRequest; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in AppServiceCertificateOrdersClient. */ +public interface AppServiceCertificateOrdersClient { + /** + * Description for List all certificate orders in a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for List all certificate orders in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validatePurchaseInformation(AppServiceCertificateOrderInner appServiceCertificateOrder); + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response validatePurchaseInformationWithResponse( + AppServiceCertificateOrderInner appServiceCertificateOrder, Context context); + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceCertificateOrderInner getByResourceGroup(String resourceGroupName, String certificateOrderName); + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AppServiceCertificateOrderInner> beginCreateOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName); + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AppServiceCertificateOrderInner> beginCreateOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context); + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceCertificateOrderInner createOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName); + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceCertificateOrderInner createOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context); + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 certificateOrderName); + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceCertificateOrderInner update( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderPatchResource certificateDistinguishedName); + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderPatchResource certificateDistinguishedName, + Context context); + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listCertificates( + String resourceGroupName, String certificateOrderName); + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listCertificates( + String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceCertificateResourceInner getCertificate( + String resourceGroupName, String certificateOrderName, String name); + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCertificateWithResponse( + String resourceGroupName, String certificateOrderName, String name, Context context); + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AppServiceCertificateResourceInner> + beginCreateOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate); + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AppServiceCertificateResourceInner> + beginCreateOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate, + Context context); + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceCertificateResourceInner createOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate); + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceCertificateResourceInner createOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate, + Context context); + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteCertificate(String resourceGroupName, String certificateOrderName, String name); + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteCertificateWithResponse( + String resourceGroupName, String certificateOrderName, String name, Context context); + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceCertificateResourceInner updateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificatePatchResource keyVaultCertificate); + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateCertificateWithResponse( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificatePatchResource keyVaultCertificate, + Context context); + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 reissue( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest); + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response reissueWithResponse( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest, + Context context); + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 renew( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest); + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response renewWithResponse( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest, + Context context); + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resendEmail(String resourceGroupName, String certificateOrderName); + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resendEmailWithResponse(String resourceGroupName, String certificateOrderName, Context context); + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resendRequestEmails(String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier); + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resendRequestEmailsWithResponse( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier, Context context); + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site seal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSealInner retrieveSiteSeal( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest); + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site seal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response retrieveSiteSealWithResponse( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest, Context context); + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 verifyDomainOwnership(String resourceGroupName, String certificateOrderName); + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response verifyDomainOwnershipWithResponse( + String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List retrieveCertificateActions(String resourceGroupName, String name); + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> retrieveCertificateActionsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List retrieveCertificateEmailHistory(String resourceGroupName, String name); + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> retrieveCertificateEmailHistoryWithResponse( + String resourceGroupName, String name, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServiceEnvironmentsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServiceEnvironmentsClient.java new file mode 100644 index 0000000000000..98849286d9631 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServiceEnvironmentsClient.java @@ -0,0 +1,1632 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.AddressResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironmentResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AseV3NetworkingConfigurationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostingEnvironmentDiagnosticsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.InboundEnvironmentEndpointInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceMetricDefinitionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StampCapacityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UsageInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WorkerPoolResourceInner; +import com.azure.resourcemanager.appservice.generated.models.AppServiceEnvironmentPatchResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.VirtualNetworkProfile; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in AppServiceEnvironmentsClient. */ +public interface AppServiceEnvironmentsClient { + /** + * Description for Get all App Service Environments for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all App Service Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceEnvironmentResourceInner getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AppServiceEnvironmentResourceInner> beginCreateOrUpdate( + String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope); + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AppServiceEnvironmentResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String name, + AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + Context context); + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceEnvironmentResourceInner createOrUpdate( + String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope); + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceEnvironmentResourceInner createOrUpdate( + String resourceGroupName, + String name, + AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + Context context); + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String name, Boolean forceDelete); + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete( + String resourceGroupName, String name, Boolean forceDelete, Context context); + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name, Boolean forceDelete); + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name, Boolean forceDelete, Context context); + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServiceEnvironmentResourceInner update( + String resourceGroupName, String name, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope); + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String name, + AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope, + Context context); + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 stamp capacities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listCapacities(String resourceGroupName, String name); + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 stamp capacities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listCapacities(String resourceGroupName, String name, Context context); + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes main public IP address and any extra virtual IPs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AddressResponseInner getVipInfo(String resourceGroupName, String name); + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes main public IP address and any extra virtual IPs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVipInfoWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable changeVnet(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo); + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable changeVnet( + String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context); + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AseV3NetworkingConfigurationInner getAseV3NetworkingConfiguration(String resourceGroupName, String name); + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAseV3NetworkingConfigurationWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AseV3NetworkingConfigurationInner updateAseNetworkingConfiguration( + String resourceGroupName, String name, AseV3NetworkingConfigurationInner aseNetworkingConfiguration); + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateAseNetworkingConfigurationWithResponse( + String resourceGroupName, + String name, + AseV3NetworkingConfigurationInner aseNetworkingConfiguration, + Context context); + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of HostingEnvironmentDiagnostics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List listDiagnostics(String resourceGroupName, String name); + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of HostingEnvironmentDiagnostics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> listDiagnosticsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 for an App Service Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HostingEnvironmentDiagnosticsInner getDiagnosticsItem( + String resourceGroupName, String name, String diagnosticsName); + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 for an App Service Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDiagnosticsItemWithResponse( + String resourceGroupName, String name, String diagnosticsName, Context context); + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getInboundNetworkDependenciesEndpoints( + String resourceGroupName, String name); + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getInboundNetworkDependenciesEndpoints( + String resourceGroupName, String name, Context context); + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRolePools(String resourceGroupName, String name); + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRolePools(String resourceGroupName, String name, Context context); + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkerPoolResourceInner getMultiRolePool(String resourceGroupName, String name); + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMultiRolePoolWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkerPoolResourceInner createOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkerPoolResourceInner createOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkerPoolResourceInner updateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateMultiRolePoolWithResponse( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context); + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRolePoolInstanceMetricDefinitions( + String resourceGroupName, String name, String instance); + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRolePoolInstanceMetricDefinitions( + String resourceGroupName, String name, String instance, Context context); + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRoleMetricDefinitions(String resourceGroupName, String name); + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRoleMetricDefinitions( + String resourceGroupName, String name, Context context); + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRolePoolSkus(String resourceGroupName, String name); + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRolePoolSkus(String resourceGroupName, String name, Context context); + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRoleUsages(String resourceGroupName, String name); + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listMultiRoleUsages(String resourceGroupName, String name, Context context); + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List listOperations(String resourceGroupName, String name); + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> listOperationsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String name); + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name); + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object deletePrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourcesWrapperInner getPrivateLinkResources(String resourceGroupName, String name); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 reboot(String resourceGroupName, String name); + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response rebootWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable resume(String resourceGroupName, String name); + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable resume(String resourceGroupName, String name, Context context); + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAppServicePlans(String resourceGroupName, String name); + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAppServicePlans(String resourceGroupName, String name, Context context); + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebApps(String resourceGroupName, String name); + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebApps( + String resourceGroupName, String name, String propertiesToInclude, Context context); + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable suspend(String resourceGroupName, String name); + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable suspend(String resourceGroupName, String name, Context context); + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUsages(String resourceGroupName, String name); + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUsages(String resourceGroupName, String name, String filter, Context context); + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWorkerPools(String resourceGroupName, String name); + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWorkerPools(String resourceGroupName, String name, Context context); + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkerPoolResourceInner getWorkerPool(String resourceGroupName, String name, String workerPoolName); + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWorkerPoolWithResponse( + String resourceGroupName, String name, String workerPoolName, Context context); + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPool( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope); + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPool( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context); + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkerPoolResourceInner createOrUpdateWorkerPool( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope); + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkerPoolResourceInner createOrUpdateWorkerPool( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context); + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WorkerPoolResourceInner updateWorkerPool( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope); + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWorkerPoolWithResponse( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context); + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWorkerPoolInstanceMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, String instance); + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWorkerPoolInstanceMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, String instance, Context context); + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebWorkerMetricDefinitions( + String resourceGroupName, String name, String workerPoolName); + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebWorkerMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, Context context); + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWorkerPoolSkus(String resourceGroupName, String name, String workerPoolName); + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWorkerPoolSkus( + String resourceGroupName, String name, String workerPoolName, Context context); + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebWorkerUsages(String resourceGroupName, String name, String workerPoolName); + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebWorkerUsages( + String resourceGroupName, String name, String workerPoolName, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServicePlansClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServicePlansClient.java new file mode 100644 index 0000000000000..e0795c6bd8ae9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/AppServicePlansClient.java @@ -0,0 +1,933 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.AppServicePlanInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CapabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionKeyInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionLimitsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetRouteInner; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlanPatchResource; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in AppServicePlansClient. */ +public interface AppServicePlansClient { + /** + * Description for Get all App Service plans for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all App Service plans for a subscription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is + * <code>false</code>, which returns a subset of the properties. Retrieval of all properties may + * increase the API latency. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Boolean detailed, Context context); + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @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 app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServicePlanInner getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @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 app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AppServicePlanInner> beginCreateOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan); + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, AppServicePlanInner> beginCreateOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context); + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServicePlanInner createOrUpdate(String resourceGroupName, String name, AppServicePlanInner appServicePlan); + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServicePlanInner createOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context); + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppServicePlanInner update(String resourceGroupName, String name, AppServicePlanPatchResource appServicePlan); + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String name, AppServicePlanPatchResource appServicePlan, Context context); + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List listCapabilities(String resourceGroupName, String name); + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> listCapabilitiesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner getHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionKeyInner listHybridConnectionKeys( + String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listHybridConnectionKeysWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resources. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebAppsByHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resources. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebAppsByHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionLimitsInner getHybridConnectionPlanLimit(String resourceGroupName, String name); + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getHybridConnectionPlanLimitWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHybridConnections(String resourceGroupName, String name); + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHybridConnections(String resourceGroupName, String name, Context context); + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restartWebApps(String resourceGroupName, String name); + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to perform a soft restart, applies the configuration + * settings and restarts the apps if necessary. The default is <code>false</code>, which always + * restarts and reprovisions the apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response restartWebAppsWithResponse( + String resourceGroupName, String name, Boolean softRestart, Context context); + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebApps(String resourceGroupName, String name); + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the + * resulting list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list + * contains web apps from the start of the list. + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running. + * @param top List page size. If specified, results are paged. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebApps( + String resourceGroupName, String name, String skipToken, String filter, String top, Context context); + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object getServerFarmSkus(String resourceGroupName, String name); + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getServerFarmSkusWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUsages(String resourceGroupName, String name); + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUsages(String resourceGroupName, String name, String filter, Context context); + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List listVnets(String resourceGroupName, String name); + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> listVnetsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @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 virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetInfoResourceInner getVnetFromServerFarm(String resourceGroupName, String name, String vnetName); + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @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 virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVnetFromServerFarmWithResponse( + String resourceGroupName, String name, String vnetName, Context context); + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetGatewayInner getVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName); + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVnetGatewayWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context); + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetGatewayInner updateVnetGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope); + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateVnetGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context); + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List listRoutesForVnet(String resourceGroupName, String name, String vnetName); + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> listRoutesForVnetWithResponse( + String resourceGroupName, String name, String vnetName, Context context); + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @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 array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List getRouteForVnet(String resourceGroupName, String name, String vnetName, String routeName); + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @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 array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> getRouteForVnetWithResponse( + String resourceGroupName, String name, String vnetName, String routeName, Context context); + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @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 virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetRouteInner createOrUpdateVnetRoute( + String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route); + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @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 virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateVnetRouteWithResponse( + String resourceGroupName, + String name, + String vnetName, + String routeName, + VnetRouteInner route, + Context context); + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName); + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteVnetRouteWithResponse( + String resourceGroupName, String name, String vnetName, String routeName, Context context); + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @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 virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetRouteInner updateVnetRoute( + String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route); + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @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 virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateVnetRouteWithResponse( + String resourceGroupName, + String name, + String vnetName, + String routeName, + VnetRouteInner route, + Context context); + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 rebootWorker(String resourceGroupName, String name, String workerName); + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response rebootWorkerWithResponse(String resourceGroupName, String name, String workerName, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificateOrdersDiagnosticsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificateOrdersDiagnosticsClient.java new file mode 100644 index 0000000000000..083d41fb17c27 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificateOrdersDiagnosticsClient.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.DetectorResponseInner; +import java.time.OffsetDateTime; + +/** An instance of this class provides access to all the operations defined in CertificateOrdersDiagnosticsClient. */ +public interface CertificateOrdersDiagnosticsClient { + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName); + + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DetectorResponseInner getAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName, String detectorName); + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @param startTime The start time for detector response. + * @param endTime The end time for the detector response. + * @param timeGrain The time grain for the detector response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAppServiceCertificateOrderDetectorResponseWithResponse( + String resourceGroupName, + String certificateOrderName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificateRegistrationProvidersClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificateRegistrationProvidersClient.java new file mode 100644 index 0000000000000..64b946bf2fc11 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificateRegistrationProvidersClient.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.appservice.generated.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.appservice.generated.fluent.models.CsmOperationDescriptionInner; + +/** + * An instance of this class provides access to all the operations defined in CertificateRegistrationProvidersClient. + */ +public interface CertificateRegistrationProvidersClient { + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOperations(); + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOperations(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificatesClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificatesClient.java new file mode 100644 index 0000000000000..b04e656dcd6ad --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/CertificatesClient.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.CertificateInner; +import com.azure.resourcemanager.appservice.generated.models.CertificatePatchResource; + +/** An instance of this class provides access to all the operations defined in CertificatesClient. */ +public interface CertificatesClient { + /** + * Description for Get all certificates for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all certificates for a subscription. + * + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=KeyVaultId eq 'KeyVaultId'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String filter, Context context); + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateInner getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateInner createOrUpdate(String resourceGroupName, String name, CertificateInner certificateEnvelope); + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, String name, CertificateInner certificateEnvelope, Context context); + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateInner update(String resourceGroupName, String name, CertificatePatchResource certificateEnvelope); + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String name, CertificatePatchResource certificateEnvelope, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ContainerAppsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ContainerAppsClient.java new file mode 100644 index 0000000000000..776263e912b10 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ContainerAppsClient.java @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SecretsCollectionInner; + +/** An instance of this class provides access to all the operations defined in ContainerAppsClient. */ +public interface ContainerAppsClient { + /** + * Get the Container Apps in a given subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get the Container Apps in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 getByResourceGroup(String resourceGroupName, String name); + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ContainerAppInner> beginCreateOrUpdate( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope); + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ContainerAppInner> beginCreateOrUpdate( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope, Context context); + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppInner createOrUpdate(String resourceGroupName, String name, ContainerAppInner containerAppEnvelope); + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppInner createOrUpdate( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope, Context context); + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String name); + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context); + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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.appservice.generated.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 name, Context context); + + /** + * List secrets for a container app. + * + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SecretsCollectionInner listSecrets(String name); + + /** + * List secrets for a container app. + * + * @param name 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.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSecretsWithResponse(String name, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ContainerAppsRevisionsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ContainerAppsRevisionsClient.java new file mode 100644 index 0000000000000..574d8257f9077 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ContainerAppsRevisionsClient.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.RevisionInner; + +/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. */ +public interface ContainerAppsRevisionsClient { + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRevisions(String resourceGroupName, String containerAppName); + + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRevisions(String resourceGroupName, String containerAppName, Context context); + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 name); + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name 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.appservice.generated.models.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) + Response getRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context); + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 activateRevision(String resourceGroupName, String containerAppName, String name); + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response activateRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context); + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deactivateRevision(String resourceGroupName, String containerAppName, String name); + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deactivateRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context); + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response restartRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DeletedWebAppsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DeletedWebAppsClient.java new file mode 100644 index 0000000000000..72dcdb593d1e9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DeletedWebAppsClient.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.appservice.generated.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.appservice.generated.fluent.models.DeletedSiteInner; + +/** An instance of this class provides access to all the operations defined in DeletedWebAppsClient. */ +public interface DeletedWebAppsClient { + /** + * Description for Get all deleted apps for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all deleted apps for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location); + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByLocation(String location, Context context); + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeletedSiteInner getDeletedWebAppByLocation(String location, String deletedSiteId); + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeletedWebAppByLocationWithResponse( + String location, String deletedSiteId, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DiagnosticsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DiagnosticsClient.java new file mode 100644 index 0000000000000..99b1ef413648b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DiagnosticsClient.java @@ -0,0 +1,849 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.AnalysisDefinitionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinitionResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticAnalysisInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticCategoryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticDetectorResponseInner; +import java.time.OffsetDateTime; + +/** An instance of this class provides access to all the operations defined in DiagnosticsClient. */ +public interface DiagnosticsClient { + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHostingEnvironmentDetectorResponses(String resourceGroupName, String name); + + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHostingEnvironmentDetectorResponses( + String resourceGroupName, String name, Context context); + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DetectorResponseInner getHostingEnvironmentDetectorResponse( + String resourceGroupName, String name, String detectorName); + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getHostingEnvironmentDetectorResponseWithResponse( + String resourceGroupName, + String name, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDetectorResponses(String resourceGroupName, String siteName); + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDetectorResponses( + String resourceGroupName, String siteName, Context context); + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DetectorResponseInner getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName); + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteDetectorResponseWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDiagnosticCategories(String resourceGroupName, String siteName); + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDiagnosticCategories( + String resourceGroupName, String siteName, Context context); + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticCategoryInner getSiteDiagnosticCategory( + String resourceGroupName, String siteName, String diagnosticCategory); + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteDiagnosticCategoryWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, Context context); + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteAnalyses( + String resourceGroupName, String siteName, String diagnosticCategory); + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteAnalyses( + String resourceGroupName, String siteName, String diagnosticCategory, Context context); + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AnalysisDefinitionInner getSiteAnalysis( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName); + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteAnalysisWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, Context context); + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticAnalysisInner executeSiteAnalysis( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName); + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response executeSiteAnalysisWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDetectors( + String resourceGroupName, String siteName, String diagnosticCategory); + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDetectors( + String resourceGroupName, String siteName, String diagnosticCategory, Context context); + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DetectorDefinitionResourceInner getSiteDetector( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName); + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteDetectorWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, Context context); + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticDetectorResponseInner executeSiteDetector( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory); + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response executeSiteDetectorWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDetectorResponsesSlot( + String resourceGroupName, String siteName, String slot); + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDetectorResponsesSlot( + String resourceGroupName, String siteName, String slot, Context context); + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DetectorResponseInner getSiteDetectorResponseSlot( + String resourceGroupName, String siteName, String detectorName, String slot); + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteDetectorResponseSlotWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDiagnosticCategoriesSlot( + String resourceGroupName, String siteName, String slot); + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDiagnosticCategoriesSlot( + String resourceGroupName, String siteName, String slot, Context context); + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticCategoryInner getSiteDiagnosticCategorySlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot); + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteDiagnosticCategorySlotWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context); + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteAnalysesSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot); + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteAnalysesSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context); + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AnalysisDefinitionInner getSiteAnalysisSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot); + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteAnalysisSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + Context context); + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticAnalysisInner executeSiteAnalysisSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot); + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response executeSiteAnalysisSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDetectorsSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot); + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteDetectorsSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context); + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DetectorDefinitionResourceInner getSiteDetectorSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot); + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteDetectorSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String detectorName, + String slot, + Context context); + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticDetectorResponseInner executeSiteDetectorSlot( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot); + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response executeSiteDetectorSlotWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DomainRegistrationProvidersClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DomainRegistrationProvidersClient.java new file mode 100644 index 0000000000000..ffdaca9e084ee --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DomainRegistrationProvidersClient.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.appservice.generated.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.appservice.generated.fluent.models.CsmOperationDescriptionInner; + +/** An instance of this class provides access to all the operations defined in DomainRegistrationProvidersClient. */ +public interface DomainRegistrationProvidersClient { + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOperations(); + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOperations(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DomainsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DomainsClient.java new file mode 100644 index 0000000000000..9e65580fa88cb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/DomainsClient.java @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.DomainAvailabilityCheckResultInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainControlCenterSsoRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainOwnershipIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.models.DomainPatchResource; +import com.azure.resourcemanager.appservice.generated.models.DomainRecommendationSearchParameters; + +/** An instance of this class provides access to all the operations defined in DomainsClient. */ +public interface DomainsClient { + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainAvailabilityCheckResultInner checkAvailability(NameIdentifierInner identifier); + + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkAvailabilityWithResponse( + NameIdentifierInner identifier, Context context); + + /** + * Description for Get all domains in a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all domains in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainControlCenterSsoRequestInner getControlCenterSsoRequest(); + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getControlCenterSsoRequestWithResponse(Context context); + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendations(DomainRecommendationSearchParameters parameters); + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendations( + DomainRecommendationSearchParameters parameters, Context context); + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainInner getByResourceGroup(String resourceGroupName, String domainName); + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context); + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DomainInner> beginCreateOrUpdate( + String resourceGroupName, String domainName, DomainInner domain); + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DomainInner> beginCreateOrUpdate( + String resourceGroupName, String domainName, DomainInner domain, Context context); + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domain); + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domain, Context context); + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 domainName); + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default + * is <code>false</code> which deletes the domain after 24 hours. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String domainName, Boolean forceHardDeleteDomain, Context context); + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainInner update(String resourceGroupName, String domainName, DomainPatchResource domain); + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String domainName, DomainPatchResource domain, Context context); + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOwnershipIdentifiers(String resourceGroupName, String domainName); + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOwnershipIdentifiers( + String resourceGroupName, String domainName, Context context); + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainOwnershipIdentifierInner getOwnershipIdentifier(String resourceGroupName, String domainName, String name); + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getOwnershipIdentifierWithResponse( + String resourceGroupName, String domainName, String name, Context context); + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainOwnershipIdentifierInner createOrUpdateOwnershipIdentifier( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier); + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateOwnershipIdentifierWithResponse( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier, + Context context); + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteOwnershipIdentifier(String resourceGroupName, String domainName, String name); + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteOwnershipIdentifierWithResponse( + String resourceGroupName, String domainName, String name, Context context); + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainOwnershipIdentifierInner updateOwnershipIdentifier( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier); + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateOwnershipIdentifierWithResponse( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier, + Context context); + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 renew(String resourceGroupName, String domainName); + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response renewWithResponse(String resourceGroupName, String domainName, Context context); + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DomainInner transferOut(String resourceGroupName, String domainName); + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response transferOutWithResponse(String resourceGroupName, String domainName, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/GlobalsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/GlobalsClient.java new file mode 100644 index 0000000000000..df4ffe1dcb1ed --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/GlobalsClient.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.DeletedSiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in GlobalsClient. */ +public interface GlobalsClient { + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeletedSiteInner getDeletedWebApp(String deletedSiteId); + + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeletedWebAppWithResponse(String deletedSiteId, Context context); + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List getDeletedWebAppSnapshots(String deletedSiteId); + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> getDeletedWebAppSnapshotsWithResponse(String deletedSiteId, Context context); + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 getSubscriptionOperationWithAsyncResponse(String location, String operationId); + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSubscriptionOperationWithAsyncResponseWithResponse( + String location, String operationId, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/KubeEnvironmentsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/KubeEnvironmentsClient.java new file mode 100644 index 0000000000000..e79d9b01c77e7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/KubeEnvironmentsClient.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.KubeEnvironmentInner; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentPatchResource; + +/** An instance of this class provides access to all the operations defined in KubeEnvironmentsClient. */ +public interface KubeEnvironmentsClient { + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubeEnvironmentInner getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, KubeEnvironmentInner> beginCreateOrUpdate( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope); + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, KubeEnvironmentInner> beginCreateOrUpdate( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope, Context context); + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubeEnvironmentInner createOrUpdate( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope); + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubeEnvironmentInner createOrUpdate( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope, Context context); + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String name); + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context); + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name, Context context); + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KubeEnvironmentInner update( + String resourceGroupName, String name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope); + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ProvidersClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ProvidersClient.java new file mode 100644 index 0000000000000..1d156b091b008 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ProvidersClient.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.ApplicationStackResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionAppStackInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebAppStackInner; +import com.azure.resourcemanager.appservice.generated.models.ProviderOsTypeSelected; +import com.azure.resourcemanager.appservice.generated.models.ProviderStackOsType; + +/** An instance of this class provides access to all the operations defined in ProvidersClient. */ +public interface ProvidersClient { + /** + * Description for Get available application frameworks and their versions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getAvailableStacks(); + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getAvailableStacks( + ProviderOsTypeSelected osTypeSelected, Context context); + + /** + * Description for Get available Function app frameworks and their versions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getFunctionAppStacks(); + + /** + * Description for Get available Function app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getFunctionAppStacks(ProviderStackOsType stackOsType, Context context); + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getFunctionAppStacksForLocation(String location); + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getFunctionAppStacksForLocation( + String location, ProviderStackOsType stackOsType, Context context); + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getWebAppStacksForLocation(String location); + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getWebAppStacksForLocation( + String location, ProviderStackOsType stackOsType, Context context); + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOperations(); + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listOperations(Context context); + + /** + * Description for Get available Web app frameworks and their versions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getWebAppStacks(); + + /** + * Description for Get available Web app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getWebAppStacks(ProviderStackOsType stackOsType, Context context); + + /** + * Description for Get available application frameworks and their versions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(ProviderOsTypeSelected osTypeSelected, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/RecommendationsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/RecommendationsClient.java new file mode 100644 index 0000000000000..b805b8b23b7f0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/RecommendationsClient.java @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.RecommendationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationRuleInner; + +/** An instance of this class provides access to all the operations defined in RecommendationsClient. */ +public interface RecommendationsClient { + /** + * Description for List all recommendations for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Boolean featured, String filter, Context context); + + /** + * Description for Reset all recommendation opt-out settings for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.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 resetAllFilters(); + + /** + * Description for Reset all recommendation opt-out settings for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetAllFiltersWithResponse(Context context); + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableRecommendationForSubscription(String name); + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response disableRecommendationForSubscriptionWithResponse(String name, Context context); + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHistoryForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName); + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHistoryForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter, Context context); + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendedRulesForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName); + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendedRulesForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, Boolean featured, String filter, Context context); + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableAllForHostingEnvironment( + String resourceGroupName, String environmentName, String hostingEnvironmentName); + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response disableAllForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context); + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetAllFiltersForHostingEnvironment( + String resourceGroupName, String environmentName, String hostingEnvironmentName); + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetAllFiltersForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context); + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationRuleInner getRuleDetailsByHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, String name); + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getRuleDetailsByHostingEnvironmentWithResponse( + String resourceGroupName, + String hostingEnvironmentName, + String name, + Boolean updateSeen, + String recommendationId, + Context context); + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableRecommendationForHostingEnvironment( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName); + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response disableRecommendationForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName, Context context); + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHistoryForWebApp(String resourceGroupName, String siteName); + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHistoryForWebApp( + String resourceGroupName, String siteName, Boolean expiredOnly, String filter, Context context); + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendedRulesForWebApp(String resourceGroupName, String siteName); + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listRecommendedRulesForWebApp( + String resourceGroupName, String siteName, Boolean featured, String filter, Context context); + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableAllForWebApp(String resourceGroupName, String siteName); + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response disableAllForWebAppWithResponse(String resourceGroupName, String siteName, Context context); + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetAllFiltersForWebApp(String resourceGroupName, String siteName); + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetAllFiltersForWebAppWithResponse(String resourceGroupName, String siteName, Context context); + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RecommendationRuleInner getRuleDetailsByWebApp(String resourceGroupName, String siteName, String name); + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getRuleDetailsByWebAppWithResponse( + String resourceGroupName, + String siteName, + String name, + Boolean updateSeen, + String recommendationId, + Context context); + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableRecommendationForSite(String resourceGroupName, String siteName, String name); + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response disableRecommendationForSiteWithResponse( + String resourceGroupName, String siteName, String name, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ResourceHealthMetadatasClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ResourceHealthMetadatasClient.java new file mode 100644 index 0000000000000..e8e89b370a7ae --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ResourceHealthMetadatasClient.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.ResourceHealthMetadataInner; + +/** An instance of this class provides access to all the operations defined in ResourceHealthMetadatasClient. */ +public interface ResourceHealthMetadatasClient { + /** + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySite(String resourceGroupName, String name); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySite(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ResourceHealthMetadataInner getBySite(String resourceGroupName, String name); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBySiteWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySiteSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBySiteSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ResourceHealthMetadataInner getBySiteSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBySiteSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ResourceProvidersClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ResourceProvidersClient.java new file mode 100644 index 0000000000000..63222897dcae6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/ResourceProvidersClient.java @@ -0,0 +1,498 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.BillingMeterInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameSitesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentLocationsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.GeoRegionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnOfferInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceNameAvailabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfosInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SourceControlInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ValidateResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetValidationFailureDetailsInner; +import com.azure.resourcemanager.appservice.generated.models.CsmMoveResourceEnvelope; +import com.azure.resourcemanager.appservice.generated.models.ResourceNameAvailabilityRequest; +import com.azure.resourcemanager.appservice.generated.models.SkuName; +import com.azure.resourcemanager.appservice.generated.models.ValidateRequest; +import com.azure.resourcemanager.appservice.generated.models.VnetParameters; + +/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ +public interface ResourceProvidersClient { + /** + * Description for Gets publishing user. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UserInner getPublishingUser(); + + /** + * Description for Gets publishing user. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPublishingUserWithResponse(Context context); + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UserInner updatePublishingUser(UserInner userDetails); + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updatePublishingUserWithResponse(UserInner userDetails, Context context); + + /** + * Description for Gets the source controls available for Azure websites. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 source controls. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSourceControls(); + + /** + * Description for Gets the source controls available for Azure websites. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 source controls. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSourceControls(Context context); + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SourceControlInner getSourceControl(String sourceControlType); + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSourceControlWithResponse(String sourceControlType, Context context); + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SourceControlInner updateSourceControl(String sourceControlType, SourceControlInner requestMessage); + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSourceControlWithResponse( + String sourceControlType, SourceControlInner requestMessage, Context context); + + /** + * Description for Gets a list of meters for a given location. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource. + * @param osType App Service OS type meters used for. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String billingLocation, String osType, Context context); + + /** + * Description for Check if a resource name is available. + * + * @param request Name availability request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ResourceNameAvailabilityInner checkNameAvailability(ResourceNameAvailabilityRequest request); + + /** + * Description for Check if a resource name is available. + * + * @param request Name availability request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response checkNameAvailabilityWithResponse( + ResourceNameAvailabilityRequest request, Context context); + + /** + * Get custom hostnames under this subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostnames under this subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listCustomHostnameSites(); + + /** + * Get custom hostnames under this subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostnames under this subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listCustomHostnameSites(Context context); + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentLocationsInner getSubscriptionDeploymentLocations(); + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSubscriptionDeploymentLocationsWithResponse(Context context); + + /** + * Description for Get a list of available geographical regions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGeoRegions(); + + /** + * Description for Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions + * that support Linux Consumption Workers. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listGeoRegions( + SkuName sku, + Boolean linuxWorkersEnabled, + Boolean xenonWorkersEnabled, + Boolean linuxDynamicWorkersEnabled, + Context context); + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteIdentifiersAssignedToHostname(NameIdentifierInner nameIdentifier); + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteIdentifiersAssignedToHostname( + NameIdentifierInner nameIdentifier, Context context); + + /** + * Description for List all premier add-on offers. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPremierAddOnOffers(); + + /** + * Description for List all premier add-on offers. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPremierAddOnOffers(Context context); + + /** + * Description for List all SKUs. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SkuInfosInner listSkus(); + + /** + * Description for List all SKUs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSkusWithResponse(Context context); + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 class that describes the reason for a validation failure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetValidationFailureDetailsInner verifyHostingEnvironmentVnet(VnetParameters parameters); + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 class that describes the reason for a validation failure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response verifyHostingEnvironmentVnetWithResponse( + VnetParameters parameters, Context context); + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 move(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope); + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response moveWithResponse( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context); + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ValidateResponseInner validate(String resourceGroupName, ValidateRequest validateRequest); + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response validateWithResponse( + String resourceGroupName, ValidateRequest validateRequest, Context context); + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validateMove(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope); + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response validateMoveWithResponse( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/StaticSitesClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/StaticSitesClient.java new file mode 100644 index 0000000000000..549870c462354 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/StaticSitesClient.java @@ -0,0 +1,2245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteBuildArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteCustomDomainOverviewArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteFunctionOverviewArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserInvitationResponseResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSitesWorkflowPreviewInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringListInner; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainRequestPropertiesArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSitePatchResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteResetPropertiesArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationRequestResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteZipDeploymentArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSitesWorkflowPreviewRequest; + +/** An instance of this class provides access to all the operations defined in StaticSitesClient. */ +public interface StaticSitesClient { + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSitesWorkflowPreviewInner previewWorkflow( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest); + + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response previewWorkflowWithResponse( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Context context); + + /** + * Description for Get all Static Sites for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all Static Sites for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteArmResourceInner getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, StaticSiteArmResourceInner> beginCreateOrUpdateStaticSite( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope); + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, StaticSiteArmResourceInner> beginCreateOrUpdateStaticSite( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope, Context context); + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteArmResourceInner createOrUpdateStaticSite( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope); + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteArmResourceInner createOrUpdateStaticSite( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope, Context context); + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String name); + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context); + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name, Context context); + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteArmResourceInner updateStaticSite( + String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope); + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateStaticSiteWithResponse( + String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope, Context context); + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site custom users. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listStaticSiteUsers( + String resourceGroupName, String name, String authprovider); + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site custom users. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listStaticSiteUsers( + String resourceGroupName, String name, String authprovider, Context context); + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteUser(String resourceGroupName, String name, String authprovider, String userid); + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteStaticSiteUserWithResponse( + String resourceGroupName, String name, String authprovider, String userid, Context context); + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserArmResourceInner updateStaticSiteUser( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope); + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateStaticSiteUserWithResponse( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope, + Context context); + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site builds. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getStaticSiteBuilds(String resourceGroupName, String name); + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site builds. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getStaticSiteBuilds( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteBuildArmResourceInner getStaticSiteBuild(String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteStaticSiteBuild( + String resourceGroupName, String name, String environmentName); + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteStaticSiteBuild( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteBuild(String resourceGroupName, String name, String environmentName); + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteBuild(String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner createOrUpdateStaticSiteBuildAppSettings( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings); + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateStaticSiteBuildAppSettingsWithResponse( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context); + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner createOrUpdateStaticSiteBuildFunctionAppSettings( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings); + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponse( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context); + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listStaticSiteBuildFunctions( + String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listStaticSiteBuildFunctions( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listStaticSiteBuildAppSettings(String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listStaticSiteBuildAppSettingsWithResponse( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listStaticSiteBuildFunctionAppSettings( + String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listStaticSiteBuildFunctionAppSettingsWithResponse( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getUserProvidedFunctionAppsForStaticSiteBuild( + String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getUserProvidedFunctionAppsForStaticSiteBuild( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserProvidedFunctionAppArmResourceInner getUserProvidedFunctionAppForStaticSiteBuild( + String resourceGroupName, String name, String environmentName, String functionAppName); + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response + getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context); + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced); + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context); + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced); + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope); + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context); + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachUserProvidedFunctionAppFromStaticSiteBuild( + String resourceGroupName, String name, String environmentName, String functionAppName); + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response detachUserProvidedFunctionAppFromStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context); + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCreateZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope); + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCreateZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context); + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope); + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context); + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner createOrUpdateStaticSiteAppSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings); + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateStaticSiteAppSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context); + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner createOrUpdateStaticSiteFunctionAppSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings); + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateStaticSiteFunctionAppSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context); + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserInvitationResponseResourceInner createUserRolesInvitationLink( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope); + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createUserRolesInvitationLinkWithResponse( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, + Context context); + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site custom domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listStaticSiteCustomDomains( + String resourceGroupName, String name); + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site custom domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listStaticSiteCustomDomains( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteCustomDomainOverviewArmResourceInner getStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName); + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getStaticSiteCustomDomainWithResponse( + String resourceGroupName, String name, String domainName, Context context); + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, StaticSiteCustomDomainOverviewArmResourceInner> + beginCreateOrUpdateStaticSiteCustomDomain( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope); + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, StaticSiteCustomDomainOverviewArmResourceInner> + beginCreateOrUpdateStaticSiteCustomDomain( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context); + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteCustomDomainOverviewArmResourceInner createOrUpdateStaticSiteCustomDomain( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope); + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteCustomDomainOverviewArmResourceInner createOrUpdateStaticSiteCustomDomain( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context); + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName); + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDeleteStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName, Context context); + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteCustomDomain(String resourceGroupName, String name, String domainName); + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteCustomDomain(String resourceGroupName, String name, String domainName, Context context); + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginValidateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope); + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginValidateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context); + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope); + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context); + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDetachStaticSite(String resourceGroupName, String name); + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDetachStaticSite(String resourceGroupName, String name, Context context); + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachStaticSite(String resourceGroupName, String name); + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachStaticSite(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listStaticSiteFunctions( + String resourceGroupName, String name); + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listStaticSiteFunctions( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listStaticSiteAppSettings(String resourceGroupName, String name); + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listStaticSiteAppSettingsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringListInner listStaticSiteConfiguredRoles(String resourceGroupName, String name); + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listStaticSiteConfiguredRolesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listStaticSiteFunctionAppSettings(String resourceGroupName, String name); + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listStaticSiteFunctionAppSettingsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listStaticSiteSecrets(String resourceGroupName, String name); + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listStaticSiteSecretsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name); + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object deletePrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourcesWrapperInner getPrivateLinkResources(String resourceGroupName, String name); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetStaticSiteApiKey( + String resourceGroupName, String name, StaticSiteResetPropertiesArmResource resetPropertiesEnvelope); + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetStaticSiteApiKeyWithResponse( + String resourceGroupName, + String name, + StaticSiteResetPropertiesArmResource resetPropertiesEnvelope, + Context context); + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getUserProvidedFunctionAppsForStaticSite( + String resourceGroupName, String name); + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getUserProvidedFunctionAppsForStaticSite( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserProvidedFunctionAppArmResourceInner getUserProvidedFunctionAppForStaticSite( + String resourceGroupName, String name, String functionAppName); + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getUserProvidedFunctionAppForStaticSiteWithResponse( + String resourceGroupName, String name, String functionAppName, Context context); + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced); + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context); + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced); + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope); + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context); + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachUserProvidedFunctionAppFromStaticSite(String resourceGroupName, String name, String functionAppName); + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response detachUserProvidedFunctionAppFromStaticSiteWithResponse( + String resourceGroupName, String name, String functionAppName, Context context); + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCreateZipDeploymentForStaticSite( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope); + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginCreateZipDeploymentForStaticSite( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context); + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSite( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope); + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSite( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/TopLevelDomainsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/TopLevelDomainsClient.java new file mode 100644 index 0000000000000..edfe3d2bcca82 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/TopLevelDomainsClient.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.TldLegalAgreementInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TopLevelDomainInner; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomainAgreementOption; + +/** An instance of this class provides access to all the operations defined in TopLevelDomainsClient. */ +public interface TopLevelDomainsClient { + /** + * Description for Get all top-level domains supported for registration. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Top-level domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all top-level domains supported for registration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Top-level domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 top level domain object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TopLevelDomainInner get(String name); + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 top level domain object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String name, Context context); + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAgreements(String name, TopLevelDomainAgreementOption agreementOption); + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listAgreements( + String name, TopLevelDomainAgreementOption agreementOption, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/WebAppsClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/WebAppsClient.java new file mode 100644 index 0000000000000..2b6828c1d8616 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/WebAppsClient.java @@ -0,0 +1,14787 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.http.rest.StreamResponse; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApiKVReferenceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AzureStoragePropertyDictionaryResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupItemInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ConnectionStringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContinuousWebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameAnalysisResultInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionEnvelopeInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionSecretsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostKeysInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostnameBindingInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.KeyInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployLogInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployStatusInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MigrateMySqlStatusInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkFeaturesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkTraceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PerfMonResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessModuleInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessThreadInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PublicCertificateInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RelayServiceConnectionEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsV2Inner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteCloneabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigurationSnapshotInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteExtensionInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteLogsConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePhpErrorLogFlagInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSourceControlInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotConfigNamesResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotDifferenceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StorageMigrationResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SwiftVirtualNetworkInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredJobHistoryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredWebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebSiteInstanceStatusInner; +import com.azure.resourcemanager.appservice.generated.models.CsmPublishingProfileOptions; +import com.azure.resourcemanager.appservice.generated.models.CsmSlotEntity; +import com.azure.resourcemanager.appservice.generated.models.DeletedAppRestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.MSDeploy; +import com.azure.resourcemanager.appservice.generated.models.MigrateMySqlRequest; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOnPatchResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.SnapshotRestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.StorageMigrationOptions; +import java.io.InputStream; +import java.util.List; + +/** An instance of this class provides access to all the operations defined in WebAppsClient. */ +public interface WebAppsClient { + /** + * Description for Get all apps for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Description for Get all apps for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default + * is false, which only gives you the production slot of all apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Boolean includeSlots, Context context); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteInner> beginCreateOrUpdate( + String resourceGroupName, String name, SiteInner siteEnvelope); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteInner> beginCreateOrUpdate( + String resourceGroupName, String name, SiteInner siteEnvelope, Context context); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner createOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner createOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope, Context context); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String name); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse( + String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Context context); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner update(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String name, SitePatchResourceInner siteEnvelope, Context context); + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomHostnameAnalysisResultInner analyzeCustomHostname(String resourceGroupName, String name); + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostname Custom hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response analyzeCustomHostnameWithResponse( + String resourceGroupName, String name, String hostname, Context context); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response applySlotConfigToProductionWithResponse( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupItemInner backup(String resourceGroupName, String name, BackupRequestInner request); + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response backupWithResponse( + String resourceGroupName, String name, BackupRequestInner request, Context context); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBackups(String resourceGroupName, String name); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBackups(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupItemInner getBackupStatus(String resourceGroupName, String name, String backupId); + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBackupStatusWithResponse( + String resourceGroupName, String name, String backupId, Context context); + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteBackup(String resourceGroupName, String name, String backupId); + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteBackupWithResponse(String resourceGroupName, String name, String backupId, Context context); + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupItemInner listBackupStatusSecrets( + String resourceGroupName, String name, String backupId, BackupRequestInner request); + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listBackupStatusSecretsWithResponse( + String resourceGroupName, String name, String backupId, BackupRequestInner request, Context context); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestore( + String resourceGroupName, String name, String backupId, RestoreRequestInner request); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestore( + String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context); + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBasicPublishingCredentialsPolicies( + String resourceGroupName, String name); + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBasicPublishingCredentialsPolicies( + String resourceGroupName, String name, Context context); + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CsmPublishingCredentialsPoliciesEntityInner getFtpAllowed(String resourceGroupName, String name); + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFtpAllowedWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CsmPublishingCredentialsPoliciesEntityInner updateFtpAllowed( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateFtpAllowedWithResponse( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context); + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CsmPublishingCredentialsPoliciesEntityInner getScmAllowed(String resourceGroupName, String name); + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getScmAllowedWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CsmPublishingCredentialsPoliciesEntityInner updateScmAllowed( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateScmAllowedWithResponse( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context); + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurations(String resourceGroupName, String name); + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurations(String resourceGroupName, String name, Context context); + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner updateApplicationSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings); + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateApplicationSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context); + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listApplicationSettings(String resourceGroupName, String name); + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listApplicationSettingsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsInner updateAuthSettings( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings); + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateAuthSettingsWithResponse( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings, Context context); + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsInner getAuthSettings(String resourceGroupName, String name); + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAuthSettingsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsV2Inner getAuthSettingsV2WithoutSecrets(String resourceGroupName, String name); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAuthSettingsV2WithoutSecretsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsV2Inner updateAuthSettingsV2( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2); + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateAuthSettingsV2WithResponse( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2, Context context); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsV2Inner getAuthSettingsV2(String resourceGroupName, String name); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAuthSettingsV2WithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureStoragePropertyDictionaryResourceInner updateAzureStorageAccounts( + String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts); + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateAzureStorageAccountsWithResponse( + String resourceGroupName, + String name, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context); + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureStoragePropertyDictionaryResourceInner listAzureStorageAccounts(String resourceGroupName, String name); + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAzureStorageAccountsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupRequestInner updateBackupConfiguration(String resourceGroupName, String name, BackupRequestInner request); + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateBackupConfigurationWithResponse( + String resourceGroupName, String name, BackupRequestInner request, Context context); + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteBackupConfiguration(String resourceGroupName, String name); + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteBackupConfigurationWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupRequestInner getBackupConfiguration(String resourceGroupName, String name); + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBackupConfigurationWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getAppSettingsKeyVaultReferences(String resourceGroupName, String name); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getAppSettingsKeyVaultReferences( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiKVReferenceInner getAppSettingKeyVaultReference(String resourceGroupName, String name, String appSettingKey); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAppSettingKeyVaultReferenceWithResponse( + String resourceGroupName, String name, String appSettingKey, Context context); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getSiteConnectionStringKeyVaultReferences(String resourceGroupName, String name); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getSiteConnectionStringKeyVaultReferences( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiKVReferenceInner getSiteConnectionStringKeyVaultReference( + String resourceGroupName, String name, String connectionStringKey); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteConnectionStringKeyVaultReferenceWithResponse( + String resourceGroupName, String name, String connectionStringKey, Context context); + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectionStringDictionaryInner updateConnectionStrings( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings); + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateConnectionStringsWithResponse( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings, Context context); + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectionStringDictionaryInner listConnectionStrings(String resourceGroupName, String name); + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listConnectionStringsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteLogsConfigInner getDiagnosticLogsConfiguration(String resourceGroupName, String name); + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDiagnosticLogsConfigurationWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteLogsConfigInner updateDiagnosticLogsConfig( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig); + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateDiagnosticLogsConfigWithResponse( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig, Context context); + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner updateMetadata(String resourceGroupName, String name, StringDictionaryInner metadata); + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateMetadataWithResponse( + String resourceGroupName, String name, StringDictionaryInner metadata, Context context); + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listMetadata(String resourceGroupName, String name); + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listMetadataWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, UserInner> beginListPublishingCredentials(String resourceGroupName, String name); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, UserInner> beginListPublishingCredentials( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UserInner listPublishingCredentials(String resourceGroupName, String name); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UserInner listPublishingCredentials(String resourceGroupName, String name, Context context); + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PushSettingsInner updateSitePushSettings(String resourceGroupName, String name, PushSettingsInner pushSettings); + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSitePushSettingsWithResponse( + String resourceGroupName, String name, PushSettingsInner pushSettings, Context context); + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PushSettingsInner listSitePushSettings(String resourceGroupName, String name); + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSitePushSettingsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SlotConfigNamesResourceInner listSlotConfigurationNames(String resourceGroupName, String name); + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSlotConfigurationNamesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SlotConfigNamesResourceInner updateSlotConfigurationNames( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames); + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSlotConfigurationNamesWithResponse( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames, Context context); + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteConfigResourceInner getConfiguration(String resourceGroupName, String name); + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getConfigurationWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteConfigResourceInner createOrUpdateConfiguration( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateConfigurationWithResponse( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteConfigResourceInner updateConfiguration( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateConfigurationWithResponse( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context); + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurationSnapshotInfo( + String resourceGroupName, String name); + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurationSnapshotInfo( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteConfigResourceInner getConfigurationSnapshot(String resourceGroupName, String name, String snapshotId); + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getConfigurationSnapshotWithResponse( + String resourceGroupName, String name, String snapshotId, Context context); + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 recoverSiteConfigurationSnapshot(String resourceGroupName, String name, String snapshotId); + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response recoverSiteConfigurationSnapshotWithResponse( + String resourceGroupName, String name, String snapshotId, Context context); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream getWebSiteContainerLogs(String resourceGroupName, String name); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse getWebSiteContainerLogsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream getContainerLogsZip(String resourceGroupName, String name); + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse getContainerLogsZipWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listContinuousWebJobs(String resourceGroupName, String name); + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listContinuousWebJobs(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContinuousWebJobInner getContinuousWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteContinuousWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void startContinuousWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response startContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stopContinuousWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeployments(String resourceGroupName, String name); + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeployments(String resourceGroupName, String name, Context context); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentInner getDeployment(String resourceGroupName, String name, String id); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeploymentWithResponse( + String resourceGroupName, String name, String id, Context context); + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentInner createDeployment(String resourceGroupName, String name, String id, DeploymentInner deployment); + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createDeploymentWithResponse( + String resourceGroupName, String name, String id, DeploymentInner deployment, Context context); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDeployment(String resourceGroupName, String name, String id); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteDeploymentWithResponse(String resourceGroupName, String name, String id, Context context); + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentInner listDeploymentLog(String resourceGroupName, String name, String id); + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listDeploymentLogWithResponse( + String resourceGroupName, String name, String id, Context context); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RestoreRequestInner discoverBackup(String resourceGroupName, String name, RestoreRequestInner request); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response discoverBackupWithResponse( + String resourceGroupName, String name, RestoreRequestInner request, Context context); + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDomainOwnershipIdentifiers(String resourceGroupName, String name); + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDomainOwnershipIdentifiers( + String resourceGroupName, String name, Context context); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentifierInner getDomainOwnershipIdentifier( + String resourceGroupName, String name, String domainOwnershipIdentifierName); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDomainOwnershipIdentifierWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentifierInner createOrUpdateDomainOwnershipIdentifier( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateDomainOwnershipIdentifierWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier, + Context context); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDomainOwnershipIdentifier(String resourceGroupName, String name, String domainOwnershipIdentifierName); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteDomainOwnershipIdentifierWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentifierInner updateDomainOwnershipIdentifier( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateDomainOwnershipIdentifierWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier, + Context context); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner getMSDeployStatus(String resourceGroupName, String name); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMSDeployStatusWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner createMSDeployOperation(String resourceGroupName, String name, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner createMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployLogInner getMSDeployLog(String resourceGroupName, String name); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMSDeployLogWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listFunctions(String resourceGroupName, String name); + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listFunctions(String resourceGroupName, String name, Context context); + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String getFunctionsAdminToken(String resourceGroupName, String name); + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFunctionsAdminTokenWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @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 function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionEnvelopeInner getFunction(String resourceGroupName, String name, String functionName); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @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 function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFunctionWithResponse( + String resourceGroupName, String name, String functionName, Context context); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FunctionEnvelopeInner> beginCreateFunction( + String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FunctionEnvelopeInner> beginCreateFunction( + String resourceGroupName, + String name, + String functionName, + FunctionEnvelopeInner functionEnvelope, + Context context); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionEnvelopeInner createFunction( + String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionEnvelopeInner createFunction( + String resourceGroupName, + String name, + String functionName, + FunctionEnvelopeInner functionEnvelope, + Context context); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteFunction(String resourceGroupName, String name, String functionName); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteFunctionWithResponse( + String resourceGroupName, String name, String functionName, Context context); + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KeyInfoInner createOrUpdateFunctionSecret( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key); + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateFunctionSecretWithResponse( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key, Context context); + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteFunctionSecret(String resourceGroupName, String name, String functionName, String keyName); + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteFunctionSecretWithResponse( + String resourceGroupName, String name, String functionName, String keyName, Context context); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listFunctionKeys(String resourceGroupName, String name, String functionName); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listFunctionKeysWithResponse( + String resourceGroupName, String name, String functionName, Context context); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionSecretsInner listFunctionSecrets(String resourceGroupName, String name, String functionName); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listFunctionSecretsWithResponse( + String resourceGroupName, String name, String functionName, Context context); + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HostKeysInner listHostKeys(String resourceGroupName, String name); + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listHostKeysWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 listSyncStatus(String resourceGroupName, String name); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSyncStatusWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctions(String resourceGroupName, String name); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response syncFunctionsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KeyInfoInner createOrUpdateHostSecret( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key); + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateHostSecretWithResponse( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key, Context context); + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteHostSecret(String resourceGroupName, String name, String keyType, String keyName); + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteHostSecretWithResponse( + String resourceGroupName, String name, String keyType, String keyName, Context context); + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHostnameBindings(String resourceGroupName, String name); + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHostnameBindings(String resourceGroupName, String name, Context context); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HostnameBindingInner getHostnameBinding(String resourceGroupName, String name, String hostname); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, Context context); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HostnameBindingInner createOrUpdateHostnameBinding( + String resourceGroupName, String name, String hostname, HostnameBindingInner hostnameBinding); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, HostnameBindingInner hostnameBinding, Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteHostnameBinding(String resourceGroupName, String name, String hostname); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, Context context); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner getHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner createOrUpdateHybridConnection( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateHybridConnectionWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope, + Context context); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner updateHybridConnection( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateHybridConnectionWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope, + Context context); + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner listHybridConnections(String resourceGroupName, String name); + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listHybridConnectionsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RelayServiceConnectionEntityInner listRelayServiceConnections(String resourceGroupName, String name); + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listRelayServiceConnectionsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RelayServiceConnectionEntityInner getRelayServiceConnection( + String resourceGroupName, String name, String entityName); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getRelayServiceConnectionWithResponse( + String resourceGroupName, String name, String entityName, Context context); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RelayServiceConnectionEntityInner createOrUpdateRelayServiceConnection( + String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateRelayServiceConnectionWithResponse( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteRelayServiceConnection(String resourceGroupName, String name, String entityName); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteRelayServiceConnectionWithResponse( + String resourceGroupName, String name, String entityName, Context context); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RelayServiceConnectionEntityInner updateRelayServiceConnection( + String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateRelayServiceConnectionWithResponse( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceIdentifiers(String resourceGroupName, String name); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceIdentifiers( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebSiteInstanceStatusInner getInstanceInfo(String resourceGroupName, String name, String instanceId); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceInfoWithResponse( + String resourceGroupName, String name, String instanceId, Context context); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner getInstanceMsDeployStatus(String resourceGroupName, String name, String instanceId); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceMsDeployStatusWithResponse( + String resourceGroupName, String name, String instanceId, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner createInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner createInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployLogInner getInstanceMSDeployLog(String resourceGroupName, String name, String instanceId); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceMSDeployLogWithResponse( + String resourceGroupName, String name, String instanceId, Context context); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcesses(String resourceGroupName, String name, String instanceId); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcesses( + String resourceGroupName, String name, String instanceId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProcessInfoInner getInstanceProcess(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceProcessWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteInstanceProcess(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteInstanceProcessWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream getInstanceProcessDump(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse getInstanceProcessDumpWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessModules( + String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessModules( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProcessModuleInfoInner getInstanceProcessModule( + String resourceGroupName, String name, String processId, String baseAddress, String instanceId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceProcessModuleWithResponse( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String instanceId, + Context context); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessThreads( + String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessThreads( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteCloneabilityInner isCloneable(String resourceGroupName, String name); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response isCloneableWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteBackups(String resourceGroupName, String name); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteBackups(String resourceGroupName, String name, Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionSecretsInner listSyncFunctionTriggers(String resourceGroupName, String name); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSyncFunctionTriggersWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, StorageMigrationResponseInner> beginMigrateStorage( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions); + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, StorageMigrationResponseInner> beginMigrateStorage( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context); + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StorageMigrationResponseInner migrateStorage( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions); + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StorageMigrationResponseInner migrateStorage( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context); + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationInner> beginMigrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope); + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationInner> beginMigrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context); + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationInner migrateMySql(String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope); + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationInner migrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context); + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrateMySqlStatusInner getMigrateMySqlStatus(String resourceGroupName, String name); + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMigrateMySqlStatusWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SwiftVirtualNetworkInner getSwiftVirtualNetworkConnection(String resourceGroupName, String name); + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSwiftVirtualNetworkConnectionWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SwiftVirtualNetworkInner createOrUpdateSwiftVirtualNetworkConnectionWithCheck( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponse( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context); + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSwiftVirtualNetwork(String resourceGroupName, String name); + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteSwiftVirtualNetworkWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SwiftVirtualNetworkInner updateSwiftVirtualNetworkConnectionWithCheck( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSwiftVirtualNetworkConnectionWithCheckWithResponse( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context); + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFeaturesInner listNetworkFeatures(String resourceGroupName, String name, String view); + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listNetworkFeaturesWithResponse( + String resourceGroupName, String name, String view, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object getNetworkTraceOperation(String resourceGroupName, String name, String operationId); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getNetworkTraceOperationWithResponse( + String resourceGroupName, String name, String operationId, Context context); + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String startWebSiteNetworkTrace(String resourceGroupName, String name); + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response startWebSiteNetworkTraceWithResponse( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginStartWebSiteNetworkTraceOperation( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginStartWebSiteNetworkTraceOperation( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startWebSiteNetworkTraceOperation( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startWebSiteNetworkTraceOperation(String resourceGroupName, String name); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startWebSiteNetworkTraceOperation( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopWebSiteNetworkTrace(String resourceGroupName, String name); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopWebSiteNetworkTraceWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List getNetworkTraces(String resourceGroupName, String name, String operationId); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> getNetworkTracesWithResponse( + String resourceGroupName, String name, String operationId, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object getNetworkTraceOperationV2(String resourceGroupName, String name, String operationId); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getNetworkTraceOperationV2WithResponse( + String resourceGroupName, String name, String operationId, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List getNetworkTracesV2(String resourceGroupName, String name, String operationId); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> getNetworkTracesV2WithResponse( + String resourceGroupName, String name, String operationId, Context context); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 generateNewSitePublishingPassword(String resourceGroupName, String name); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateNewSitePublishingPasswordWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPerfMonCounters(String resourceGroupName, String name); + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPerfMonCounters( + String resourceGroupName, String name, String filter, Context context); + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SitePhpErrorLogFlagInner getSitePhpErrorLogFlag(String resourceGroupName, String name); + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSitePhpErrorLogFlagWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PremierAddOnInner listPremierAddOns(String resourceGroupName, String name); + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listPremierAddOnsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PremierAddOnInner getPremierAddOn(String resourceGroupName, String name, String premierAddOnName); + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPremierAddOnWithResponse( + String resourceGroupName, String name, String premierAddOnName, Context context); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PremierAddOnInner addPremierAddOn( + String resourceGroupName, String name, String premierAddOnName, PremierAddOnInner premierAddOn); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response addPremierAddOnWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + PremierAddOnInner premierAddOn, + Context context); + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePremierAddOn(String resourceGroupName, String name, String premierAddOnName); + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deletePremierAddOnWithResponse( + String resourceGroupName, String name, String premierAddOnName, Context context); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PremierAddOnInner updatePremierAddOn( + String resourceGroupName, String name, String premierAddOnName, PremierAddOnPatchResource premierAddOn); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updatePremierAddOnWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + PremierAddOnPatchResource premierAddOn, + Context context); + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner getPrivateAccess(String resourceGroupName, String name); + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateAccessWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner putPrivateAccessVnet(String resourceGroupName, String name, PrivateAccessInner access); + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response putPrivateAccessVnetWithResponse( + String resourceGroupName, String name, PrivateAccessInner access, Context context); + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name); + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object deletePrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourcesWrapperInner getPrivateLinkResources(String resourceGroupName, String name); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcesses(String resourceGroupName, String name); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcesses(String resourceGroupName, String name, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProcessInfoInner getProcess(String resourceGroupName, String name, String processId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getProcessWithResponse( + String resourceGroupName, String name, String processId, Context context); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteProcess(String resourceGroupName, String name, String processId); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteProcessWithResponse(String resourceGroupName, String name, String processId, Context context); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream getProcessDump(String resourceGroupName, String name, String processId); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse getProcessDumpWithResponse(String resourceGroupName, String name, String processId, Context context); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessModules(String resourceGroupName, String name, String processId); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessModules( + String resourceGroupName, String name, String processId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProcessModuleInfoInner getProcessModule( + String resourceGroupName, String name, String processId, String baseAddress); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getProcessModuleWithResponse( + String resourceGroupName, String name, String processId, String baseAddress, Context context); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessThreads(String resourceGroupName, String name, String processId); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessThreads( + String resourceGroupName, String name, String processId, Context context); + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPublicCertificates(String resourceGroupName, String name); + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPublicCertificates( + String resourceGroupName, String name, Context context); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicCertificateInner getPublicCertificate(String resourceGroupName, String name, String publicCertificateName); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPublicCertificateWithResponse( + String resourceGroupName, String name, String publicCertificateName, Context context); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicCertificateInner createOrUpdatePublicCertificate( + String resourceGroupName, String name, String publicCertificateName, PublicCertificateInner publicCertificate); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdatePublicCertificateWithResponse( + String resourceGroupName, + String name, + String publicCertificateName, + PublicCertificateInner publicCertificate, + Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePublicCertificate(String resourceGroupName, String name, String publicCertificateName); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deletePublicCertificateWithResponse( + String resourceGroupName, String name, String publicCertificateName, Context context); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream listPublishingProfileXmlWithSecrets( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse listPublishingProfileXmlWithSecretsWithResponse( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions, Context context); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetProductionSlotConfig(String resourceGroupName, String name); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetProductionSlotConfigWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restart(String resourceGroupName, String name); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response restartWithResponse( + String resourceGroupName, String name, Boolean softRestart, Boolean synchronous, Context context); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFromBackupBlob( + String resourceGroupName, String name, RestoreRequestInner request); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFromBackupBlob( + String resourceGroupName, String name, RestoreRequestInner request, Context context); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request, Context context); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedApp(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreSnapshot( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreSnapshot( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshot(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshot(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context); + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteExtensions(String resourceGroupName, String name); + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteExtensions(String resourceGroupName, String name, Context context); + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteExtensionInfoInner getSiteExtension(String resourceGroupName, String name, String siteExtensionId); + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteExtensionWithResponse( + String resourceGroupName, String name, String siteExtensionId, Context context); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtension( + String resourceGroupName, String name, String siteExtensionId); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtension( + String resourceGroupName, String name, String siteExtensionId, Context context); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteExtensionInfoInner installSiteExtension(String resourceGroupName, String name, String siteExtensionId); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteExtensionInfoInner installSiteExtension( + String resourceGroupName, String name, String siteExtensionId, Context context); + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSiteExtension(String resourceGroupName, String name, String siteExtensionId); + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteSiteExtensionWithResponse( + String resourceGroupName, String name, String siteExtensionId, Context context); + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSlots(String resourceGroupName, String name); + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSlots(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner getSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteInner> beginCreateOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteInner> beginCreateOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner createOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner createOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteSlotWithResponse( + String resourceGroupName, + String name, + String slot, + Boolean deleteMetrics, + Boolean deleteEmptyServerFarm, + Context context); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteInner updateSlot(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSlotWithResponse( + String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, Context context); + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CustomHostnameAnalysisResultInner analyzeCustomHostnameSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostname Custom hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response analyzeCustomHostnameSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 applySlotConfigurationSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response applySlotConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupItemInner backupSlot(String resourceGroupName, String name, String slot, BackupRequestInner request); + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response backupSlotWithResponse( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBackupsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBackupsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupItemInner getBackupStatusSlot(String resourceGroupName, String name, String backupId, String slot); + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBackupStatusSlotWithResponse( + String resourceGroupName, String name, String backupId, String slot, Context context); + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot); + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteBackupSlotWithResponse( + String resourceGroupName, String name, String backupId, String slot, Context context); + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupItemInner listBackupStatusSecretsSlot( + String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request); + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listBackupStatusSecretsSlotWithResponse( + String resourceGroupName, + String name, + String backupId, + String slot, + BackupRequestInner request, + Context context); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreSlot( + String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreSlot( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSlot( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context); + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBasicPublishingCredentialsPoliciesSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listBasicPublishingCredentialsPoliciesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CsmPublishingCredentialsPoliciesEntityInner getFtpAllowedSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFtpAllowedSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CsmPublishingCredentialsPoliciesEntityInner updateFtpAllowedSlot( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateFtpAllowedSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context); + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CsmPublishingCredentialsPoliciesEntityInner getScmAllowedSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getScmAllowedSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CsmPublishingCredentialsPoliciesEntityInner updateScmAllowedSlot( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateScmAllowedSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context); + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurationsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurationsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner updateApplicationSettingsSlot( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings); + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateApplicationSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings, Context context); + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listApplicationSettingsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listApplicationSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsInner updateAuthSettingsSlot( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings); + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateAuthSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings, Context context); + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsInner getAuthSettingsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAuthSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsV2Inner updateAuthSettingsV2Slot( + String resourceGroupName, String name, String slot, SiteAuthSettingsV2Inner siteAuthSettingsV2); + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateAuthSettingsV2SlotWithResponse( + String resourceGroupName, + String name, + String slot, + SiteAuthSettingsV2Inner siteAuthSettingsV2, + Context context); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteAuthSettingsV2Inner getAuthSettingsV2Slot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAuthSettingsV2SlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureStoragePropertyDictionaryResourceInner updateAzureStorageAccountsSlot( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts); + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateAzureStorageAccountsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context); + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AzureStoragePropertyDictionaryResourceInner listAzureStorageAccountsSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listAzureStorageAccountsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupRequestInner updateBackupConfigurationSlot( + String resourceGroupName, String name, String slot, BackupRequestInner request); + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context); + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteBackupConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BackupRequestInner getBackupConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getAppSettingsKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getAppSettingsKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiKVReferenceInner getAppSettingKeyVaultReferenceSlot( + String resourceGroupName, String name, String appSettingKey, String slot); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getAppSettingKeyVaultReferenceSlotWithResponse( + String resourceGroupName, String name, String appSettingKey, String slot, Context context); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getSiteConnectionStringKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getSiteConnectionStringKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ApiKVReferenceInner getSiteConnectionStringKeyVaultReferenceSlot( + String resourceGroupName, String name, String connectionStringKey, String slot); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteConnectionStringKeyVaultReferenceSlotWithResponse( + String resourceGroupName, String name, String connectionStringKey, String slot, Context context); + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectionStringDictionaryInner updateConnectionStringsSlot( + String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings); + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateConnectionStringsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + ConnectionStringDictionaryInner connectionStrings, + Context context); + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectionStringDictionaryInner listConnectionStringsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listConnectionStringsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteLogsConfigInner getDiagnosticLogsConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDiagnosticLogsConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteLogsConfigInner updateDiagnosticLogsConfigSlot( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig); + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateDiagnosticLogsConfigSlotWithResponse( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig, Context context); + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner updateMetadataSlot( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata); + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateMetadataSlotWithResponse( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata, Context context); + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listMetadataSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listMetadataSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, UserInner> beginListPublishingCredentialsSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, UserInner> beginListPublishingCredentialsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UserInner listPublishingCredentialsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + UserInner listPublishingCredentialsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PushSettingsInner updateSitePushSettingsSlot( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings); + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSitePushSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context); + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PushSettingsInner listSitePushSettingsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSitePushSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteConfigResourceInner getConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteConfigResourceInner createOrUpdateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteConfigResourceInner updateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context); + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurationSnapshotInfoSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listConfigurationSnapshotInfoSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteConfigResourceInner getConfigurationSnapshotSlot( + String resourceGroupName, String name, String snapshotId, String slot); + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getConfigurationSnapshotSlotWithResponse( + String resourceGroupName, String name, String snapshotId, String slot, Context context); + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 recoverSiteConfigurationSnapshotSlot(String resourceGroupName, String name, String snapshotId, String slot); + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response recoverSiteConfigurationSnapshotSlotWithResponse( + String resourceGroupName, String name, String snapshotId, String slot, Context context); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream getWebSiteContainerLogsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse getWebSiteContainerLogsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream getContainerLogsZipSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse getContainerLogsZipSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listContinuousWebJobsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listContinuousWebJobsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContinuousWebJobInner getContinuousWebJobSlot( + String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void startContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response startContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void stopContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeploymentsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDeploymentsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentInner getDeploymentSlot(String resourceGroupName, String name, String id, String slot); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context); + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentInner createDeploymentSlot( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment); + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment, Context context); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context); + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DeploymentInner listDeploymentLogSlot(String resourceGroupName, String name, String id, String slot); + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listDeploymentLogSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RestoreRequestInner discoverBackupSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response discoverBackupSlotWithResponse( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context); + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDomainOwnershipIdentifiersSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDomainOwnershipIdentifiersSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentifierInner getDomainOwnershipIdentifierSlot( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentifierInner createOrUpdateDomainOwnershipIdentifierSlot( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDomainOwnershipIdentifierSlot( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + IdentifierInner updateDomainOwnershipIdentifierSlot( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner getMSDeployStatusSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMSDeployStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployLogInner getMSDeployLogSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMSDeployLogSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @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 collection of Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceFunctionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @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 collection of Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceFunctionsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String getFunctionsAdminTokenSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getFunctionsAdminTokenSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @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 function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionEnvelopeInner getInstanceFunctionSlot( + String resourceGroupName, String name, String functionName, String slot); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @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 function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceFunctionSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FunctionEnvelopeInner> beginCreateInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, FunctionEnvelopeInner> beginCreateInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionEnvelopeInner createInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionEnvelopeInner createInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteInstanceFunctionSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context); + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KeyInfoInner createOrUpdateFunctionSecretSlot( + String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key); + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateFunctionSecretSlotWithResponse( + String resourceGroupName, + String name, + String functionName, + String keyName, + String slot, + KeyInfoInner key, + Context context); + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteFunctionSecretSlot( + String resourceGroupName, String name, String functionName, String keyName, String slot); + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteFunctionSecretSlotWithResponse( + String resourceGroupName, String name, String functionName, String keyName, String slot, Context context); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StringDictionaryInner listFunctionKeysSlot(String resourceGroupName, String name, String functionName, String slot); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listFunctionKeysSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionSecretsInner listFunctionSecretsSlot( + String resourceGroupName, String name, String functionName, String slot); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listFunctionSecretsSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context); + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HostKeysInner listHostKeysSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listHostKeysSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 listSyncStatusSlot(String resourceGroupName, String name, String slot); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSyncStatusSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response syncFunctionsSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + KeyInfoInner createOrUpdateHostSecretSlot( + String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key); + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateHostSecretSlotWithResponse( + String resourceGroupName, + String name, + String keyType, + String keyName, + String slot, + KeyInfoInner key, + Context context); + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteHostSecretSlot(String resourceGroupName, String name, String keyType, String keyName, String slot); + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteHostSecretSlotWithResponse( + String resourceGroupName, String name, String keyType, String keyName, String slot, Context context); + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHostnameBindingsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listHostnameBindingsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HostnameBindingInner getHostnameBindingSlot(String resourceGroupName, String name, String slot, String hostname); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getHostnameBindingSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HostnameBindingInner createOrUpdateHostnameBindingSlot( + String resourceGroupName, String name, String hostname, String slot, HostnameBindingInner hostnameBinding); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateHostnameBindingSlotWithResponse( + String resourceGroupName, + String name, + String hostname, + String slot, + HostnameBindingInner hostnameBinding, + Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteHostnameBindingSlot(String resourceGroupName, String name, String slot, String hostname); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteHostnameBindingSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner getHybridConnectionSlot( + String resourceGroupName, String name, String namespaceName, String relayName, String slot); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getHybridConnectionSlotWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner createOrUpdateHybridConnectionSlot( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateHybridConnectionSlotWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteHybridConnectionSlot( + String resourceGroupName, String name, String namespaceName, String relayName, String slot); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteHybridConnectionSlotWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner updateHybridConnectionSlot( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateHybridConnectionSlotWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context); + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + HybridConnectionInner listHybridConnectionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listHybridConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RelayServiceConnectionEntityInner listRelayServiceConnectionsSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listRelayServiceConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RelayServiceConnectionEntityInner getRelayServiceConnectionSlot( + String resourceGroupName, String name, String entityName, String slot); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getRelayServiceConnectionSlotWithResponse( + String resourceGroupName, String name, String entityName, String slot, Context context); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RelayServiceConnectionEntityInner createOrUpdateRelayServiceConnectionSlot( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateRelayServiceConnectionSlotWithResponse( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteRelayServiceConnectionSlotWithResponse( + String resourceGroupName, String name, String entityName, String slot, Context context); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RelayServiceConnectionEntityInner updateRelayServiceConnectionSlot( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateRelayServiceConnectionSlotWithResponse( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceIdentifiersSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceIdentifiersSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebSiteInstanceStatusInner getInstanceInfoSlot( + String resourceGroupName, String name, String instanceId, String slot); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceInfoSlotWithResponse( + String resourceGroupName, String name, String instanceId, String slot, Context context); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner getInstanceMsDeployStatusSlot( + String resourceGroupName, String name, String slot, String instanceId); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceMsDeployStatusSlotWithResponse( + String resourceGroupName, String name, String slot, String instanceId, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner createInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployStatusInner createInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MSDeployLogInner getInstanceMSDeployLogSlot(String resourceGroupName, String name, String slot, String instanceId); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceMSDeployLogSlotWithResponse( + String resourceGroupName, String name, String slot, String instanceId, Context context); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessesSlot( + String resourceGroupName, String name, String slot, String instanceId); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessesSlot( + String resourceGroupName, String name, String slot, String instanceId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProcessInfoInner getInstanceProcessSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteInstanceProcessSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteInstanceProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream getInstanceProcessDumpSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse getInstanceProcessDumpSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProcessModuleInfoInner getInstanceProcessModuleSlot( + String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getInstanceProcessModuleSlotWithResponse( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String slot, + String instanceId, + Context context); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listInstanceProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteCloneabilityInner isCloneableSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response isCloneableSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteBackupsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteBackupsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + FunctionSecretsInner listSyncFunctionTriggersSlot(String resourceGroupName, String name, String slot); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSyncFunctionTriggersSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + MigrateMySqlStatusInner getMigrateMySqlStatusSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getMigrateMySqlStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SwiftVirtualNetworkInner getSwiftVirtualNetworkConnectionSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSwiftVirtualNetworkConnectionSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SwiftVirtualNetworkInner createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context); + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSwiftVirtualNetworkSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteSwiftVirtualNetworkSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SwiftVirtualNetworkInner updateSwiftVirtualNetworkConnectionWithCheckSlot( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context); + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkFeaturesInner listNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot); + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listNetworkFeaturesSlotWithResponse( + String resourceGroupName, String name, String view, String slot, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object getNetworkTraceOperationSlot(String resourceGroupName, String name, String operationId, String slot); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getNetworkTraceOperationSlotWithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context); + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String startWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response startWebSiteNetworkTraceSlotWithResponse( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginStartWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginStartWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startWebSiteNetworkTraceOperationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopWebSiteNetworkTraceSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List getNetworkTracesSlot( + String resourceGroupName, String name, String operationId, String slot); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> getNetworkTracesSlotWithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object getNetworkTraceOperationSlotV2(String resourceGroupName, String name, String operationId, String slot); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getNetworkTraceOperationSlotV2WithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List getNetworkTracesSlotV2( + String resourceGroupName, String name, String operationId, String slot); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> getNetworkTracesSlotV2WithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 generateNewSitePublishingPasswordSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response generateNewSitePublishingPasswordSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPerfMonCountersSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPerfMonCountersSlot( + String resourceGroupName, String name, String slot, String filter, Context context); + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SitePhpErrorLogFlagInner getSitePhpErrorLogFlagSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSitePhpErrorLogFlagSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PremierAddOnInner listPremierAddOnsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listPremierAddOnsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PremierAddOnInner getPremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot); + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPremierAddOnSlotWithResponse( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PremierAddOnInner addPremierAddOnSlot( + String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response addPremierAddOnSlotWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnInner premierAddOn, + Context context); + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot); + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deletePremierAddOnSlotWithResponse( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PremierAddOnInner updatePremierAddOnSlot( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updatePremierAddOnSlotWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn, + Context context); + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner getPrivateAccessSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateAccessSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateAccessInner putPrivateAccessVnetSlot( + String resourceGroupName, String name, String slot, PrivateAccessInner access); + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response putPrivateAccessVnetSlotWithResponse( + String resourceGroupName, String name, String slot, PrivateAccessInner access, Context context); + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getPrivateEndpointConnectionListSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable getPrivateEndpointConnectionListSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner getPrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateEndpointConnectionSlotWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginDeletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginDeletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object deletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object deletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourcesWrapperInner getPrivateLinkResourcesSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPrivateLinkResourcesSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessesSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProcessInfoInner getProcessSlot(String resourceGroupName, String name, String processId, String slot); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteProcessSlot(String resourceGroupName, String name, String processId, String slot); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream getProcessDumpSlot(String resourceGroupName, String name, String processId, String slot); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse getProcessDumpSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ProcessModuleInfoInner getProcessModuleSlot( + String resourceGroupName, String name, String processId, String baseAddress, String slot); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getProcessModuleSlotWithResponse( + String resourceGroupName, String name, String processId, String baseAddress, String slot, Context context); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPublicCertificatesSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listPublicCertificatesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicCertificateInner getPublicCertificateSlot( + String resourceGroupName, String name, String slot, String publicCertificateName); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getPublicCertificateSlotWithResponse( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PublicCertificateInner createOrUpdatePublicCertificateSlot( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdatePublicCertificateSlotWithResponse( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate, + Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePublicCertificateSlot(String resourceGroupName, String name, String slot, String publicCertificateName); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deletePublicCertificateSlotWithResponse( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + InputStream listPublishingProfileXmlWithSecretsSlot( + String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + StreamResponse listPublishingProfileXmlWithSecretsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingProfileOptions publishingProfileOptions, + Context context); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetSlotConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response resetSlotConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restartSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response restartSlotWithResponse( + String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous, Context context); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlobSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginRestoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshotSlot(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context); + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 collection of Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteExtensionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 collection of Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSiteExtensionsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteExtensionInfoInner getSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSiteExtensionSlotWithResponse( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteExtensionInfoInner installSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteExtensionInfoInner installSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context); + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteSiteExtensionSlotWithResponse( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSlotDifferencesSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSlotDifferencesSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSwapSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSwapSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSnapshotsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSnapshotsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSnapshotsFromDRSecondarySlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSnapshotsFromDRSecondarySlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSourceControlInner getSourceControlSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSourceControlInner createOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSourceControlInner createOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSourceControlSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @param additionalFlags The additionalFlags parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, String additionalFlags, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSourceControlInner updateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 startSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response startSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginStartNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginStartNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startNetworkTraceSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopNetworkTraceSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopNetworkTraceSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncRepositorySlot(String resourceGroupName, String name, String slot); + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response syncRepositorySlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctionTriggersSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response syncFunctionTriggersSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listTriggeredWebJobsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listTriggeredWebJobsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TriggeredWebJobInner getTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TriggeredJobHistoryInner getTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String id, String slot); + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getTriggeredWebJobHistorySlotWithResponse( + String resourceGroupName, String name, String webJobName, String id, String slot, Context context); + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void runTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response runTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUsagesSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUsagesSlot( + String resourceGroupName, String name, String slot, String filter, Context context); + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List listVnetConnectionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> listVnetConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetInfoResourceInner getVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVnetConnectionSlotWithResponse( + String resourceGroupName, String name, String vnetName, String slot, Context context); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetInfoResourceInner createOrUpdateVnetConnectionSlot( + String resourceGroupName, String name, String vnetName, String slot, VnetInfoResourceInner connectionEnvelope); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateVnetConnectionSlotWithResponse( + String resourceGroupName, + String name, + String vnetName, + String slot, + VnetInfoResourceInner connectionEnvelope, + Context context); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteVnetConnectionSlotWithResponse( + String resourceGroupName, String name, String vnetName, String slot, Context context); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetInfoResourceInner updateVnetConnectionSlot( + String resourceGroupName, String name, String vnetName, String slot, VnetInfoResourceInner connectionEnvelope); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateVnetConnectionSlotWithResponse( + String resourceGroupName, + String name, + String vnetName, + String slot, + VnetInfoResourceInner connectionEnvelope, + Context context); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetGatewayInner getVnetConnectionGatewaySlot( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVnetConnectionGatewaySlotWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot, Context context); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetGatewayInner createOrUpdateVnetConnectionGatewaySlot( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateVnetConnectionGatewaySlotWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope, + Context context); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetGatewayInner updateVnetConnectionGatewaySlot( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateVnetConnectionGatewaySlotWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope, + Context context); + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebJobsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebJobsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebJobInner getWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSlotDifferencesFromProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSlotDifferencesFromProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSwapSlotWithProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSwapSlotWithProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSnapshots(String resourceGroupName, String name); + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSnapshots(String resourceGroupName, String name, Context context); + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSnapshotsFromDRSecondary(String resourceGroupName, String name); + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listSnapshotsFromDRSecondary(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSourceControlInner getSourceControl(String resourceGroupName, String name); + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getSourceControlWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSourceControlInner createOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSourceControlInner createOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteSourceControl(String resourceGroupName, String name); + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param additionalFlags The additionalFlags parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteSourceControlWithResponse( + String resourceGroupName, String name, String additionalFlags, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SiteSourceControlInner updateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateSourceControlWithResponse( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 start(String resourceGroupName, String name); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response startWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginStartNetworkTrace( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Object> beginStartNetworkTrace( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startNetworkTrace( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startNetworkTrace(String resourceGroupName, String name); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Object startNetworkTrace( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stop(String resourceGroupName, String name); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopNetworkTrace(String resourceGroupName, String name); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response stopNetworkTraceWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncRepository(String resourceGroupName, String name); + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response syncRepositoryWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctionTriggers(String resourceGroupName, String name); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response syncFunctionTriggersWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listTriggeredWebJobs(String resourceGroupName, String name); + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listTriggeredWebJobs(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TriggeredWebJobInner getTriggeredWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteTriggeredWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName); + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + TriggeredJobHistoryInner getTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName, String id); + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getTriggeredWebJobHistoryWithResponse( + String resourceGroupName, String name, String webJobName, String id, Context context); + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void runTriggeredWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response runTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUsages(String resourceGroupName, String name); + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listUsages(String resourceGroupName, String name, String filter, Context context); + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + List listVnetConnections(String resourceGroupName, String name); + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response> listVnetConnectionsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetInfoResourceInner getVnetConnection(String resourceGroupName, String name, String vnetName); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVnetConnectionWithResponse( + String resourceGroupName, String name, String vnetName, Context context); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetInfoResourceInner createOrUpdateVnetConnection( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateVnetConnectionWithResponse( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void deleteVnetConnection(String resourceGroupName, String name, String vnetName); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteVnetConnectionWithResponse( + String resourceGroupName, String name, String vnetName, Context context); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetInfoResourceInner updateVnetConnection( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateVnetConnectionWithResponse( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetGatewayInner getVnetConnectionGateway( + String resourceGroupName, String name, String vnetName, String gatewayName); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getVnetConnectionGatewayWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetGatewayInner createOrUpdateVnetConnectionGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateVnetConnectionGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + VnetGatewayInner updateVnetConnectionGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateVnetConnectionGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context); + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebJobs(String resourceGroupName, String name); + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWebJobs(String resourceGroupName, String name, Context context); + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + WebJobInner getWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/WebSiteManagementClient.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/WebSiteManagementClient.java new file mode 100644 index 0000000000000..bbc60995f7987 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/WebSiteManagementClient.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.appservice.generated.fluent; + +import com.azure.core.http.HttpPipeline; +import java.time.Duration; + +/** The interface for WebSiteManagementClient class. */ +public interface WebSiteManagementClient { + /** + * Gets Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + String getEndpoint(); + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + String getApiVersion(); + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + HttpPipeline getHttpPipeline(); + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + Duration getDefaultPollInterval(); + + /** + * Gets the AppServiceCertificateOrdersClient object to access its operations. + * + * @return the AppServiceCertificateOrdersClient object. + */ + AppServiceCertificateOrdersClient getAppServiceCertificateOrders(); + + /** + * Gets the CertificateOrdersDiagnosticsClient object to access its operations. + * + * @return the CertificateOrdersDiagnosticsClient object. + */ + CertificateOrdersDiagnosticsClient getCertificateOrdersDiagnostics(); + + /** + * Gets the CertificateRegistrationProvidersClient object to access its operations. + * + * @return the CertificateRegistrationProvidersClient object. + */ + CertificateRegistrationProvidersClient getCertificateRegistrationProviders(); + + /** + * Gets the DomainsClient object to access its operations. + * + * @return the DomainsClient object. + */ + DomainsClient getDomains(); + + /** + * Gets the TopLevelDomainsClient object to access its operations. + * + * @return the TopLevelDomainsClient object. + */ + TopLevelDomainsClient getTopLevelDomains(); + + /** + * Gets the DomainRegistrationProvidersClient object to access its operations. + * + * @return the DomainRegistrationProvidersClient object. + */ + DomainRegistrationProvidersClient getDomainRegistrationProviders(); + + /** + * Gets the AppServiceEnvironmentsClient object to access its operations. + * + * @return the AppServiceEnvironmentsClient object. + */ + AppServiceEnvironmentsClient getAppServiceEnvironments(); + + /** + * Gets the AppServicePlansClient object to access its operations. + * + * @return the AppServicePlansClient object. + */ + AppServicePlansClient getAppServicePlans(); + + /** + * Gets the CertificatesClient object to access its operations. + * + * @return the CertificatesClient object. + */ + CertificatesClient getCertificates(); + + /** + * Gets the ContainerAppsClient object to access its operations. + * + * @return the ContainerAppsClient object. + */ + ContainerAppsClient getContainerApps(); + + /** + * Gets the ContainerAppsRevisionsClient object to access its operations. + * + * @return the ContainerAppsRevisionsClient object. + */ + ContainerAppsRevisionsClient getContainerAppsRevisions(); + + /** + * Gets the DeletedWebAppsClient object to access its operations. + * + * @return the DeletedWebAppsClient object. + */ + DeletedWebAppsClient getDeletedWebApps(); + + /** + * Gets the DiagnosticsClient object to access its operations. + * + * @return the DiagnosticsClient object. + */ + DiagnosticsClient getDiagnostics(); + + /** + * Gets the GlobalsClient object to access its operations. + * + * @return the GlobalsClient object. + */ + GlobalsClient getGlobals(); + + /** + * Gets the KubeEnvironmentsClient object to access its operations. + * + * @return the KubeEnvironmentsClient object. + */ + KubeEnvironmentsClient getKubeEnvironments(); + + /** + * Gets the ProvidersClient object to access its operations. + * + * @return the ProvidersClient object. + */ + ProvidersClient getProviders(); + + /** + * Gets the RecommendationsClient object to access its operations. + * + * @return the RecommendationsClient object. + */ + RecommendationsClient getRecommendations(); + + /** + * Gets the ResourceHealthMetadatasClient object to access its operations. + * + * @return the ResourceHealthMetadatasClient object. + */ + ResourceHealthMetadatasClient getResourceHealthMetadatas(); + + /** + * Gets the ResourceProvidersClient object to access its operations. + * + * @return the ResourceProvidersClient object. + */ + ResourceProvidersClient getResourceProviders(); + + /** + * Gets the StaticSitesClient object to access its operations. + * + * @return the StaticSitesClient object. + */ + StaticSitesClient getStaticSites(); + + /** + * Gets the WebAppsClient object to access its operations. + * + * @return the WebAppsClient object. + */ + WebAppsClient getWebApps(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AddressResponseInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AddressResponseInner.java new file mode 100644 index 0000000000000..16eb8e72170ad --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AddressResponseInner.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.VirtualIpMapping; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Describes main public IP address and any extra virtual IPs. */ +@Fluent +public final class AddressResponseInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressResponseInner.class); + + /* + * AddressResponse resource specific properties + */ + @JsonProperty(value = "properties") + private AddressResponseProperties innerProperties; + + /** + * Get the innerProperties property: AddressResponse resource specific properties. + * + * @return the innerProperties value. + */ + private AddressResponseProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public AddressResponseInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the serviceIpAddress property: Main public virtual IP. + * + * @return the serviceIpAddress value. + */ + public String serviceIpAddress() { + return this.innerProperties() == null ? null : this.innerProperties().serviceIpAddress(); + } + + /** + * Set the serviceIpAddress property: Main public virtual IP. + * + * @param serviceIpAddress the serviceIpAddress value to set. + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withServiceIpAddress(String serviceIpAddress) { + if (this.innerProperties() == null) { + this.innerProperties = new AddressResponseProperties(); + } + this.innerProperties().withServiceIpAddress(serviceIpAddress); + return this; + } + + /** + * Get the internalIpAddress property: Virtual Network internal IP address of the App Service Environment if it is + * in internal load-balancing mode. + * + * @return the internalIpAddress value. + */ + public String internalIpAddress() { + return this.innerProperties() == null ? null : this.innerProperties().internalIpAddress(); + } + + /** + * Set the internalIpAddress property: Virtual Network internal IP address of the App Service Environment if it is + * in internal load-balancing mode. + * + * @param internalIpAddress the internalIpAddress value to set. + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withInternalIpAddress(String internalIpAddress) { + if (this.innerProperties() == null) { + this.innerProperties = new AddressResponseProperties(); + } + this.innerProperties().withInternalIpAddress(internalIpAddress); + return this; + } + + /** + * Get the outboundIpAddresses property: IP addresses appearing on outbound connections. + * + * @return the outboundIpAddresses value. + */ + public List outboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().outboundIpAddresses(); + } + + /** + * Set the outboundIpAddresses property: IP addresses appearing on outbound connections. + * + * @param outboundIpAddresses the outboundIpAddresses value to set. + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withOutboundIpAddresses(List outboundIpAddresses) { + if (this.innerProperties() == null) { + this.innerProperties = new AddressResponseProperties(); + } + this.innerProperties().withOutboundIpAddresses(outboundIpAddresses); + return this; + } + + /** + * Get the vipMappings property: Additional virtual IPs. + * + * @return the vipMappings value. + */ + public List vipMappings() { + return this.innerProperties() == null ? null : this.innerProperties().vipMappings(); + } + + /** + * Set the vipMappings property: Additional virtual IPs. + * + * @param vipMappings the vipMappings value to set. + * @return the AddressResponseInner object itself. + */ + public AddressResponseInner withVipMappings(List vipMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new AddressResponseProperties(); + } + this.innerProperties().withVipMappings(vipMappings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AddressResponseProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AddressResponseProperties.java new file mode 100644 index 0000000000000..ddc6eebf1975c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AddressResponseProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.VirtualIpMapping; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** AddressResponse resource specific properties. */ +@Fluent +public final class AddressResponseProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AddressResponseProperties.class); + + /* + * Main public virtual IP. + */ + @JsonProperty(value = "serviceIpAddress") + private String serviceIpAddress; + + /* + * Virtual Network internal IP address of the App Service Environment if it + * is in internal load-balancing mode. + */ + @JsonProperty(value = "internalIpAddress") + private String internalIpAddress; + + /* + * IP addresses appearing on outbound connections. + */ + @JsonProperty(value = "outboundIpAddresses") + private List outboundIpAddresses; + + /* + * Additional virtual IPs. + */ + @JsonProperty(value = "vipMappings") + private List vipMappings; + + /** + * Get the serviceIpAddress property: Main public virtual IP. + * + * @return the serviceIpAddress value. + */ + public String serviceIpAddress() { + return this.serviceIpAddress; + } + + /** + * Set the serviceIpAddress property: Main public virtual IP. + * + * @param serviceIpAddress the serviceIpAddress value to set. + * @return the AddressResponseProperties object itself. + */ + public AddressResponseProperties withServiceIpAddress(String serviceIpAddress) { + this.serviceIpAddress = serviceIpAddress; + return this; + } + + /** + * Get the internalIpAddress property: Virtual Network internal IP address of the App Service Environment if it is + * in internal load-balancing mode. + * + * @return the internalIpAddress value. + */ + public String internalIpAddress() { + return this.internalIpAddress; + } + + /** + * Set the internalIpAddress property: Virtual Network internal IP address of the App Service Environment if it is + * in internal load-balancing mode. + * + * @param internalIpAddress the internalIpAddress value to set. + * @return the AddressResponseProperties object itself. + */ + public AddressResponseProperties withInternalIpAddress(String internalIpAddress) { + this.internalIpAddress = internalIpAddress; + return this; + } + + /** + * Get the outboundIpAddresses property: IP addresses appearing on outbound connections. + * + * @return the outboundIpAddresses value. + */ + public List outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Set the outboundIpAddresses property: IP addresses appearing on outbound connections. + * + * @param outboundIpAddresses the outboundIpAddresses value to set. + * @return the AddressResponseProperties object itself. + */ + public AddressResponseProperties withOutboundIpAddresses(List outboundIpAddresses) { + this.outboundIpAddresses = outboundIpAddresses; + return this; + } + + /** + * Get the vipMappings property: Additional virtual IPs. + * + * @return the vipMappings value. + */ + public List vipMappings() { + return this.vipMappings; + } + + /** + * Set the vipMappings property: Additional virtual IPs. + * + * @param vipMappings the vipMappings value to set. + * @return the AddressResponseProperties object itself. + */ + public AddressResponseProperties withVipMappings(List vipMappings) { + this.vipMappings = vipMappings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vipMappings() != null) { + vipMappings().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AnalysisDefinitionInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AnalysisDefinitionInner.java new file mode 100644 index 0000000000000..47978a951c948 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AnalysisDefinitionInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Definition of Analysis. */ +@Fluent +public final class AnalysisDefinitionInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AnalysisDefinitionInner.class); + + /* + * AnalysisDefinition resource specific properties + */ + @JsonProperty(value = "properties") + private AnalysisDefinitionProperties innerProperties; + + /** + * Get the innerProperties property: AnalysisDefinition resource specific properties. + * + * @return the innerProperties value. + */ + private AnalysisDefinitionProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public AnalysisDefinitionInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the description property: Description of the Analysis. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AnalysisDefinitionProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AnalysisDefinitionProperties.java new file mode 100644 index 0000000000000..4fc328ffe1ed3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AnalysisDefinitionProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** AnalysisDefinition resource specific properties. */ +@Immutable +public final class AnalysisDefinitionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AnalysisDefinitionProperties.class); + + /* + * Description of the Analysis + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the description property: Description of the Analysis. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApiKVReferenceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApiKVReferenceInner.java new file mode 100644 index 0000000000000..e2ac3ef761424 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApiKVReferenceInner.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ConfigReferenceSource; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.ResolveStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Description of site key vault references. */ +@Fluent +public final class ApiKVReferenceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiKVReferenceInner.class); + + /* + * ApiKVReference resource specific properties + */ + @JsonProperty(value = "properties") + private ApiKVReferenceProperties innerProperties; + + /** + * Get the innerProperties property: ApiKVReference resource specific properties. + * + * @return the innerProperties value. + */ + private ApiKVReferenceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ApiKVReferenceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the reference property: The reference property. + * + * @return the reference value. + */ + public String reference() { + return this.innerProperties() == null ? null : this.innerProperties().reference(); + } + + /** + * Set the reference property: The reference property. + * + * @param reference the reference value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withReference(String reference) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withReference(reference); + return this; + } + + /** + * Get the status property: The status property. + * + * @return the status value. + */ + public ResolveStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withStatus(ResolveStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the vaultName property: The vaultName property. + * + * @return the vaultName value. + */ + public String vaultName() { + return this.innerProperties() == null ? null : this.innerProperties().vaultName(); + } + + /** + * Set the vaultName property: The vaultName property. + * + * @param vaultName the vaultName value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withVaultName(String vaultName) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withVaultName(vaultName); + return this; + } + + /** + * Get the secretName property: The secretName property. + * + * @return the secretName value. + */ + public String secretName() { + return this.innerProperties() == null ? null : this.innerProperties().secretName(); + } + + /** + * Set the secretName property: The secretName property. + * + * @param secretName the secretName value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withSecretName(String secretName) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withSecretName(secretName); + return this; + } + + /** + * Get the secretVersion property: The secretVersion property. + * + * @return the secretVersion value. + */ + public String secretVersion() { + return this.innerProperties() == null ? null : this.innerProperties().secretVersion(); + } + + /** + * Set the secretVersion property: The secretVersion property. + * + * @param secretVersion the secretVersion value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withSecretVersion(String secretVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withSecretVersion(secretVersion); + return this; + } + + /** + * Get the identityType property: Managed service identity. + * + * @return the identityType value. + */ + public ManagedServiceIdentity identityType() { + return this.innerProperties() == null ? null : this.innerProperties().identityType(); + } + + /** + * Set the identityType property: Managed service identity. + * + * @param identityType the identityType value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withIdentityType(ManagedServiceIdentity identityType) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withIdentityType(identityType); + return this; + } + + /** + * Get the details property: The details property. + * + * @return the details value. + */ + public String details() { + return this.innerProperties() == null ? null : this.innerProperties().details(); + } + + /** + * Set the details property: The details property. + * + * @param details the details value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withDetails(String details) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withDetails(details); + return this; + } + + /** + * Get the source property: The source property. + * + * @return the source value. + */ + public ConfigReferenceSource source() { + return this.innerProperties() == null ? null : this.innerProperties().source(); + } + + /** + * Set the source property: The source property. + * + * @param source the source value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withSource(ConfigReferenceSource source) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withSource(source); + return this; + } + + /** + * Get the activeVersion property: The activeVersion property. + * + * @return the activeVersion value. + */ + public String activeVersion() { + return this.innerProperties() == null ? null : this.innerProperties().activeVersion(); + } + + /** + * Set the activeVersion property: The activeVersion property. + * + * @param activeVersion the activeVersion value to set. + * @return the ApiKVReferenceInner object itself. + */ + public ApiKVReferenceInner withActiveVersion(String activeVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ApiKVReferenceProperties(); + } + this.innerProperties().withActiveVersion(activeVersion); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApiKVReferenceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApiKVReferenceProperties.java new file mode 100644 index 0000000000000..57d865cc79d38 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApiKVReferenceProperties.java @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ConfigReferenceSource; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.ResolveStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ApiKVReference resource specific properties. */ +@Fluent +public final class ApiKVReferenceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiKVReferenceProperties.class); + + /* + * The reference property. + */ + @JsonProperty(value = "reference") + private String reference; + + /* + * The status property. + */ + @JsonProperty(value = "status") + private ResolveStatus status; + + /* + * The vaultName property. + */ + @JsonProperty(value = "vaultName") + private String vaultName; + + /* + * The secretName property. + */ + @JsonProperty(value = "secretName") + private String secretName; + + /* + * The secretVersion property. + */ + @JsonProperty(value = "secretVersion") + private String secretVersion; + + /* + * Managed service identity. + */ + @JsonProperty(value = "identityType") + private ManagedServiceIdentity identityType; + + /* + * The details property. + */ + @JsonProperty(value = "details") + private String details; + + /* + * The source property. + */ + @JsonProperty(value = "source") + private ConfigReferenceSource source; + + /* + * The activeVersion property. + */ + @JsonProperty(value = "activeVersion") + private String activeVersion; + + /** + * Get the reference property: The reference property. + * + * @return the reference value. + */ + public String reference() { + return this.reference; + } + + /** + * Set the reference property: The reference property. + * + * @param reference the reference value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Get the status property: The status property. + * + * @return the status value. + */ + public ResolveStatus status() { + return this.status; + } + + /** + * Set the status property: The status property. + * + * @param status the status value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withStatus(ResolveStatus status) { + this.status = status; + return this; + } + + /** + * Get the vaultName property: The vaultName property. + * + * @return the vaultName value. + */ + public String vaultName() { + return this.vaultName; + } + + /** + * Set the vaultName property: The vaultName property. + * + * @param vaultName the vaultName value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withVaultName(String vaultName) { + this.vaultName = vaultName; + return this; + } + + /** + * Get the secretName property: The secretName property. + * + * @return the secretName value. + */ + public String secretName() { + return this.secretName; + } + + /** + * Set the secretName property: The secretName property. + * + * @param secretName the secretName value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withSecretName(String secretName) { + this.secretName = secretName; + return this; + } + + /** + * Get the secretVersion property: The secretVersion property. + * + * @return the secretVersion value. + */ + public String secretVersion() { + return this.secretVersion; + } + + /** + * Set the secretVersion property: The secretVersion property. + * + * @param secretVersion the secretVersion value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withSecretVersion(String secretVersion) { + this.secretVersion = secretVersion; + return this; + } + + /** + * Get the identityType property: Managed service identity. + * + * @return the identityType value. + */ + public ManagedServiceIdentity identityType() { + return this.identityType; + } + + /** + * Set the identityType property: Managed service identity. + * + * @param identityType the identityType value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withIdentityType(ManagedServiceIdentity identityType) { + this.identityType = identityType; + return this; + } + + /** + * Get the details property: The details property. + * + * @return the details value. + */ + public String details() { + return this.details; + } + + /** + * Set the details property: The details property. + * + * @param details the details value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withDetails(String details) { + this.details = details; + return this; + } + + /** + * Get the source property: The source property. + * + * @return the source value. + */ + public ConfigReferenceSource source() { + return this.source; + } + + /** + * Set the source property: The source property. + * + * @param source the source value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withSource(ConfigReferenceSource source) { + this.source = source; + return this; + } + + /** + * Get the activeVersion property: The activeVersion property. + * + * @return the activeVersion value. + */ + public String activeVersion() { + return this.activeVersion; + } + + /** + * Set the activeVersion property: The activeVersion property. + * + * @param activeVersion the activeVersion value to set. + * @return the ApiKVReferenceProperties object itself. + */ + public ApiKVReferenceProperties withActiveVersion(String activeVersion) { + this.activeVersion = activeVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identityType() != null) { + identityType().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificate.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificate.java new file mode 100644 index 0000000000000..f035dba8cb974 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificate.java @@ -0,0 +1,92 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Key Vault container for a certificate that is purchased through Azure. */ +@Fluent +public final class AppServiceCertificate { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificate.class); + + /* + * Key Vault resource Id. + */ + @JsonProperty(value = "keyVaultId") + private String keyVaultId; + + /* + * Key Vault secret name. + */ + @JsonProperty(value = "keyVaultSecretName") + private String keyVaultSecretName; + + /* + * Status of the Key Vault secret. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultSecretStatus provisioningState; + + /** + * Get the keyVaultId property: Key Vault resource Id. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId property: Key Vault resource Id. + * + * @param keyVaultId the keyVaultId value to set. + * @return the AppServiceCertificate object itself. + */ + public AppServiceCertificate withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName property: Key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the AppServiceCertificate object itself. + */ + public AppServiceCertificate withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the provisioningState property: Status of the Key Vault secret. + * + * @return the provisioningState value. + */ + public KeyVaultSecretStatus provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderInner.java new file mode 100644 index 0000000000000..3a8bdd22dab4e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderInner.java @@ -0,0 +1,377 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem; +import com.azure.resourcemanager.appservice.generated.models.CertificateDetails; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderContact; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderStatus; +import com.azure.resourcemanager.appservice.generated.models.CertificateProductType; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** SSL certificate purchase order. */ +@Fluent +public final class AppServiceCertificateOrderInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificateOrderInner.class); + + /* + * AppServiceCertificateOrder resource specific properties + */ + @JsonProperty(value = "properties") + private AppServiceCertificateOrderProperties innerProperties; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: AppServiceCertificateOrder resource specific properties. + * + * @return the innerProperties value. + */ + private AppServiceCertificateOrderProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public AppServiceCertificateOrderInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public AppServiceCertificateOrderInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the certificates property: State of the Key Vault secret. + * + * @return the certificates value. + */ + public Map certificates() { + return this.innerProperties() == null ? null : this.innerProperties().certificates(); + } + + /** + * Set the certificates property: State of the Key Vault secret. + * + * @param certificates the certificates value to set. + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withCertificates(Map certificates) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderProperties(); + } + this.innerProperties().withCertificates(certificates); + return this; + } + + /** + * Get the distinguishedName property: Certificate distinguished name. + * + * @return the distinguishedName value. + */ + public String distinguishedName() { + return this.innerProperties() == null ? null : this.innerProperties().distinguishedName(); + } + + /** + * Set the distinguishedName property: Certificate distinguished name. + * + * @param distinguishedName the distinguishedName value to set. + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withDistinguishedName(String distinguishedName) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderProperties(); + } + this.innerProperties().withDistinguishedName(distinguishedName); + return this; + } + + /** + * Get the domainVerificationToken property: Domain verification token. + * + * @return the domainVerificationToken value. + */ + public String domainVerificationToken() { + return this.innerProperties() == null ? null : this.innerProperties().domainVerificationToken(); + } + + /** + * Get the validityInYears property: Duration in years (must be 1). + * + * @return the validityInYears value. + */ + public Integer validityInYears() { + return this.innerProperties() == null ? null : this.innerProperties().validityInYears(); + } + + /** + * Set the validityInYears property: Duration in years (must be 1). + * + * @param validityInYears the validityInYears value to set. + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withValidityInYears(Integer validityInYears) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderProperties(); + } + this.innerProperties().withValidityInYears(validityInYears); + return this; + } + + /** + * Get the keySize property: Certificate key size. + * + * @return the keySize value. + */ + public Integer keySize() { + return this.innerProperties() == null ? null : this.innerProperties().keySize(); + } + + /** + * Set the keySize property: Certificate key size. + * + * @param keySize the keySize value to set. + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withKeySize(Integer keySize) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderProperties(); + } + this.innerProperties().withKeySize(keySize); + return this; + } + + /** + * Get the productType property: Certificate product type. + * + * @return the productType value. + */ + public CertificateProductType productType() { + return this.innerProperties() == null ? null : this.innerProperties().productType(); + } + + /** + * Set the productType property: Certificate product type. + * + * @param productType the productType value to set. + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withProductType(CertificateProductType productType) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderProperties(); + } + this.innerProperties().withProductType(productType); + return this; + } + + /** + * Get the autoRenew property: <code>true</code> if the certificate should be automatically renewed when + * it expires; otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + public Boolean autoRenew() { + return this.innerProperties() == null ? null : this.innerProperties().autoRenew(); + } + + /** + * Set the autoRenew property: <code>true</code> if the certificate should be automatically renewed when + * it expires; otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set. + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withAutoRenew(Boolean autoRenew) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderProperties(); + } + this.innerProperties().withAutoRenew(autoRenew); + return this; + } + + /** + * Get the provisioningState property: Status of certificate order. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: Current order status. + * + * @return the status value. + */ + public CertificateOrderStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the signedCertificate property: Signed certificate. + * + * @return the signedCertificate value. + */ + public CertificateDetails signedCertificate() { + return this.innerProperties() == null ? null : this.innerProperties().signedCertificate(); + } + + /** + * Get the csr property: Last CSR that was created for this order. + * + * @return the csr value. + */ + public String csr() { + return this.innerProperties() == null ? null : this.innerProperties().csr(); + } + + /** + * Set the csr property: Last CSR that was created for this order. + * + * @param csr the csr value to set. + * @return the AppServiceCertificateOrderInner object itself. + */ + public AppServiceCertificateOrderInner withCsr(String csr) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderProperties(); + } + this.innerProperties().withCsr(csr); + return this; + } + + /** + * Get the intermediate property: Intermediate certificate. + * + * @return the intermediate value. + */ + public CertificateDetails intermediate() { + return this.innerProperties() == null ? null : this.innerProperties().intermediate(); + } + + /** + * Get the root property: Root certificate. + * + * @return the root value. + */ + public CertificateDetails root() { + return this.innerProperties() == null ? null : this.innerProperties().root(); + } + + /** + * Get the serialNumber property: Current serial number of the certificate. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Get the lastCertificateIssuanceTime property: Certificate last issuance time. + * + * @return the lastCertificateIssuanceTime value. + */ + public OffsetDateTime lastCertificateIssuanceTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastCertificateIssuanceTime(); + } + + /** + * Get the expirationTime property: Certificate expiration time. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().expirationTime(); + } + + /** + * Get the isPrivateKeyExternal property: <code>true</code> if private key is external; otherwise, + * <code>false</code>. + * + * @return the isPrivateKeyExternal value. + */ + public Boolean isPrivateKeyExternal() { + return this.innerProperties() == null ? null : this.innerProperties().isPrivateKeyExternal(); + } + + /** + * Get the appServiceCertificateNotRenewableReasons property: Reasons why App Service Certificate is not renewable + * at the current moment. + * + * @return the appServiceCertificateNotRenewableReasons value. + */ + public List + appServiceCertificateNotRenewableReasons() { + return this.innerProperties() == null + ? null + : this.innerProperties().appServiceCertificateNotRenewableReasons(); + } + + /** + * Get the nextAutoRenewalTimestamp property: Time stamp when the certificate would be auto renewed next. + * + * @return the nextAutoRenewalTimestamp value. + */ + public OffsetDateTime nextAutoRenewalTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().nextAutoRenewalTimestamp(); + } + + /** + * Get the contact property: Contact info. + * + * @return the contact value. + */ + public CertificateOrderContact contact() { + return this.innerProperties() == null ? null : this.innerProperties().contact(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderPatchResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderPatchResourceProperties.java new file mode 100644 index 0000000000000..d1243fa4ee9cd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderPatchResourceProperties.java @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem; +import com.azure.resourcemanager.appservice.generated.models.CertificateDetails; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderContact; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderStatus; +import com.azure.resourcemanager.appservice.generated.models.CertificateProductType; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** AppServiceCertificateOrderPatchResource resource specific properties. */ +@Fluent +public final class AppServiceCertificateOrderPatchResourceProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(AppServiceCertificateOrderPatchResourceProperties.class); + + /* + * State of the Key Vault secret. + */ + @JsonProperty(value = "certificates") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map certificates; + + /* + * Certificate distinguished name. + */ + @JsonProperty(value = "distinguishedName") + private String distinguishedName; + + /* + * Domain verification token. + */ + @JsonProperty(value = "domainVerificationToken", access = JsonProperty.Access.WRITE_ONLY) + private String domainVerificationToken; + + /* + * Duration in years (must be 1). + */ + @JsonProperty(value = "validityInYears") + private Integer validityInYears; + + /* + * Certificate key size. + */ + @JsonProperty(value = "keySize") + private Integer keySize; + + /* + * Certificate product type. + */ + @JsonProperty(value = "productType", required = true) + private CertificateProductType productType; + + /* + * true if the certificate should be automatically renewed + * when it expires; otherwise, false. + */ + @JsonProperty(value = "autoRenew") + private Boolean autoRenew; + + /* + * Status of certificate order. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Current order status. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private CertificateOrderStatus status; + + /* + * Signed certificate. + */ + @JsonProperty(value = "signedCertificate", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails signedCertificate; + + /* + * Last CSR that was created for this order. + */ + @JsonProperty(value = "csr") + private String csr; + + /* + * Intermediate certificate. + */ + @JsonProperty(value = "intermediate", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails intermediate; + + /* + * Root certificate. + */ + @JsonProperty(value = "root", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails root; + + /* + * Current serial number of the certificate. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * Certificate last issuance time. + */ + @JsonProperty(value = "lastCertificateIssuanceTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastCertificateIssuanceTime; + + /* + * Certificate expiration time. + */ + @JsonProperty(value = "expirationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expirationTime; + + /* + * true if private key is external; otherwise, + * false. + */ + @JsonProperty(value = "isPrivateKeyExternal", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPrivateKeyExternal; + + /* + * Reasons why App Service Certificate is not renewable at the current + * moment. + */ + @JsonProperty(value = "appServiceCertificateNotRenewableReasons", access = JsonProperty.Access.WRITE_ONLY) + private List + appServiceCertificateNotRenewableReasons; + + /* + * Time stamp when the certificate would be auto renewed next + */ + @JsonProperty(value = "nextAutoRenewalTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime nextAutoRenewalTimestamp; + + /* + * Contact info + */ + @JsonProperty(value = "contact", access = JsonProperty.Access.WRITE_ONLY) + private CertificateOrderContact contact; + + /** + * Get the certificates property: State of the Key Vault secret. + * + * @return the certificates value. + */ + public Map certificates() { + return this.certificates; + } + + /** + * Set the certificates property: State of the Key Vault secret. + * + * @param certificates the certificates value to set. + * @return the AppServiceCertificateOrderPatchResourceProperties object itself. + */ + public AppServiceCertificateOrderPatchResourceProperties withCertificates( + Map certificates) { + this.certificates = certificates; + return this; + } + + /** + * Get the distinguishedName property: Certificate distinguished name. + * + * @return the distinguishedName value. + */ + public String distinguishedName() { + return this.distinguishedName; + } + + /** + * Set the distinguishedName property: Certificate distinguished name. + * + * @param distinguishedName the distinguishedName value to set. + * @return the AppServiceCertificateOrderPatchResourceProperties object itself. + */ + public AppServiceCertificateOrderPatchResourceProperties withDistinguishedName(String distinguishedName) { + this.distinguishedName = distinguishedName; + return this; + } + + /** + * Get the domainVerificationToken property: Domain verification token. + * + * @return the domainVerificationToken value. + */ + public String domainVerificationToken() { + return this.domainVerificationToken; + } + + /** + * Get the validityInYears property: Duration in years (must be 1). + * + * @return the validityInYears value. + */ + public Integer validityInYears() { + return this.validityInYears; + } + + /** + * Set the validityInYears property: Duration in years (must be 1). + * + * @param validityInYears the validityInYears value to set. + * @return the AppServiceCertificateOrderPatchResourceProperties object itself. + */ + public AppServiceCertificateOrderPatchResourceProperties withValidityInYears(Integer validityInYears) { + this.validityInYears = validityInYears; + return this; + } + + /** + * Get the keySize property: Certificate key size. + * + * @return the keySize value. + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set the keySize property: Certificate key size. + * + * @param keySize the keySize value to set. + * @return the AppServiceCertificateOrderPatchResourceProperties object itself. + */ + public AppServiceCertificateOrderPatchResourceProperties withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get the productType property: Certificate product type. + * + * @return the productType value. + */ + public CertificateProductType productType() { + return this.productType; + } + + /** + * Set the productType property: Certificate product type. + * + * @param productType the productType value to set. + * @return the AppServiceCertificateOrderPatchResourceProperties object itself. + */ + public AppServiceCertificateOrderPatchResourceProperties withProductType(CertificateProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get the autoRenew property: <code>true</code> if the certificate should be automatically renewed when + * it expires; otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set the autoRenew property: <code>true</code> if the certificate should be automatically renewed when + * it expires; otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set. + * @return the AppServiceCertificateOrderPatchResourceProperties object itself. + */ + public AppServiceCertificateOrderPatchResourceProperties withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get the provisioningState property: Status of certificate order. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: Current order status. + * + * @return the status value. + */ + public CertificateOrderStatus status() { + return this.status; + } + + /** + * Get the signedCertificate property: Signed certificate. + * + * @return the signedCertificate value. + */ + public CertificateDetails signedCertificate() { + return this.signedCertificate; + } + + /** + * Get the csr property: Last CSR that was created for this order. + * + * @return the csr value. + */ + public String csr() { + return this.csr; + } + + /** + * Set the csr property: Last CSR that was created for this order. + * + * @param csr the csr value to set. + * @return the AppServiceCertificateOrderPatchResourceProperties object itself. + */ + public AppServiceCertificateOrderPatchResourceProperties withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get the intermediate property: Intermediate certificate. + * + * @return the intermediate value. + */ + public CertificateDetails intermediate() { + return this.intermediate; + } + + /** + * Get the root property: Root certificate. + * + * @return the root value. + */ + public CertificateDetails root() { + return this.root; + } + + /** + * Get the serialNumber property: Current serial number of the certificate. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the lastCertificateIssuanceTime property: Certificate last issuance time. + * + * @return the lastCertificateIssuanceTime value. + */ + public OffsetDateTime lastCertificateIssuanceTime() { + return this.lastCertificateIssuanceTime; + } + + /** + * Get the expirationTime property: Certificate expiration time. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get the isPrivateKeyExternal property: <code>true</code> if private key is external; otherwise, + * <code>false</code>. + * + * @return the isPrivateKeyExternal value. + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Get the appServiceCertificateNotRenewableReasons property: Reasons why App Service Certificate is not renewable + * at the current moment. + * + * @return the appServiceCertificateNotRenewableReasons value. + */ + public List + appServiceCertificateNotRenewableReasons() { + return this.appServiceCertificateNotRenewableReasons; + } + + /** + * Get the nextAutoRenewalTimestamp property: Time stamp when the certificate would be auto renewed next. + * + * @return the nextAutoRenewalTimestamp value. + */ + public OffsetDateTime nextAutoRenewalTimestamp() { + return this.nextAutoRenewalTimestamp; + } + + /** + * Get the contact property: Contact info. + * + * @return the contact value. + */ + public CertificateOrderContact contact() { + return this.contact; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (certificates() != null) { + certificates() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (productType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productType in model" + + " AppServiceCertificateOrderPatchResourceProperties")); + } + if (signedCertificate() != null) { + signedCertificate().validate(); + } + if (intermediate() != null) { + intermediate().validate(); + } + if (root() != null) { + root().validate(); + } + if (contact() != null) { + contact().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderProperties.java new file mode 100644 index 0000000000000..f82062e9e78e7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateOrderProperties.java @@ -0,0 +1,449 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem; +import com.azure.resourcemanager.appservice.generated.models.CertificateDetails; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderContact; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderStatus; +import com.azure.resourcemanager.appservice.generated.models.CertificateProductType; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** AppServiceCertificateOrder resource specific properties. */ +@Fluent +public final class AppServiceCertificateOrderProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificateOrderProperties.class); + + /* + * State of the Key Vault secret. + */ + @JsonProperty(value = "certificates") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map certificates; + + /* + * Certificate distinguished name. + */ + @JsonProperty(value = "distinguishedName") + private String distinguishedName; + + /* + * Domain verification token. + */ + @JsonProperty(value = "domainVerificationToken", access = JsonProperty.Access.WRITE_ONLY) + private String domainVerificationToken; + + /* + * Duration in years (must be 1). + */ + @JsonProperty(value = "validityInYears") + private Integer validityInYears; + + /* + * Certificate key size. + */ + @JsonProperty(value = "keySize") + private Integer keySize; + + /* + * Certificate product type. + */ + @JsonProperty(value = "productType", required = true) + private CertificateProductType productType; + + /* + * true if the certificate should be automatically renewed + * when it expires; otherwise, false. + */ + @JsonProperty(value = "autoRenew") + private Boolean autoRenew; + + /* + * Status of certificate order. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Current order status. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private CertificateOrderStatus status; + + /* + * Signed certificate. + */ + @JsonProperty(value = "signedCertificate", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails signedCertificate; + + /* + * Last CSR that was created for this order. + */ + @JsonProperty(value = "csr") + private String csr; + + /* + * Intermediate certificate. + */ + @JsonProperty(value = "intermediate", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails intermediate; + + /* + * Root certificate. + */ + @JsonProperty(value = "root", access = JsonProperty.Access.WRITE_ONLY) + private CertificateDetails root; + + /* + * Current serial number of the certificate. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * Certificate last issuance time. + */ + @JsonProperty(value = "lastCertificateIssuanceTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastCertificateIssuanceTime; + + /* + * Certificate expiration time. + */ + @JsonProperty(value = "expirationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expirationTime; + + /* + * true if private key is external; otherwise, + * false. + */ + @JsonProperty(value = "isPrivateKeyExternal", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPrivateKeyExternal; + + /* + * Reasons why App Service Certificate is not renewable at the current + * moment. + */ + @JsonProperty(value = "appServiceCertificateNotRenewableReasons", access = JsonProperty.Access.WRITE_ONLY) + private List + appServiceCertificateNotRenewableReasons; + + /* + * Time stamp when the certificate would be auto renewed next + */ + @JsonProperty(value = "nextAutoRenewalTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime nextAutoRenewalTimestamp; + + /* + * Contact info + */ + @JsonProperty(value = "contact", access = JsonProperty.Access.WRITE_ONLY) + private CertificateOrderContact contact; + + /** + * Get the certificates property: State of the Key Vault secret. + * + * @return the certificates value. + */ + public Map certificates() { + return this.certificates; + } + + /** + * Set the certificates property: State of the Key Vault secret. + * + * @param certificates the certificates value to set. + * @return the AppServiceCertificateOrderProperties object itself. + */ + public AppServiceCertificateOrderProperties withCertificates(Map certificates) { + this.certificates = certificates; + return this; + } + + /** + * Get the distinguishedName property: Certificate distinguished name. + * + * @return the distinguishedName value. + */ + public String distinguishedName() { + return this.distinguishedName; + } + + /** + * Set the distinguishedName property: Certificate distinguished name. + * + * @param distinguishedName the distinguishedName value to set. + * @return the AppServiceCertificateOrderProperties object itself. + */ + public AppServiceCertificateOrderProperties withDistinguishedName(String distinguishedName) { + this.distinguishedName = distinguishedName; + return this; + } + + /** + * Get the domainVerificationToken property: Domain verification token. + * + * @return the domainVerificationToken value. + */ + public String domainVerificationToken() { + return this.domainVerificationToken; + } + + /** + * Get the validityInYears property: Duration in years (must be 1). + * + * @return the validityInYears value. + */ + public Integer validityInYears() { + return this.validityInYears; + } + + /** + * Set the validityInYears property: Duration in years (must be 1). + * + * @param validityInYears the validityInYears value to set. + * @return the AppServiceCertificateOrderProperties object itself. + */ + public AppServiceCertificateOrderProperties withValidityInYears(Integer validityInYears) { + this.validityInYears = validityInYears; + return this; + } + + /** + * Get the keySize property: Certificate key size. + * + * @return the keySize value. + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set the keySize property: Certificate key size. + * + * @param keySize the keySize value to set. + * @return the AppServiceCertificateOrderProperties object itself. + */ + public AppServiceCertificateOrderProperties withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get the productType property: Certificate product type. + * + * @return the productType value. + */ + public CertificateProductType productType() { + return this.productType; + } + + /** + * Set the productType property: Certificate product type. + * + * @param productType the productType value to set. + * @return the AppServiceCertificateOrderProperties object itself. + */ + public AppServiceCertificateOrderProperties withProductType(CertificateProductType productType) { + this.productType = productType; + return this; + } + + /** + * Get the autoRenew property: <code>true</code> if the certificate should be automatically renewed when + * it expires; otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set the autoRenew property: <code>true</code> if the certificate should be automatically renewed when + * it expires; otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set. + * @return the AppServiceCertificateOrderProperties object itself. + */ + public AppServiceCertificateOrderProperties withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get the provisioningState property: Status of certificate order. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: Current order status. + * + * @return the status value. + */ + public CertificateOrderStatus status() { + return this.status; + } + + /** + * Get the signedCertificate property: Signed certificate. + * + * @return the signedCertificate value. + */ + public CertificateDetails signedCertificate() { + return this.signedCertificate; + } + + /** + * Get the csr property: Last CSR that was created for this order. + * + * @return the csr value. + */ + public String csr() { + return this.csr; + } + + /** + * Set the csr property: Last CSR that was created for this order. + * + * @param csr the csr value to set. + * @return the AppServiceCertificateOrderProperties object itself. + */ + public AppServiceCertificateOrderProperties withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get the intermediate property: Intermediate certificate. + * + * @return the intermediate value. + */ + public CertificateDetails intermediate() { + return this.intermediate; + } + + /** + * Get the root property: Root certificate. + * + * @return the root value. + */ + public CertificateDetails root() { + return this.root; + } + + /** + * Get the serialNumber property: Current serial number of the certificate. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the lastCertificateIssuanceTime property: Certificate last issuance time. + * + * @return the lastCertificateIssuanceTime value. + */ + public OffsetDateTime lastCertificateIssuanceTime() { + return this.lastCertificateIssuanceTime; + } + + /** + * Get the expirationTime property: Certificate expiration time. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get the isPrivateKeyExternal property: <code>true</code> if private key is external; otherwise, + * <code>false</code>. + * + * @return the isPrivateKeyExternal value. + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Get the appServiceCertificateNotRenewableReasons property: Reasons why App Service Certificate is not renewable + * at the current moment. + * + * @return the appServiceCertificateNotRenewableReasons value. + */ + public List + appServiceCertificateNotRenewableReasons() { + return this.appServiceCertificateNotRenewableReasons; + } + + /** + * Get the nextAutoRenewalTimestamp property: Time stamp when the certificate would be auto renewed next. + * + * @return the nextAutoRenewalTimestamp value. + */ + public OffsetDateTime nextAutoRenewalTimestamp() { + return this.nextAutoRenewalTimestamp; + } + + /** + * Get the contact property: Contact info. + * + * @return the contact value. + */ + public CertificateOrderContact contact() { + return this.contact; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (certificates() != null) { + certificates() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + if (productType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property productType in model AppServiceCertificateOrderProperties")); + } + if (signedCertificate() != null) { + signedCertificate().validate(); + } + if (intermediate() != null) { + intermediate().validate(); + } + if (root() != null) { + root().validate(); + } + if (contact() != null) { + contact().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateResourceInner.java new file mode 100644 index 0000000000000..081a7dca2d2b5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceCertificateResourceInner.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Key Vault container ARM resource for a certificate that is purchased through Azure. */ +@Fluent +public final class AppServiceCertificateResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificateResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private AppServiceCertificate innerProperties; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private AppServiceCertificate innerProperties() { + return this.innerProperties; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the AppServiceCertificateResourceInner object itself. + */ + public AppServiceCertificateResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public AppServiceCertificateResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public AppServiceCertificateResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the keyVaultId property: Key Vault resource Id. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultId(); + } + + /** + * Set the keyVaultId property: Key Vault resource Id. + * + * @param keyVaultId the keyVaultId value to set. + * @return the AppServiceCertificateResourceInner object itself. + */ + public AppServiceCertificateResourceInner withKeyVaultId(String keyVaultId) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificate(); + } + this.innerProperties().withKeyVaultId(keyVaultId); + return this; + } + + /** + * Get the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultSecretName(); + } + + /** + * Set the keyVaultSecretName property: Key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the AppServiceCertificateResourceInner object itself. + */ + public AppServiceCertificateResourceInner withKeyVaultSecretName(String keyVaultSecretName) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificate(); + } + this.innerProperties().withKeyVaultSecretName(keyVaultSecretName); + return this; + } + + /** + * Get the provisioningState property: Status of the Key Vault secret. + * + * @return the provisioningState value. + */ + public KeyVaultSecretStatus provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceEnvironment.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceEnvironment.java new file mode 100644 index 0000000000000..a6cc30c1e25c2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceEnvironment.java @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentStatus; +import com.azure.resourcemanager.appservice.generated.models.LoadBalancingMode; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.VirtualNetworkProfile; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Description of an App Service Environment. */ +@Fluent +public final class AppServiceEnvironment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceEnvironment.class); + + /* + * Provisioning state of the App Service Environment. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Current status of the App Service Environment. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private HostingEnvironmentStatus status; + + /* + * Description of the Virtual Network. + */ + @JsonProperty(value = "virtualNetwork", required = true) + private VirtualNetworkProfile virtualNetwork; + + /* + * Specifies which endpoints to serve internally in the Virtual Network for + * the App Service Environment. + */ + @JsonProperty(value = "internalLoadBalancingMode") + private LoadBalancingMode internalLoadBalancingMode; + + /* + * Front-end VM size, e.g. "Medium", "Large". + */ + @JsonProperty(value = "multiSize") + private String multiSize; + + /* + * Number of front-end instances. + */ + @JsonProperty(value = "multiRoleCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer multiRoleCount; + + /* + * Number of IP SSL addresses reserved for the App Service Environment. + */ + @JsonProperty(value = "ipsslAddressCount") + private Integer ipsslAddressCount; + + /* + * DNS suffix of the App Service Environment. + */ + @JsonProperty(value = "dnsSuffix") + private String dnsSuffix; + + /* + * Maximum number of VMs in the App Service Environment. + */ + @JsonProperty(value = "maximumNumberOfMachines", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNumberOfMachines; + + /* + * Scale factor for front-ends. + */ + @JsonProperty(value = "frontEndScaleFactor") + private Integer frontEndScaleFactor; + + /* + * true if the App Service Environment is suspended; + * otherwise, false. The environment can be suspended, e.g. + * when the management endpoint is no longer available + * (most likely because NSG blocked the incoming traffic). + */ + @JsonProperty(value = "suspended", access = JsonProperty.Access.WRITE_ONLY) + private Boolean suspended; + + /* + * Custom settings for changing the behavior of the App Service + * Environment. + */ + @JsonProperty(value = "clusterSettings") + private List clusterSettings; + + /* + * User added ip ranges to whitelist on ASE db + */ + @JsonProperty(value = "userWhitelistedIpRanges") + private List userWhitelistedIpRanges; + + /* + * Flag that displays whether an ASE has linux workers or not + */ + @JsonProperty(value = "hasLinuxWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasLinuxWorkers; + + /* + * Dedicated Host Count + */ + @JsonProperty(value = "dedicatedHostCount") + private Integer dedicatedHostCount; + + /* + * Whether or not this App Service Environment is zone-redundant. + */ + @JsonProperty(value = "zoneRedundant") + private Boolean zoneRedundant; + + /** + * Get the provisioningState property: Provisioning state of the App Service Environment. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the status property: Current status of the App Service Environment. + * + * @return the status value. + */ + public HostingEnvironmentStatus status() { + return this.status; + } + + /** + * Get the virtualNetwork property: Description of the Virtual Network. + * + * @return the virtualNetwork value. + */ + public VirtualNetworkProfile virtualNetwork() { + return this.virtualNetwork; + } + + /** + * Set the virtualNetwork property: Description of the Virtual Network. + * + * @param virtualNetwork the virtualNetwork value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + this.virtualNetwork = virtualNetwork; + return this; + } + + /** + * Get the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the Virtual Network + * for the App Service Environment. + * + * @return the internalLoadBalancingMode value. + */ + public LoadBalancingMode internalLoadBalancingMode() { + return this.internalLoadBalancingMode; + } + + /** + * Set the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the Virtual Network + * for the App Service Environment. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withInternalLoadBalancingMode(LoadBalancingMode internalLoadBalancingMode) { + this.internalLoadBalancingMode = internalLoadBalancingMode; + return this; + } + + /** + * Get the multiSize property: Front-end VM size, e.g. "Medium", "Large". + * + * @return the multiSize value. + */ + public String multiSize() { + return this.multiSize; + } + + /** + * Set the multiSize property: Front-end VM size, e.g. "Medium", "Large". + * + * @param multiSize the multiSize value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withMultiSize(String multiSize) { + this.multiSize = multiSize; + return this; + } + + /** + * Get the multiRoleCount property: Number of front-end instances. + * + * @return the multiRoleCount value. + */ + public Integer multiRoleCount() { + return this.multiRoleCount; + } + + /** + * Get the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service Environment. + * + * @return the ipsslAddressCount value. + */ + public Integer ipsslAddressCount() { + return this.ipsslAddressCount; + } + + /** + * Set the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service Environment. + * + * @param ipsslAddressCount the ipsslAddressCount value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withIpsslAddressCount(Integer ipsslAddressCount) { + this.ipsslAddressCount = ipsslAddressCount; + return this; + } + + /** + * Get the dnsSuffix property: DNS suffix of the App Service Environment. + * + * @return the dnsSuffix value. + */ + public String dnsSuffix() { + return this.dnsSuffix; + } + + /** + * Set the dnsSuffix property: DNS suffix of the App Service Environment. + * + * @param dnsSuffix the dnsSuffix value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * Get the maximumNumberOfMachines property: Maximum number of VMs in the App Service Environment. + * + * @return the maximumNumberOfMachines value. + */ + public Integer maximumNumberOfMachines() { + return this.maximumNumberOfMachines; + } + + /** + * Get the frontEndScaleFactor property: Scale factor for front-ends. + * + * @return the frontEndScaleFactor value. + */ + public Integer frontEndScaleFactor() { + return this.frontEndScaleFactor; + } + + /** + * Set the frontEndScaleFactor property: Scale factor for front-ends. + * + * @param frontEndScaleFactor the frontEndScaleFactor value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withFrontEndScaleFactor(Integer frontEndScaleFactor) { + this.frontEndScaleFactor = frontEndScaleFactor; + return this; + } + + /** + * Get the suspended property: <code>true</code> if the App Service Environment is suspended; otherwise, + * <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer + * available (most likely because NSG blocked the incoming traffic). + * + * @return the suspended value. + */ + public Boolean suspended() { + return this.suspended; + } + + /** + * Get the clusterSettings property: Custom settings for changing the behavior of the App Service Environment. + * + * @return the clusterSettings value. + */ + public List clusterSettings() { + return this.clusterSettings; + } + + /** + * Set the clusterSettings property: Custom settings for changing the behavior of the App Service Environment. + * + * @param clusterSettings the clusterSettings value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withClusterSettings(List clusterSettings) { + this.clusterSettings = clusterSettings; + return this; + } + + /** + * Get the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @return the userWhitelistedIpRanges value. + */ + public List userWhitelistedIpRanges() { + return this.userWhitelistedIpRanges; + } + + /** + * Set the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + this.userWhitelistedIpRanges = userWhitelistedIpRanges; + return this; + } + + /** + * Get the hasLinuxWorkers property: Flag that displays whether an ASE has linux workers or not. + * + * @return the hasLinuxWorkers value. + */ + public Boolean hasLinuxWorkers() { + return this.hasLinuxWorkers; + } + + /** + * Get the dedicatedHostCount property: Dedicated Host Count. + * + * @return the dedicatedHostCount value. + */ + public Integer dedicatedHostCount() { + return this.dedicatedHostCount; + } + + /** + * Set the dedicatedHostCount property: Dedicated Host Count. + * + * @param dedicatedHostCount the dedicatedHostCount value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withDedicatedHostCount(Integer dedicatedHostCount) { + this.dedicatedHostCount = dedicatedHostCount; + return this; + } + + /** + * Get the zoneRedundant property: Whether or not this App Service Environment is zone-redundant. + * + * @return the zoneRedundant value. + */ + public Boolean zoneRedundant() { + return this.zoneRedundant; + } + + /** + * Set the zoneRedundant property: Whether or not this App Service Environment is zone-redundant. + * + * @param zoneRedundant the zoneRedundant value to set. + * @return the AppServiceEnvironment object itself. + */ + public AppServiceEnvironment withZoneRedundant(Boolean zoneRedundant) { + this.zoneRedundant = zoneRedundant; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualNetwork() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property virtualNetwork in model AppServiceEnvironment")); + } else { + virtualNetwork().validate(); + } + if (clusterSettings() != null) { + clusterSettings().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceEnvironmentResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceEnvironmentResourceInner.java new file mode 100644 index 0000000000000..a25c520a67175 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServiceEnvironmentResourceInner.java @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentStatus; +import com.azure.resourcemanager.appservice.generated.models.LoadBalancingMode; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.VirtualNetworkProfile; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** App Service Environment ARM resource. */ +@Fluent +public final class AppServiceEnvironmentResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceEnvironmentResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private AppServiceEnvironment innerProperties; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private AppServiceEnvironment innerProperties() { + return this.innerProperties; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public AppServiceEnvironmentResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public AppServiceEnvironmentResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the App Service Environment. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: Current status of the App Service Environment. + * + * @return the status value. + */ + public HostingEnvironmentStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the virtualNetwork property: Description of the Virtual Network. + * + * @return the virtualNetwork value. + */ + public VirtualNetworkProfile virtualNetwork() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetwork(); + } + + /** + * Set the virtualNetwork property: Description of the Virtual Network. + * + * @param virtualNetwork the virtualNetwork value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withVirtualNetwork(virtualNetwork); + return this; + } + + /** + * Get the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the Virtual Network + * for the App Service Environment. + * + * @return the internalLoadBalancingMode value. + */ + public LoadBalancingMode internalLoadBalancingMode() { + return this.innerProperties() == null ? null : this.innerProperties().internalLoadBalancingMode(); + } + + /** + * Set the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the Virtual Network + * for the App Service Environment. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withInternalLoadBalancingMode( + LoadBalancingMode internalLoadBalancingMode) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withInternalLoadBalancingMode(internalLoadBalancingMode); + return this; + } + + /** + * Get the multiSize property: Front-end VM size, e.g. "Medium", "Large". + * + * @return the multiSize value. + */ + public String multiSize() { + return this.innerProperties() == null ? null : this.innerProperties().multiSize(); + } + + /** + * Set the multiSize property: Front-end VM size, e.g. "Medium", "Large". + * + * @param multiSize the multiSize value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withMultiSize(String multiSize) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withMultiSize(multiSize); + return this; + } + + /** + * Get the multiRoleCount property: Number of front-end instances. + * + * @return the multiRoleCount value. + */ + public Integer multiRoleCount() { + return this.innerProperties() == null ? null : this.innerProperties().multiRoleCount(); + } + + /** + * Get the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service Environment. + * + * @return the ipsslAddressCount value. + */ + public Integer ipsslAddressCount() { + return this.innerProperties() == null ? null : this.innerProperties().ipsslAddressCount(); + } + + /** + * Set the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service Environment. + * + * @param ipsslAddressCount the ipsslAddressCount value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withIpsslAddressCount(Integer ipsslAddressCount) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withIpsslAddressCount(ipsslAddressCount); + return this; + } + + /** + * Get the dnsSuffix property: DNS suffix of the App Service Environment. + * + * @return the dnsSuffix value. + */ + public String dnsSuffix() { + return this.innerProperties() == null ? null : this.innerProperties().dnsSuffix(); + } + + /** + * Set the dnsSuffix property: DNS suffix of the App Service Environment. + * + * @param dnsSuffix the dnsSuffix value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withDnsSuffix(String dnsSuffix) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withDnsSuffix(dnsSuffix); + return this; + } + + /** + * Get the maximumNumberOfMachines property: Maximum number of VMs in the App Service Environment. + * + * @return the maximumNumberOfMachines value. + */ + public Integer maximumNumberOfMachines() { + return this.innerProperties() == null ? null : this.innerProperties().maximumNumberOfMachines(); + } + + /** + * Get the frontEndScaleFactor property: Scale factor for front-ends. + * + * @return the frontEndScaleFactor value. + */ + public Integer frontEndScaleFactor() { + return this.innerProperties() == null ? null : this.innerProperties().frontEndScaleFactor(); + } + + /** + * Set the frontEndScaleFactor property: Scale factor for front-ends. + * + * @param frontEndScaleFactor the frontEndScaleFactor value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withFrontEndScaleFactor(Integer frontEndScaleFactor) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withFrontEndScaleFactor(frontEndScaleFactor); + return this; + } + + /** + * Get the suspended property: <code>true</code> if the App Service Environment is suspended; otherwise, + * <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer + * available (most likely because NSG blocked the incoming traffic). + * + * @return the suspended value. + */ + public Boolean suspended() { + return this.innerProperties() == null ? null : this.innerProperties().suspended(); + } + + /** + * Get the clusterSettings property: Custom settings for changing the behavior of the App Service Environment. + * + * @return the clusterSettings value. + */ + public List clusterSettings() { + return this.innerProperties() == null ? null : this.innerProperties().clusterSettings(); + } + + /** + * Set the clusterSettings property: Custom settings for changing the behavior of the App Service Environment. + * + * @param clusterSettings the clusterSettings value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withClusterSettings(List clusterSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withClusterSettings(clusterSettings); + return this; + } + + /** + * Get the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @return the userWhitelistedIpRanges value. + */ + public List userWhitelistedIpRanges() { + return this.innerProperties() == null ? null : this.innerProperties().userWhitelistedIpRanges(); + } + + /** + * Set the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withUserWhitelistedIpRanges(userWhitelistedIpRanges); + return this; + } + + /** + * Get the hasLinuxWorkers property: Flag that displays whether an ASE has linux workers or not. + * + * @return the hasLinuxWorkers value. + */ + public Boolean hasLinuxWorkers() { + return this.innerProperties() == null ? null : this.innerProperties().hasLinuxWorkers(); + } + + /** + * Get the dedicatedHostCount property: Dedicated Host Count. + * + * @return the dedicatedHostCount value. + */ + public Integer dedicatedHostCount() { + return this.innerProperties() == null ? null : this.innerProperties().dedicatedHostCount(); + } + + /** + * Set the dedicatedHostCount property: Dedicated Host Count. + * + * @param dedicatedHostCount the dedicatedHostCount value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withDedicatedHostCount(Integer dedicatedHostCount) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withDedicatedHostCount(dedicatedHostCount); + return this; + } + + /** + * Get the zoneRedundant property: Whether or not this App Service Environment is zone-redundant. + * + * @return the zoneRedundant value. + */ + public Boolean zoneRedundant() { + return this.innerProperties() == null ? null : this.innerProperties().zoneRedundant(); + } + + /** + * Set the zoneRedundant property: Whether or not this App Service Environment is zone-redundant. + * + * @param zoneRedundant the zoneRedundant value to set. + * @return the AppServiceEnvironmentResourceInner object itself. + */ + public AppServiceEnvironmentResourceInner withZoneRedundant(Boolean zoneRedundant) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withZoneRedundant(zoneRedundant); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanInner.java new file mode 100644 index 0000000000000..cb343d80d47b2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanInner.java @@ -0,0 +1,582 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ExtendedLocation; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.azure.resourcemanager.appservice.generated.models.StatusOptions; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** App Service plan. */ +@Fluent +public final class AppServicePlanInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServicePlanInner.class); + + /* + * AppServicePlan resource specific properties + */ + @JsonProperty(value = "properties") + private AppServicePlanProperties innerProperties; + + /* + * Description of a SKU for a scalable resource. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /* + * Extended Location. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: AppServicePlan resource specific properties. + * + * @return the innerProperties value. + */ + private AppServicePlanProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Description of a SKU for a scalable resource. + * + * @return the sku value. + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set the sku property: Description of a SKU for a scalable resource. + * + * @param sku the sku value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + + /** + * Get the extendedLocation property: Extended Location. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: Extended Location. + * + * @param extendedLocation the extendedLocation value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public AppServicePlanInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public AppServicePlanInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @return the workerTierName value. + */ + public String workerTierName() { + return this.innerProperties() == null ? null : this.innerProperties().workerTierName(); + } + + /** + * Set the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @param workerTierName the workerTierName value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withWorkerTierName(String workerTierName) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withWorkerTierName(workerTierName); + return this; + } + + /** + * Get the status property: App Service plan status. + * + * @return the status value. + */ + public StatusOptions status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the subscription property: App Service plan subscription. + * + * @return the subscription value. + */ + public String subscription() { + return this.innerProperties() == null ? null : this.innerProperties().subscription(); + } + + /** + * Get the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerProperties() == null ? null : this.innerProperties().hostingEnvironmentProfile(); + } + + /** + * Set the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withHostingEnvironmentProfile(hostingEnvironmentProfile); + return this; + } + + /** + * Get the maximumNumberOfWorkers property: Maximum number of instances that can be assigned to this App Service + * plan. + * + * @return the maximumNumberOfWorkers value. + */ + public Integer maximumNumberOfWorkers() { + return this.innerProperties() == null ? null : this.innerProperties().maximumNumberOfWorkers(); + } + + /** + * Get the geoRegion property: Geographical location for the App Service plan. + * + * @return the geoRegion value. + */ + public String geoRegion() { + return this.innerProperties() == null ? null : this.innerProperties().geoRegion(); + } + + /** + * Get the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @return the perSiteScaling value. + */ + public Boolean perSiteScaling() { + return this.innerProperties() == null ? null : this.innerProperties().perSiteScaling(); + } + + /** + * Set the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @param perSiteScaling the perSiteScaling value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withPerSiteScaling(Boolean perSiteScaling) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withPerSiteScaling(perSiteScaling); + return this; + } + + /** + * Get the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @return the elasticScaleEnabled value. + */ + public Boolean elasticScaleEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().elasticScaleEnabled(); + } + + /** + * Set the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @param elasticScaleEnabled the elasticScaleEnabled value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withElasticScaleEnabled(Boolean elasticScaleEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withElasticScaleEnabled(elasticScaleEnabled); + return this; + } + + /** + * Get the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @return the maximumElasticWorkerCount value. + */ + public Integer maximumElasticWorkerCount() { + return this.innerProperties() == null ? null : this.innerProperties().maximumElasticWorkerCount(); + } + + /** + * Set the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @param maximumElasticWorkerCount the maximumElasticWorkerCount value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withMaximumElasticWorkerCount(maximumElasticWorkerCount); + return this; + } + + /** + * Get the numberOfSites property: Number of apps assigned to this App Service plan. + * + * @return the numberOfSites value. + */ + public Integer numberOfSites() { + return this.innerProperties() == null ? null : this.innerProperties().numberOfSites(); + } + + /** + * Get the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @return the isSpot value. + */ + public Boolean isSpot() { + return this.innerProperties() == null ? null : this.innerProperties().isSpot(); + } + + /** + * Set the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @param isSpot the isSpot value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withIsSpot(Boolean isSpot) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withIsSpot(isSpot); + return this; + } + + /** + * Get the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @return the spotExpirationTime value. + */ + public OffsetDateTime spotExpirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().spotExpirationTime(); + } + + /** + * Set the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @param spotExpirationTime the spotExpirationTime value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withSpotExpirationTime(OffsetDateTime spotExpirationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withSpotExpirationTime(spotExpirationTime); + return this; + } + + /** + * Get the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @return the freeOfferExpirationTime value. + */ + public OffsetDateTime freeOfferExpirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().freeOfferExpirationTime(); + } + + /** + * Set the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @param freeOfferExpirationTime the freeOfferExpirationTime value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withFreeOfferExpirationTime(OffsetDateTime freeOfferExpirationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withFreeOfferExpirationTime(freeOfferExpirationTime); + return this; + } + + /** + * Get the resourceGroup property: Resource group of the App Service plan. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().resourceGroup(); + } + + /** + * Get the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the reserved value. + */ + public Boolean reserved() { + return this.innerProperties() == null ? null : this.innerProperties().reserved(); + } + + /** + * Set the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param reserved the reserved value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withReserved(Boolean reserved) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withReserved(reserved); + return this; + } + + /** + * Get the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.innerProperties() == null ? null : this.innerProperties().isXenon(); + } + + /** + * Set the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param isXenon the isXenon value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withIsXenon(Boolean isXenon) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withIsXenon(isXenon); + return this; + } + + /** + * Get the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the hyperV value. + */ + public Boolean hyperV() { + return this.innerProperties() == null ? null : this.innerProperties().hyperV(); + } + + /** + * Set the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param hyperV the hyperV value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withHyperV(Boolean hyperV) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withHyperV(hyperV); + return this; + } + + /** + * Get the targetWorkerCount property: Scaling worker count. + * + * @return the targetWorkerCount value. + */ + public Integer targetWorkerCount() { + return this.innerProperties() == null ? null : this.innerProperties().targetWorkerCount(); + } + + /** + * Set the targetWorkerCount property: Scaling worker count. + * + * @param targetWorkerCount the targetWorkerCount value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withTargetWorkerCount(Integer targetWorkerCount) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withTargetWorkerCount(targetWorkerCount); + return this; + } + + /** + * Get the targetWorkerSizeId property: Scaling worker size ID. + * + * @return the targetWorkerSizeId value. + */ + public Integer targetWorkerSizeId() { + return this.innerProperties() == null ? null : this.innerProperties().targetWorkerSizeId(); + } + + /** + * Set the targetWorkerSizeId property: Scaling worker size ID. + * + * @param targetWorkerSizeId the targetWorkerSizeId value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withTargetWorkerSizeId(Integer targetWorkerSizeId) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withTargetWorkerSizeId(targetWorkerSizeId); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the App Service Plan. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @return the kubeEnvironmentProfile value. + */ + public KubeEnvironmentProfile kubeEnvironmentProfile() { + return this.innerProperties() == null ? null : this.innerProperties().kubeEnvironmentProfile(); + } + + /** + * Set the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @param kubeEnvironmentProfile the kubeEnvironmentProfile value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withKubeEnvironmentProfile(KubeEnvironmentProfile kubeEnvironmentProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withKubeEnvironmentProfile(kubeEnvironmentProfile); + return this; + } + + /** + * Get the zoneRedundant property: If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform availability zone + * balancing. + * + * @return the zoneRedundant value. + */ + public Boolean zoneRedundant() { + return this.innerProperties() == null ? null : this.innerProperties().zoneRedundant(); + } + + /** + * Set the zoneRedundant property: If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform availability zone + * balancing. + * + * @param zoneRedundant the zoneRedundant value to set. + * @return the AppServicePlanInner object itself. + */ + public AppServicePlanInner withZoneRedundant(Boolean zoneRedundant) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanProperties(); + } + this.innerProperties().withZoneRedundant(zoneRedundant); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() != null) { + sku().validate(); + } + if (extendedLocation() != null) { + extendedLocation().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanPatchResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanPatchResourceProperties.java new file mode 100644 index 0000000000000..a88de64b8a44e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanPatchResourceProperties.java @@ -0,0 +1,572 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.StatusOptions; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** AppServicePlanPatchResource resource specific properties. */ +@Fluent +public final class AppServicePlanPatchResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServicePlanPatchResourceProperties.class); + + /* + * Target worker tier assigned to the App Service plan. + */ + @JsonProperty(value = "workerTierName") + private String workerTierName; + + /* + * App Service plan status. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private StatusOptions status; + + /* + * App Service plan subscription. + */ + @JsonProperty(value = "subscription", access = JsonProperty.Access.WRITE_ONLY) + private String subscription; + + /* + * Specification for the App Service Environment to use for the App Service + * plan. + */ + @JsonProperty(value = "hostingEnvironmentProfile") + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /* + * Maximum number of instances that can be assigned to this App Service + * plan. + */ + @JsonProperty(value = "maximumNumberOfWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNumberOfWorkers; + + /* + * Geographical location for the App Service plan. + */ + @JsonProperty(value = "geoRegion", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegion; + + /* + * If true, apps assigned to this App Service plan can be + * scaled independently. + * If false, apps assigned to this App Service plan will scale + * to all instances of the plan. + */ + @JsonProperty(value = "perSiteScaling") + private Boolean perSiteScaling; + + /* + * ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku + */ + @JsonProperty(value = "elasticScaleEnabled") + private Boolean elasticScaleEnabled; + + /* + * Maximum number of total workers allowed for this ElasticScaleEnabled App + * Service Plan + */ + @JsonProperty(value = "maximumElasticWorkerCount") + private Integer maximumElasticWorkerCount; + + /* + * Number of apps assigned to this App Service plan. + */ + @JsonProperty(value = "numberOfSites", access = JsonProperty.Access.WRITE_ONLY) + private Integer numberOfSites; + + /* + * If true, this App Service Plan owns spot instances. + */ + @JsonProperty(value = "isSpot") + private Boolean isSpot; + + /* + * The time when the server farm expires. Valid only if it is a spot server + * farm. + */ + @JsonProperty(value = "spotExpirationTime") + private OffsetDateTime spotExpirationTime; + + /* + * The time when the server farm free offer expires. + */ + @JsonProperty(value = "freeOfferExpirationTime") + private OffsetDateTime freeOfferExpirationTime; + + /* + * Resource group of the App Service plan. + */ + @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /* + * If Linux app service plan true, false + * otherwise. + */ + @JsonProperty(value = "reserved") + private Boolean reserved; + + /* + * Obsolete: If Hyper-V container app service plan true, + * false otherwise. + */ + @JsonProperty(value = "isXenon") + private Boolean isXenon; + + /* + * If Hyper-V container app service plan true, + * false otherwise. + */ + @JsonProperty(value = "hyperV") + private Boolean hyperV; + + /* + * Scaling worker count. + */ + @JsonProperty(value = "targetWorkerCount") + private Integer targetWorkerCount; + + /* + * Scaling worker size ID. + */ + @JsonProperty(value = "targetWorkerSizeId") + private Integer targetWorkerSizeId; + + /* + * Provisioning state of the App Service Plan. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Specification for the Kubernetes Environment to use for the App Service + * plan. + */ + @JsonProperty(value = "kubeEnvironmentProfile") + private KubeEnvironmentProfile kubeEnvironmentProfile; + + /* + * If true, this App Service Plan will perform availability + * zone balancing. + * If false, this App Service Plan will not perform + * availability zone balancing. + */ + @JsonProperty(value = "zoneRedundant") + private Boolean zoneRedundant; + + /** + * Get the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @return the workerTierName value. + */ + public String workerTierName() { + return this.workerTierName; + } + + /** + * Set the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @param workerTierName the workerTierName value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withWorkerTierName(String workerTierName) { + this.workerTierName = workerTierName; + return this; + } + + /** + * Get the status property: App Service plan status. + * + * @return the status value. + */ + public StatusOptions status() { + return this.status; + } + + /** + * Get the subscription property: App Service plan subscription. + * + * @return the subscription value. + */ + public String subscription() { + return this.subscription; + } + + /** + * Get the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withHostingEnvironmentProfile( + HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get the maximumNumberOfWorkers property: Maximum number of instances that can be assigned to this App Service + * plan. + * + * @return the maximumNumberOfWorkers value. + */ + public Integer maximumNumberOfWorkers() { + return this.maximumNumberOfWorkers; + } + + /** + * Get the geoRegion property: Geographical location for the App Service plan. + * + * @return the geoRegion value. + */ + public String geoRegion() { + return this.geoRegion; + } + + /** + * Get the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @return the perSiteScaling value. + */ + public Boolean perSiteScaling() { + return this.perSiteScaling; + } + + /** + * Set the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @param perSiteScaling the perSiteScaling value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withPerSiteScaling(Boolean perSiteScaling) { + this.perSiteScaling = perSiteScaling; + return this; + } + + /** + * Get the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @return the elasticScaleEnabled value. + */ + public Boolean elasticScaleEnabled() { + return this.elasticScaleEnabled; + } + + /** + * Set the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @param elasticScaleEnabled the elasticScaleEnabled value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withElasticScaleEnabled(Boolean elasticScaleEnabled) { + this.elasticScaleEnabled = elasticScaleEnabled; + return this; + } + + /** + * Get the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @return the maximumElasticWorkerCount value. + */ + public Integer maximumElasticWorkerCount() { + return this.maximumElasticWorkerCount; + } + + /** + * Set the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @param maximumElasticWorkerCount the maximumElasticWorkerCount value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount) { + this.maximumElasticWorkerCount = maximumElasticWorkerCount; + return this; + } + + /** + * Get the numberOfSites property: Number of apps assigned to this App Service plan. + * + * @return the numberOfSites value. + */ + public Integer numberOfSites() { + return this.numberOfSites; + } + + /** + * Get the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @return the isSpot value. + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @param isSpot the isSpot value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + return this; + } + + /** + * Get the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @return the spotExpirationTime value. + */ + public OffsetDateTime spotExpirationTime() { + return this.spotExpirationTime; + } + + /** + * Set the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @param spotExpirationTime the spotExpirationTime value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withSpotExpirationTime(OffsetDateTime spotExpirationTime) { + this.spotExpirationTime = spotExpirationTime; + return this; + } + + /** + * Get the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @return the freeOfferExpirationTime value. + */ + public OffsetDateTime freeOfferExpirationTime() { + return this.freeOfferExpirationTime; + } + + /** + * Set the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @param freeOfferExpirationTime the freeOfferExpirationTime value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withFreeOfferExpirationTime(OffsetDateTime freeOfferExpirationTime) { + this.freeOfferExpirationTime = freeOfferExpirationTime; + return this; + } + + /** + * Get the resourceGroup property: Resource group of the App Service plan. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the reserved value. + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param reserved the reserved value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param isXenon the isXenon value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the hyperV value. + */ + public Boolean hyperV() { + return this.hyperV; + } + + /** + * Set the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param hyperV the hyperV value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withHyperV(Boolean hyperV) { + this.hyperV = hyperV; + return this; + } + + /** + * Get the targetWorkerCount property: Scaling worker count. + * + * @return the targetWorkerCount value. + */ + public Integer targetWorkerCount() { + return this.targetWorkerCount; + } + + /** + * Set the targetWorkerCount property: Scaling worker count. + * + * @param targetWorkerCount the targetWorkerCount value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withTargetWorkerCount(Integer targetWorkerCount) { + this.targetWorkerCount = targetWorkerCount; + return this; + } + + /** + * Get the targetWorkerSizeId property: Scaling worker size ID. + * + * @return the targetWorkerSizeId value. + */ + public Integer targetWorkerSizeId() { + return this.targetWorkerSizeId; + } + + /** + * Set the targetWorkerSizeId property: Scaling worker size ID. + * + * @param targetWorkerSizeId the targetWorkerSizeId value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withTargetWorkerSizeId(Integer targetWorkerSizeId) { + this.targetWorkerSizeId = targetWorkerSizeId; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the App Service Plan. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @return the kubeEnvironmentProfile value. + */ + public KubeEnvironmentProfile kubeEnvironmentProfile() { + return this.kubeEnvironmentProfile; + } + + /** + * Set the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @param kubeEnvironmentProfile the kubeEnvironmentProfile value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withKubeEnvironmentProfile( + KubeEnvironmentProfile kubeEnvironmentProfile) { + this.kubeEnvironmentProfile = kubeEnvironmentProfile; + return this; + } + + /** + * Get the zoneRedundant property: If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform availability zone + * balancing. + * + * @return the zoneRedundant value. + */ + public Boolean zoneRedundant() { + return this.zoneRedundant; + } + + /** + * Set the zoneRedundant property: If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform availability zone + * balancing. + * + * @param zoneRedundant the zoneRedundant value to set. + * @return the AppServicePlanPatchResourceProperties object itself. + */ + public AppServicePlanPatchResourceProperties withZoneRedundant(Boolean zoneRedundant) { + this.zoneRedundant = zoneRedundant; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hostingEnvironmentProfile() != null) { + hostingEnvironmentProfile().validate(); + } + if (kubeEnvironmentProfile() != null) { + kubeEnvironmentProfile().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanProperties.java new file mode 100644 index 0000000000000..1f442aad92107 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AppServicePlanProperties.java @@ -0,0 +1,570 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.StatusOptions; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** AppServicePlan resource specific properties. */ +@Fluent +public final class AppServicePlanProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServicePlanProperties.class); + + /* + * Target worker tier assigned to the App Service plan. + */ + @JsonProperty(value = "workerTierName") + private String workerTierName; + + /* + * App Service plan status. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private StatusOptions status; + + /* + * App Service plan subscription. + */ + @JsonProperty(value = "subscription", access = JsonProperty.Access.WRITE_ONLY) + private String subscription; + + /* + * Specification for the App Service Environment to use for the App Service + * plan. + */ + @JsonProperty(value = "hostingEnvironmentProfile") + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /* + * Maximum number of instances that can be assigned to this App Service + * plan. + */ + @JsonProperty(value = "maximumNumberOfWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximumNumberOfWorkers; + + /* + * Geographical location for the App Service plan. + */ + @JsonProperty(value = "geoRegion", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegion; + + /* + * If true, apps assigned to this App Service plan can be + * scaled independently. + * If false, apps assigned to this App Service plan will scale + * to all instances of the plan. + */ + @JsonProperty(value = "perSiteScaling") + private Boolean perSiteScaling; + + /* + * ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku + */ + @JsonProperty(value = "elasticScaleEnabled") + private Boolean elasticScaleEnabled; + + /* + * Maximum number of total workers allowed for this ElasticScaleEnabled App + * Service Plan + */ + @JsonProperty(value = "maximumElasticWorkerCount") + private Integer maximumElasticWorkerCount; + + /* + * Number of apps assigned to this App Service plan. + */ + @JsonProperty(value = "numberOfSites", access = JsonProperty.Access.WRITE_ONLY) + private Integer numberOfSites; + + /* + * If true, this App Service Plan owns spot instances. + */ + @JsonProperty(value = "isSpot") + private Boolean isSpot; + + /* + * The time when the server farm expires. Valid only if it is a spot server + * farm. + */ + @JsonProperty(value = "spotExpirationTime") + private OffsetDateTime spotExpirationTime; + + /* + * The time when the server farm free offer expires. + */ + @JsonProperty(value = "freeOfferExpirationTime") + private OffsetDateTime freeOfferExpirationTime; + + /* + * Resource group of the App Service plan. + */ + @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /* + * If Linux app service plan true, false + * otherwise. + */ + @JsonProperty(value = "reserved") + private Boolean reserved; + + /* + * Obsolete: If Hyper-V container app service plan true, + * false otherwise. + */ + @JsonProperty(value = "isXenon") + private Boolean isXenon; + + /* + * If Hyper-V container app service plan true, + * false otherwise. + */ + @JsonProperty(value = "hyperV") + private Boolean hyperV; + + /* + * Scaling worker count. + */ + @JsonProperty(value = "targetWorkerCount") + private Integer targetWorkerCount; + + /* + * Scaling worker size ID. + */ + @JsonProperty(value = "targetWorkerSizeId") + private Integer targetWorkerSizeId; + + /* + * Provisioning state of the App Service Plan. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Specification for the Kubernetes Environment to use for the App Service + * plan. + */ + @JsonProperty(value = "kubeEnvironmentProfile") + private KubeEnvironmentProfile kubeEnvironmentProfile; + + /* + * If true, this App Service Plan will perform availability + * zone balancing. + * If false, this App Service Plan will not perform + * availability zone balancing. + */ + @JsonProperty(value = "zoneRedundant") + private Boolean zoneRedundant; + + /** + * Get the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @return the workerTierName value. + */ + public String workerTierName() { + return this.workerTierName; + } + + /** + * Set the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @param workerTierName the workerTierName value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withWorkerTierName(String workerTierName) { + this.workerTierName = workerTierName; + return this; + } + + /** + * Get the status property: App Service plan status. + * + * @return the status value. + */ + public StatusOptions status() { + return this.status; + } + + /** + * Get the subscription property: App Service plan subscription. + * + * @return the subscription value. + */ + public String subscription() { + return this.subscription; + } + + /** + * Get the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get the maximumNumberOfWorkers property: Maximum number of instances that can be assigned to this App Service + * plan. + * + * @return the maximumNumberOfWorkers value. + */ + public Integer maximumNumberOfWorkers() { + return this.maximumNumberOfWorkers; + } + + /** + * Get the geoRegion property: Geographical location for the App Service plan. + * + * @return the geoRegion value. + */ + public String geoRegion() { + return this.geoRegion; + } + + /** + * Get the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @return the perSiteScaling value. + */ + public Boolean perSiteScaling() { + return this.perSiteScaling; + } + + /** + * Set the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @param perSiteScaling the perSiteScaling value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withPerSiteScaling(Boolean perSiteScaling) { + this.perSiteScaling = perSiteScaling; + return this; + } + + /** + * Get the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @return the elasticScaleEnabled value. + */ + public Boolean elasticScaleEnabled() { + return this.elasticScaleEnabled; + } + + /** + * Set the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @param elasticScaleEnabled the elasticScaleEnabled value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withElasticScaleEnabled(Boolean elasticScaleEnabled) { + this.elasticScaleEnabled = elasticScaleEnabled; + return this; + } + + /** + * Get the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @return the maximumElasticWorkerCount value. + */ + public Integer maximumElasticWorkerCount() { + return this.maximumElasticWorkerCount; + } + + /** + * Set the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @param maximumElasticWorkerCount the maximumElasticWorkerCount value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount) { + this.maximumElasticWorkerCount = maximumElasticWorkerCount; + return this; + } + + /** + * Get the numberOfSites property: Number of apps assigned to this App Service plan. + * + * @return the numberOfSites value. + */ + public Integer numberOfSites() { + return this.numberOfSites; + } + + /** + * Get the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @return the isSpot value. + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @param isSpot the isSpot value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + return this; + } + + /** + * Get the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @return the spotExpirationTime value. + */ + public OffsetDateTime spotExpirationTime() { + return this.spotExpirationTime; + } + + /** + * Set the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @param spotExpirationTime the spotExpirationTime value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withSpotExpirationTime(OffsetDateTime spotExpirationTime) { + this.spotExpirationTime = spotExpirationTime; + return this; + } + + /** + * Get the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @return the freeOfferExpirationTime value. + */ + public OffsetDateTime freeOfferExpirationTime() { + return this.freeOfferExpirationTime; + } + + /** + * Set the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @param freeOfferExpirationTime the freeOfferExpirationTime value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withFreeOfferExpirationTime(OffsetDateTime freeOfferExpirationTime) { + this.freeOfferExpirationTime = freeOfferExpirationTime; + return this; + } + + /** + * Get the resourceGroup property: Resource group of the App Service plan. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the reserved value. + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param reserved the reserved value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param isXenon the isXenon value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the hyperV value. + */ + public Boolean hyperV() { + return this.hyperV; + } + + /** + * Set the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param hyperV the hyperV value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withHyperV(Boolean hyperV) { + this.hyperV = hyperV; + return this; + } + + /** + * Get the targetWorkerCount property: Scaling worker count. + * + * @return the targetWorkerCount value. + */ + public Integer targetWorkerCount() { + return this.targetWorkerCount; + } + + /** + * Set the targetWorkerCount property: Scaling worker count. + * + * @param targetWorkerCount the targetWorkerCount value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withTargetWorkerCount(Integer targetWorkerCount) { + this.targetWorkerCount = targetWorkerCount; + return this; + } + + /** + * Get the targetWorkerSizeId property: Scaling worker size ID. + * + * @return the targetWorkerSizeId value. + */ + public Integer targetWorkerSizeId() { + return this.targetWorkerSizeId; + } + + /** + * Set the targetWorkerSizeId property: Scaling worker size ID. + * + * @param targetWorkerSizeId the targetWorkerSizeId value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withTargetWorkerSizeId(Integer targetWorkerSizeId) { + this.targetWorkerSizeId = targetWorkerSizeId; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the App Service Plan. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @return the kubeEnvironmentProfile value. + */ + public KubeEnvironmentProfile kubeEnvironmentProfile() { + return this.kubeEnvironmentProfile; + } + + /** + * Set the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @param kubeEnvironmentProfile the kubeEnvironmentProfile value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withKubeEnvironmentProfile(KubeEnvironmentProfile kubeEnvironmentProfile) { + this.kubeEnvironmentProfile = kubeEnvironmentProfile; + return this; + } + + /** + * Get the zoneRedundant property: If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform availability zone + * balancing. + * + * @return the zoneRedundant value. + */ + public Boolean zoneRedundant() { + return this.zoneRedundant; + } + + /** + * Set the zoneRedundant property: If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform availability zone + * balancing. + * + * @param zoneRedundant the zoneRedundant value to set. + * @return the AppServicePlanProperties object itself. + */ + public AppServicePlanProperties withZoneRedundant(Boolean zoneRedundant) { + this.zoneRedundant = zoneRedundant; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hostingEnvironmentProfile() != null) { + hostingEnvironmentProfile().validate(); + } + if (kubeEnvironmentProfile() != null) { + kubeEnvironmentProfile().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApplicationStack.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApplicationStack.java new file mode 100644 index 0000000000000..b388389993890 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApplicationStack.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.StackMajorVersion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Application stack. */ +@Fluent +public final class ApplicationStack { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationStack.class); + + /* + * Application stack name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Application stack display name. + */ + @JsonProperty(value = "display") + private String display; + + /* + * Application stack dependency. + */ + @JsonProperty(value = "dependency") + private String dependency; + + /* + * List of major versions available. + */ + @JsonProperty(value = "majorVersions") + private List majorVersions; + + /* + * List of frameworks associated with application stack. + */ + @JsonProperty(value = "frameworks") + private List frameworks; + + /* + * true if this is the stack is deprecated; otherwise, + * false. + */ + @JsonProperty(value = "isDeprecated") + private List isDeprecated; + + /** + * Get the name property: Application stack name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Application stack name. + * + * @param name the name value to set. + * @return the ApplicationStack object itself. + */ + public ApplicationStack withName(String name) { + this.name = name; + return this; + } + + /** + * Get the display property: Application stack display name. + * + * @return the display value. + */ + public String display() { + return this.display; + } + + /** + * Set the display property: Application stack display name. + * + * @param display the display value to set. + * @return the ApplicationStack object itself. + */ + public ApplicationStack withDisplay(String display) { + this.display = display; + return this; + } + + /** + * Get the dependency property: Application stack dependency. + * + * @return the dependency value. + */ + public String dependency() { + return this.dependency; + } + + /** + * Set the dependency property: Application stack dependency. + * + * @param dependency the dependency value to set. + * @return the ApplicationStack object itself. + */ + public ApplicationStack withDependency(String dependency) { + this.dependency = dependency; + return this; + } + + /** + * Get the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + public List majorVersions() { + return this.majorVersions; + } + + /** + * Set the majorVersions property: List of major versions available. + * + * @param majorVersions the majorVersions value to set. + * @return the ApplicationStack object itself. + */ + public ApplicationStack withMajorVersions(List majorVersions) { + this.majorVersions = majorVersions; + return this; + } + + /** + * Get the frameworks property: List of frameworks associated with application stack. + * + * @return the frameworks value. + */ + public List frameworks() { + return this.frameworks; + } + + /** + * Set the frameworks property: List of frameworks associated with application stack. + * + * @param frameworks the frameworks value to set. + * @return the ApplicationStack object itself. + */ + public ApplicationStack withFrameworks(List frameworks) { + this.frameworks = frameworks; + return this; + } + + /** + * Get the isDeprecated property: <code>true</code> if this is the stack is deprecated; otherwise, + * <code>false</code>. + * + * @return the isDeprecated value. + */ + public List isDeprecated() { + return this.isDeprecated; + } + + /** + * Set the isDeprecated property: <code>true</code> if this is the stack is deprecated; otherwise, + * <code>false</code>. + * + * @param isDeprecated the isDeprecated value to set. + * @return the ApplicationStack object itself. + */ + public ApplicationStack withIsDeprecated(List isDeprecated) { + this.isDeprecated = isDeprecated; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (majorVersions() != null) { + majorVersions().forEach(e -> e.validate()); + } + if (frameworks() != null) { + frameworks().forEach(e -> e.validate()); + } + if (isDeprecated() != null) { + isDeprecated().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApplicationStackResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApplicationStackResourceInner.java new file mode 100644 index 0000000000000..f655bf4e496dc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ApplicationStackResourceInner.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.StackMajorVersion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** ARM resource for a ApplicationStack. */ +@Fluent +public final class ApplicationStackResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationStackResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private ApplicationStack innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private ApplicationStack innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ApplicationStackResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the name property: Application stack name. + * + * @return the name value. + */ + public String namePropertiesName() { + return this.innerProperties() == null ? null : this.innerProperties().name(); + } + + /** + * Set the name property: Application stack name. + * + * @param name the name value to set. + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withNamePropertiesName(String name) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationStack(); + } + this.innerProperties().withName(name); + return this; + } + + /** + * Get the display property: Application stack display name. + * + * @return the display value. + */ + public String display() { + return this.innerProperties() == null ? null : this.innerProperties().display(); + } + + /** + * Set the display property: Application stack display name. + * + * @param display the display value to set. + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withDisplay(String display) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationStack(); + } + this.innerProperties().withDisplay(display); + return this; + } + + /** + * Get the dependency property: Application stack dependency. + * + * @return the dependency value. + */ + public String dependency() { + return this.innerProperties() == null ? null : this.innerProperties().dependency(); + } + + /** + * Set the dependency property: Application stack dependency. + * + * @param dependency the dependency value to set. + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withDependency(String dependency) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationStack(); + } + this.innerProperties().withDependency(dependency); + return this; + } + + /** + * Get the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + public List majorVersions() { + return this.innerProperties() == null ? null : this.innerProperties().majorVersions(); + } + + /** + * Set the majorVersions property: List of major versions available. + * + * @param majorVersions the majorVersions value to set. + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withMajorVersions(List majorVersions) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationStack(); + } + this.innerProperties().withMajorVersions(majorVersions); + return this; + } + + /** + * Get the frameworks property: List of frameworks associated with application stack. + * + * @return the frameworks value. + */ + public List frameworks() { + return this.innerProperties() == null ? null : this.innerProperties().frameworks(); + } + + /** + * Set the frameworks property: List of frameworks associated with application stack. + * + * @param frameworks the frameworks value to set. + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withFrameworks(List frameworks) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationStack(); + } + this.innerProperties().withFrameworks(frameworks); + return this; + } + + /** + * Get the isDeprecated property: <code>true</code> if this is the stack is deprecated; otherwise, + * <code>false</code>. + * + * @return the isDeprecated value. + */ + public List isDeprecated() { + return this.innerProperties() == null ? null : this.innerProperties().isDeprecated(); + } + + /** + * Set the isDeprecated property: <code>true</code> if this is the stack is deprecated; otherwise, + * <code>false</code>. + * + * @param isDeprecated the isDeprecated value to set. + * @return the ApplicationStackResourceInner object itself. + */ + public ApplicationStackResourceInner withIsDeprecated(List isDeprecated) { + if (this.innerProperties() == null) { + this.innerProperties = new ApplicationStack(); + } + this.innerProperties().withIsDeprecated(isDeprecated); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AseV3NetworkingConfigurationInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AseV3NetworkingConfigurationInner.java new file mode 100644 index 0000000000000..eb933cf2c5f89 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AseV3NetworkingConfigurationInner.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Full view of networking configuration for an ASE. */ +@Fluent +public final class AseV3NetworkingConfigurationInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AseV3NetworkingConfigurationInner.class); + + /* + * AseV3NetworkingConfiguration resource specific properties + */ + @JsonProperty(value = "properties") + private AseV3NetworkingConfigurationProperties innerProperties; + + /** + * Get the innerProperties property: AseV3NetworkingConfiguration resource specific properties. + * + * @return the innerProperties value. + */ + private AseV3NetworkingConfigurationProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public AseV3NetworkingConfigurationInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the windowsOutboundIpAddresses property: The windowsOutboundIpAddresses property. + * + * @return the windowsOutboundIpAddresses value. + */ + public List windowsOutboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().windowsOutboundIpAddresses(); + } + + /** + * Get the linuxOutboundIpAddresses property: The linuxOutboundIpAddresses property. + * + * @return the linuxOutboundIpAddresses value. + */ + public List linuxOutboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().linuxOutboundIpAddresses(); + } + + /** + * Get the externalInboundIpAddresses property: The externalInboundIpAddresses property. + * + * @return the externalInboundIpAddresses value. + */ + public List externalInboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().externalInboundIpAddresses(); + } + + /** + * Get the internalInboundIpAddresses property: The internalInboundIpAddresses property. + * + * @return the internalInboundIpAddresses value. + */ + public List internalInboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().internalInboundIpAddresses(); + } + + /** + * Get the allowNewPrivateEndpointConnections property: Property to enable and disable new private endpoint + * connection creation on ASE. + * + * @return the allowNewPrivateEndpointConnections value. + */ + public Boolean allowNewPrivateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().allowNewPrivateEndpointConnections(); + } + + /** + * Set the allowNewPrivateEndpointConnections property: Property to enable and disable new private endpoint + * connection creation on ASE. + * + * @param allowNewPrivateEndpointConnections the allowNewPrivateEndpointConnections value to set. + * @return the AseV3NetworkingConfigurationInner object itself. + */ + public AseV3NetworkingConfigurationInner withAllowNewPrivateEndpointConnections( + Boolean allowNewPrivateEndpointConnections) { + if (this.innerProperties() == null) { + this.innerProperties = new AseV3NetworkingConfigurationProperties(); + } + this.innerProperties().withAllowNewPrivateEndpointConnections(allowNewPrivateEndpointConnections); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AseV3NetworkingConfigurationProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AseV3NetworkingConfigurationProperties.java new file mode 100644 index 0000000000000..e80ad8153a17d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AseV3NetworkingConfigurationProperties.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** AseV3NetworkingConfiguration resource specific properties. */ +@Fluent +public final class AseV3NetworkingConfigurationProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AseV3NetworkingConfigurationProperties.class); + + /* + * The windowsOutboundIpAddresses property. + */ + @JsonProperty(value = "windowsOutboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private List windowsOutboundIpAddresses; + + /* + * The linuxOutboundIpAddresses property. + */ + @JsonProperty(value = "linuxOutboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private List linuxOutboundIpAddresses; + + /* + * The externalInboundIpAddresses property. + */ + @JsonProperty(value = "externalInboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private List externalInboundIpAddresses; + + /* + * The internalInboundIpAddresses property. + */ + @JsonProperty(value = "internalInboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private List internalInboundIpAddresses; + + /* + * Property to enable and disable new private endpoint connection creation + * on ASE + */ + @JsonProperty(value = "allowNewPrivateEndpointConnections") + private Boolean allowNewPrivateEndpointConnections; + + /** + * Get the windowsOutboundIpAddresses property: The windowsOutboundIpAddresses property. + * + * @return the windowsOutboundIpAddresses value. + */ + public List windowsOutboundIpAddresses() { + return this.windowsOutboundIpAddresses; + } + + /** + * Get the linuxOutboundIpAddresses property: The linuxOutboundIpAddresses property. + * + * @return the linuxOutboundIpAddresses value. + */ + public List linuxOutboundIpAddresses() { + return this.linuxOutboundIpAddresses; + } + + /** + * Get the externalInboundIpAddresses property: The externalInboundIpAddresses property. + * + * @return the externalInboundIpAddresses value. + */ + public List externalInboundIpAddresses() { + return this.externalInboundIpAddresses; + } + + /** + * Get the internalInboundIpAddresses property: The internalInboundIpAddresses property. + * + * @return the internalInboundIpAddresses value. + */ + public List internalInboundIpAddresses() { + return this.internalInboundIpAddresses; + } + + /** + * Get the allowNewPrivateEndpointConnections property: Property to enable and disable new private endpoint + * connection creation on ASE. + * + * @return the allowNewPrivateEndpointConnections value. + */ + public Boolean allowNewPrivateEndpointConnections() { + return this.allowNewPrivateEndpointConnections; + } + + /** + * Set the allowNewPrivateEndpointConnections property: Property to enable and disable new private endpoint + * connection creation on ASE. + * + * @param allowNewPrivateEndpointConnections the allowNewPrivateEndpointConnections value to set. + * @return the AseV3NetworkingConfigurationProperties object itself. + */ + public AseV3NetworkingConfigurationProperties withAllowNewPrivateEndpointConnections( + Boolean allowNewPrivateEndpointConnections) { + this.allowNewPrivateEndpointConnections = allowNewPrivateEndpointConnections; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AzureStoragePropertyDictionaryResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AzureStoragePropertyDictionaryResourceInner.java new file mode 100644 index 0000000000000..b4b346eea123d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/AzureStoragePropertyDictionaryResourceInner.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AzureStorageInfoValue; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** AzureStorageInfo dictionary resource. */ +@Fluent +public final class AzureStoragePropertyDictionaryResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureStoragePropertyDictionaryResourceInner.class); + + /* + * Azure storage accounts. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /** + * Get the properties property: Azure storage accounts. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Azure storage accounts. + * + * @param properties the properties value to set. + * @return the AzureStoragePropertyDictionaryResourceInner object itself. + */ + public AzureStoragePropertyDictionaryResourceInner withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureStoragePropertyDictionaryResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (properties() != null) { + properties() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupItemInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupItemInner.java new file mode 100644 index 0000000000000..32095f3aa64a1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupItemInner.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BackupItemStatus; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Backup description. */ +@Fluent +public final class BackupItemInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupItemInner.class); + + /* + * BackupItem resource specific properties + */ + @JsonProperty(value = "properties") + private BackupItemProperties innerProperties; + + /** + * Get the innerProperties property: BackupItem resource specific properties. + * + * @return the innerProperties value. + */ + private BackupItemProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public BackupItemInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the backupId property: Id of the backup. + * + * @return the backupId value. + */ + public Integer backupId() { + return this.innerProperties() == null ? null : this.innerProperties().backupId(); + } + + /** + * Get the storageAccountUrl property: SAS URL for the storage account container which contains this backup. + * + * @return the storageAccountUrl value. + */ + public String storageAccountUrl() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountUrl(); + } + + /** + * Get the blobName property: Name of the blob which contains data for this backup. + * + * @return the blobName value. + */ + public String blobName() { + return this.innerProperties() == null ? null : this.innerProperties().blobName(); + } + + /** + * Get the name property: Name of this backup. + * + * @return the name value. + */ + public String namePropertiesName() { + return this.innerProperties() == null ? null : this.innerProperties().name(); + } + + /** + * Get the status property: Backup status. + * + * @return the status value. + */ + public BackupItemStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the sizeInBytes property: Size of the backup in bytes. + * + * @return the sizeInBytes value. + */ + public Long sizeInBytes() { + return this.innerProperties() == null ? null : this.innerProperties().sizeInBytes(); + } + + /** + * Get the created property: Timestamp of the backup creation. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.innerProperties() == null ? null : this.innerProperties().created(); + } + + /** + * Get the log property: Details regarding this backup. Might contain an error message. + * + * @return the log value. + */ + public String log() { + return this.innerProperties() == null ? null : this.innerProperties().log(); + } + + /** + * Get the databases property: List of databases included in the backup. + * + * @return the databases value. + */ + public List databases() { + return this.innerProperties() == null ? null : this.innerProperties().databases(); + } + + /** + * Get the scheduled property: True if this backup has been created due to a schedule being triggered. + * + * @return the scheduled value. + */ + public Boolean scheduled() { + return this.innerProperties() == null ? null : this.innerProperties().scheduled(); + } + + /** + * Get the lastRestoreTimestamp property: Timestamp of a last restore operation which used this backup. + * + * @return the lastRestoreTimestamp value. + */ + public OffsetDateTime lastRestoreTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().lastRestoreTimestamp(); + } + + /** + * Get the finishedTimestamp property: Timestamp when this backup finished. + * + * @return the finishedTimestamp value. + */ + public OffsetDateTime finishedTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().finishedTimestamp(); + } + + /** + * Get the correlationId property: Unique correlation identifier. Please use this along with the timestamp while + * communicating with Azure support. + * + * @return the correlationId value. + */ + public String correlationId() { + return this.innerProperties() == null ? null : this.innerProperties().correlationId(); + } + + /** + * Get the websiteSizeInBytes property: Size of the original web app which has been backed up. + * + * @return the websiteSizeInBytes value. + */ + public Long websiteSizeInBytes() { + return this.innerProperties() == null ? null : this.innerProperties().websiteSizeInBytes(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupItemProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupItemProperties.java new file mode 100644 index 0000000000000..4223636a416ad --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupItemProperties.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BackupItemStatus; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** BackupItem resource specific properties. */ +@Immutable +public final class BackupItemProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupItemProperties.class); + + /* + * Id of the backup. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private Integer backupId; + + /* + * SAS URL for the storage account container which contains this backup. + */ + @JsonProperty(value = "storageAccountUrl", access = JsonProperty.Access.WRITE_ONLY) + private String storageAccountUrl; + + /* + * Name of the blob which contains data for this backup. + */ + @JsonProperty(value = "blobName", access = JsonProperty.Access.WRITE_ONLY) + private String blobName; + + /* + * Name of this backup. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Backup status. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private BackupItemStatus status; + + /* + * Size of the backup in bytes. + */ + @JsonProperty(value = "sizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long sizeInBytes; + + /* + * Timestamp of the backup creation. + */ + @JsonProperty(value = "created", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime created; + + /* + * Details regarding this backup. Might contain an error message. + */ + @JsonProperty(value = "log", access = JsonProperty.Access.WRITE_ONLY) + private String log; + + /* + * List of databases included in the backup. + */ + @JsonProperty(value = "databases", access = JsonProperty.Access.WRITE_ONLY) + private List databases; + + /* + * True if this backup has been created due to a schedule being triggered. + */ + @JsonProperty(value = "scheduled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean scheduled; + + /* + * Timestamp of a last restore operation which used this backup. + */ + @JsonProperty(value = "lastRestoreTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastRestoreTimestamp; + + /* + * Timestamp when this backup finished. + */ + @JsonProperty(value = "finishedTimeStamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime finishedTimestamp; + + /* + * Unique correlation identifier. Please use this along with the timestamp + * while communicating with Azure support. + */ + @JsonProperty(value = "correlationId", access = JsonProperty.Access.WRITE_ONLY) + private String correlationId; + + /* + * Size of the original web app which has been backed up. + */ + @JsonProperty(value = "websiteSizeInBytes", access = JsonProperty.Access.WRITE_ONLY) + private Long websiteSizeInBytes; + + /** + * Get the backupId property: Id of the backup. + * + * @return the backupId value. + */ + public Integer backupId() { + return this.backupId; + } + + /** + * Get the storageAccountUrl property: SAS URL for the storage account container which contains this backup. + * + * @return the storageAccountUrl value. + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Get the blobName property: Name of the blob which contains data for this backup. + * + * @return the blobName value. + */ + public String blobName() { + return this.blobName; + } + + /** + * Get the name property: Name of this backup. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: Backup status. + * + * @return the status value. + */ + public BackupItemStatus status() { + return this.status; + } + + /** + * Get the sizeInBytes property: Size of the backup in bytes. + * + * @return the sizeInBytes value. + */ + public Long sizeInBytes() { + return this.sizeInBytes; + } + + /** + * Get the created property: Timestamp of the backup creation. + * + * @return the created value. + */ + public OffsetDateTime created() { + return this.created; + } + + /** + * Get the log property: Details regarding this backup. Might contain an error message. + * + * @return the log value. + */ + public String log() { + return this.log; + } + + /** + * Get the databases property: List of databases included in the backup. + * + * @return the databases value. + */ + public List databases() { + return this.databases; + } + + /** + * Get the scheduled property: True if this backup has been created due to a schedule being triggered. + * + * @return the scheduled value. + */ + public Boolean scheduled() { + return this.scheduled; + } + + /** + * Get the lastRestoreTimestamp property: Timestamp of a last restore operation which used this backup. + * + * @return the lastRestoreTimestamp value. + */ + public OffsetDateTime lastRestoreTimestamp() { + return this.lastRestoreTimestamp; + } + + /** + * Get the finishedTimestamp property: Timestamp when this backup finished. + * + * @return the finishedTimestamp value. + */ + public OffsetDateTime finishedTimestamp() { + return this.finishedTimestamp; + } + + /** + * Get the correlationId property: Unique correlation identifier. Please use this along with the timestamp while + * communicating with Azure support. + * + * @return the correlationId value. + */ + public String correlationId() { + return this.correlationId; + } + + /** + * Get the websiteSizeInBytes property: Size of the original web app which has been backed up. + * + * @return the websiteSizeInBytes value. + */ + public Long websiteSizeInBytes() { + return this.websiteSizeInBytes; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (databases() != null) { + databases().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupRequestInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupRequestInner.java new file mode 100644 index 0000000000000..410cb38a1cba8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupRequestInner.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BackupSchedule; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Description of a backup which will be performed. */ +@Fluent +public final class BackupRequestInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupRequestInner.class); + + /* + * BackupRequest resource specific properties + */ + @JsonProperty(value = "properties") + private BackupRequestProperties innerProperties; + + /** + * Get the innerProperties property: BackupRequest resource specific properties. + * + * @return the innerProperties value. + */ + private BackupRequestProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public BackupRequestInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the backupName property: Name of the backup. + * + * @return the backupName value. + */ + public String backupName() { + return this.innerProperties() == null ? null : this.innerProperties().backupName(); + } + + /** + * Set the backupName property: Name of the backup. + * + * @param backupName the backupName value to set. + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withBackupName(String backupName) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupRequestProperties(); + } + this.innerProperties().withBackupName(backupName); + return this; + } + + /** + * Get the enabled property: True if the backup schedule is enabled (must be included in that case), false if the + * backup schedule should be disabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: True if the backup schedule is enabled (must be included in that case), false if the + * backup schedule should be disabled. + * + * @param enabled the enabled value to set. + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupRequestProperties(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the storageAccountUrl property: SAS URL to the container. + * + * @return the storageAccountUrl value. + */ + public String storageAccountUrl() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountUrl(); + } + + /** + * Set the storageAccountUrl property: SAS URL to the container. + * + * @param storageAccountUrl the storageAccountUrl value to set. + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withStorageAccountUrl(String storageAccountUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupRequestProperties(); + } + this.innerProperties().withStorageAccountUrl(storageAccountUrl); + return this; + } + + /** + * Get the backupSchedule property: Schedule for the backup if it is executed periodically. + * + * @return the backupSchedule value. + */ + public BackupSchedule backupSchedule() { + return this.innerProperties() == null ? null : this.innerProperties().backupSchedule(); + } + + /** + * Set the backupSchedule property: Schedule for the backup if it is executed periodically. + * + * @param backupSchedule the backupSchedule value to set. + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withBackupSchedule(BackupSchedule backupSchedule) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupRequestProperties(); + } + this.innerProperties().withBackupSchedule(backupSchedule); + return this; + } + + /** + * Get the databases property: Databases included in the backup. + * + * @return the databases value. + */ + public List databases() { + return this.innerProperties() == null ? null : this.innerProperties().databases(); + } + + /** + * Set the databases property: Databases included in the backup. + * + * @param databases the databases value to set. + * @return the BackupRequestInner object itself. + */ + public BackupRequestInner withDatabases(List databases) { + if (this.innerProperties() == null) { + this.innerProperties = new BackupRequestProperties(); + } + this.innerProperties().withDatabases(databases); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupRequestProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupRequestProperties.java new file mode 100644 index 0000000000000..346a6ab8f4b70 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BackupRequestProperties.java @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BackupSchedule; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** BackupRequest resource specific properties. */ +@Fluent +public final class BackupRequestProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupRequestProperties.class); + + /* + * Name of the backup. + */ + @JsonProperty(value = "backupName") + private String backupName; + + /* + * True if the backup schedule is enabled (must be included in that case), + * false if the backup schedule should be disabled. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * SAS URL to the container. + */ + @JsonProperty(value = "storageAccountUrl", required = true) + private String storageAccountUrl; + + /* + * Schedule for the backup if it is executed periodically. + */ + @JsonProperty(value = "backupSchedule") + private BackupSchedule backupSchedule; + + /* + * Databases included in the backup. + */ + @JsonProperty(value = "databases") + private List databases; + + /** + * Get the backupName property: Name of the backup. + * + * @return the backupName value. + */ + public String backupName() { + return this.backupName; + } + + /** + * Set the backupName property: Name of the backup. + * + * @param backupName the backupName value to set. + * @return the BackupRequestProperties object itself. + */ + public BackupRequestProperties withBackupName(String backupName) { + this.backupName = backupName; + return this; + } + + /** + * Get the enabled property: True if the backup schedule is enabled (must be included in that case), false if the + * backup schedule should be disabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: True if the backup schedule is enabled (must be included in that case), false if the + * backup schedule should be disabled. + * + * @param enabled the enabled value to set. + * @return the BackupRequestProperties object itself. + */ + public BackupRequestProperties withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the storageAccountUrl property: SAS URL to the container. + * + * @return the storageAccountUrl value. + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Set the storageAccountUrl property: SAS URL to the container. + * + * @param storageAccountUrl the storageAccountUrl value to set. + * @return the BackupRequestProperties object itself. + */ + public BackupRequestProperties withStorageAccountUrl(String storageAccountUrl) { + this.storageAccountUrl = storageAccountUrl; + return this; + } + + /** + * Get the backupSchedule property: Schedule for the backup if it is executed periodically. + * + * @return the backupSchedule value. + */ + public BackupSchedule backupSchedule() { + return this.backupSchedule; + } + + /** + * Set the backupSchedule property: Schedule for the backup if it is executed periodically. + * + * @param backupSchedule the backupSchedule value to set. + * @return the BackupRequestProperties object itself. + */ + public BackupRequestProperties withBackupSchedule(BackupSchedule backupSchedule) { + this.backupSchedule = backupSchedule; + return this; + } + + /** + * Get the databases property: Databases included in the backup. + * + * @return the databases value. + */ + public List databases() { + return this.databases; + } + + /** + * Set the databases property: Databases included in the backup. + * + * @param databases the databases value to set. + * @return the BackupRequestProperties object itself. + */ + public BackupRequestProperties withDatabases(List databases) { + this.databases = databases; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccountUrl() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property storageAccountUrl in model BackupRequestProperties")); + } + if (backupSchedule() != null) { + backupSchedule().validate(); + } + if (databases() != null) { + databases().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BillingMeterInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BillingMeterInner.java new file mode 100644 index 0000000000000..ffd29c6a0d40c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BillingMeterInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * App Service billing entity that contains information about meter which the Azure billing system utilizes to charge + * users for services. + */ +@Fluent +public final class BillingMeterInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingMeterInner.class); + + /* + * BillingMeter resource specific properties + */ + @JsonProperty(value = "properties") + private BillingMeterProperties innerProperties; + + /** + * Get the innerProperties property: BillingMeter resource specific properties. + * + * @return the innerProperties value. + */ + private BillingMeterProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public BillingMeterInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the meterId property: Meter GUID onboarded in Commerce. + * + * @return the meterId value. + */ + public String meterId() { + return this.innerProperties() == null ? null : this.innerProperties().meterId(); + } + + /** + * Set the meterId property: Meter GUID onboarded in Commerce. + * + * @param meterId the meterId value to set. + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withMeterId(String meterId) { + if (this.innerProperties() == null) { + this.innerProperties = new BillingMeterProperties(); + } + this.innerProperties().withMeterId(meterId); + return this; + } + + /** + * Get the billingLocation property: Azure Location of billable resource. + * + * @return the billingLocation value. + */ + public String billingLocation() { + return this.innerProperties() == null ? null : this.innerProperties().billingLocation(); + } + + /** + * Set the billingLocation property: Azure Location of billable resource. + * + * @param billingLocation the billingLocation value to set. + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withBillingLocation(String billingLocation) { + if (this.innerProperties() == null) { + this.innerProperties = new BillingMeterProperties(); + } + this.innerProperties().withBillingLocation(billingLocation); + return this; + } + + /** + * Get the shortName property: Short Name from App Service Azure pricing Page. + * + * @return the shortName value. + */ + public String shortName() { + return this.innerProperties() == null ? null : this.innerProperties().shortName(); + } + + /** + * Set the shortName property: Short Name from App Service Azure pricing Page. + * + * @param shortName the shortName value to set. + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withShortName(String shortName) { + if (this.innerProperties() == null) { + this.innerProperties = new BillingMeterProperties(); + } + this.innerProperties().withShortName(shortName); + return this; + } + + /** + * Get the friendlyName property: Friendly name of the meter. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + } + + /** + * Set the friendlyName property: Friendly name of the meter. + * + * @param friendlyName the friendlyName value to set. + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withFriendlyName(String friendlyName) { + if (this.innerProperties() == null) { + this.innerProperties = new BillingMeterProperties(); + } + this.innerProperties().withFriendlyName(friendlyName); + return this; + } + + /** + * Get the resourceType property: App Service ResourceType meter used for. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.innerProperties() == null ? null : this.innerProperties().resourceType(); + } + + /** + * Set the resourceType property: App Service ResourceType meter used for. + * + * @param resourceType the resourceType value to set. + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withResourceType(String resourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new BillingMeterProperties(); + } + this.innerProperties().withResourceType(resourceType); + return this; + } + + /** + * Get the osType property: App Service OS type meter used for. + * + * @return the osType value. + */ + public String osType() { + return this.innerProperties() == null ? null : this.innerProperties().osType(); + } + + /** + * Set the osType property: App Service OS type meter used for. + * + * @param osType the osType value to set. + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withOsType(String osType) { + if (this.innerProperties() == null) { + this.innerProperties = new BillingMeterProperties(); + } + this.innerProperties().withOsType(osType); + return this; + } + + /** + * Get the multiplier property: Meter Multiplier. + * + * @return the multiplier value. + */ + public Double multiplier() { + return this.innerProperties() == null ? null : this.innerProperties().multiplier(); + } + + /** + * Set the multiplier property: Meter Multiplier. + * + * @param multiplier the multiplier value to set. + * @return the BillingMeterInner object itself. + */ + public BillingMeterInner withMultiplier(Double multiplier) { + if (this.innerProperties() == null) { + this.innerProperties = new BillingMeterProperties(); + } + this.innerProperties().withMultiplier(multiplier); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BillingMeterProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BillingMeterProperties.java new file mode 100644 index 0000000000000..2f344b7236200 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/BillingMeterProperties.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** BillingMeter resource specific properties. */ +@Fluent +public final class BillingMeterProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingMeterProperties.class); + + /* + * Meter GUID onboarded in Commerce + */ + @JsonProperty(value = "meterId") + private String meterId; + + /* + * Azure Location of billable resource + */ + @JsonProperty(value = "billingLocation") + private String billingLocation; + + /* + * Short Name from App Service Azure pricing Page + */ + @JsonProperty(value = "shortName") + private String shortName; + + /* + * Friendly name of the meter + */ + @JsonProperty(value = "friendlyName") + private String friendlyName; + + /* + * App Service ResourceType meter used for + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /* + * App Service OS type meter used for + */ + @JsonProperty(value = "osType") + private String osType; + + /* + * Meter Multiplier + */ + @JsonProperty(value = "multiplier") + private Double multiplier; + + /** + * Get the meterId property: Meter GUID onboarded in Commerce. + * + * @return the meterId value. + */ + public String meterId() { + return this.meterId; + } + + /** + * Set the meterId property: Meter GUID onboarded in Commerce. + * + * @param meterId the meterId value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withMeterId(String meterId) { + this.meterId = meterId; + return this; + } + + /** + * Get the billingLocation property: Azure Location of billable resource. + * + * @return the billingLocation value. + */ + public String billingLocation() { + return this.billingLocation; + } + + /** + * Set the billingLocation property: Azure Location of billable resource. + * + * @param billingLocation the billingLocation value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withBillingLocation(String billingLocation) { + this.billingLocation = billingLocation; + return this; + } + + /** + * Get the shortName property: Short Name from App Service Azure pricing Page. + * + * @return the shortName value. + */ + public String shortName() { + return this.shortName; + } + + /** + * Set the shortName property: Short Name from App Service Azure pricing Page. + * + * @param shortName the shortName value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withShortName(String shortName) { + this.shortName = shortName; + return this; + } + + /** + * Get the friendlyName property: Friendly name of the meter. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Set the friendlyName property: Friendly name of the meter. + * + * @param friendlyName the friendlyName value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withFriendlyName(String friendlyName) { + this.friendlyName = friendlyName; + return this; + } + + /** + * Get the resourceType property: App Service ResourceType meter used for. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: App Service ResourceType meter used for. + * + * @param resourceType the resourceType value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the osType property: App Service OS type meter used for. + * + * @return the osType value. + */ + public String osType() { + return this.osType; + } + + /** + * Set the osType property: App Service OS type meter used for. + * + * @param osType the osType value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withOsType(String osType) { + this.osType = osType; + return this; + } + + /** + * Get the multiplier property: Meter Multiplier. + * + * @return the multiplier value. + */ + public Double multiplier() { + return this.multiplier; + } + + /** + * Set the multiplier property: Meter Multiplier. + * + * @param multiplier the multiplier value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withMultiplier(Double multiplier) { + this.multiplier = multiplier; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CapabilityInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CapabilityInner.java new file mode 100644 index 0000000000000..cbcd88a128095 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CapabilityInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the capabilities/features allowed for a specific SKU. */ +@Fluent +public final class CapabilityInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CapabilityInner.class); + + /* + * Name of the SKU capability. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Value of the SKU capability. + */ + @JsonProperty(value = "value") + private String value; + + /* + * Reason of the SKU capability. + */ + @JsonProperty(value = "reason") + private String reason; + + /** + * Get the name property: Name of the SKU capability. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the SKU capability. + * + * @param name the name value to set. + * @return the CapabilityInner object itself. + */ + public CapabilityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Value of the SKU capability. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Value of the SKU capability. + * + * @param value the value value to set. + * @return the CapabilityInner object itself. + */ + public CapabilityInner withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the reason property: Reason of the SKU capability. + * + * @return the reason value. + */ + public String reason() { + return this.reason; + } + + /** + * Set the reason property: Reason of the SKU capability. + * + * @param reason the reason value to set. + * @return the CapabilityInner object itself. + */ + public CapabilityInner withReason(String reason) { + this.reason = reason; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateEmailInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateEmailInner.java new file mode 100644 index 0000000000000..9dff35235b98f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateEmailInner.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** SSL certificate email. */ +@Fluent +public final class CertificateEmailInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateEmailInner.class); + + /* + * CertificateEmail resource specific properties + */ + @JsonProperty(value = "properties") + private CertificateEmailProperties innerProperties; + + /** + * Get the innerProperties property: CertificateEmail resource specific properties. + * + * @return the innerProperties value. + */ + private CertificateEmailProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public CertificateEmailInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the emailId property: Email id. + * + * @return the emailId value. + */ + public String emailId() { + return this.innerProperties() == null ? null : this.innerProperties().emailId(); + } + + /** + * Set the emailId property: Email id. + * + * @param emailId the emailId value to set. + * @return the CertificateEmailInner object itself. + */ + public CertificateEmailInner withEmailId(String emailId) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateEmailProperties(); + } + this.innerProperties().withEmailId(emailId); + return this; + } + + /** + * Get the timestamp property: Time stamp. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.innerProperties() == null ? null : this.innerProperties().timestamp(); + } + + /** + * Set the timestamp property: Time stamp. + * + * @param timestamp the timestamp value to set. + * @return the CertificateEmailInner object itself. + */ + public CertificateEmailInner withTimestamp(OffsetDateTime timestamp) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateEmailProperties(); + } + this.innerProperties().withTimestamp(timestamp); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateEmailProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateEmailProperties.java new file mode 100644 index 0000000000000..ff56c4db770cc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateEmailProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** CertificateEmail resource specific properties. */ +@Fluent +public final class CertificateEmailProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateEmailProperties.class); + + /* + * Email id. + */ + @JsonProperty(value = "emailId") + private String emailId; + + /* + * Time stamp. + */ + @JsonProperty(value = "timeStamp") + private OffsetDateTime timestamp; + + /** + * Get the emailId property: Email id. + * + * @return the emailId value. + */ + public String emailId() { + return this.emailId; + } + + /** + * Set the emailId property: Email id. + * + * @param emailId the emailId value to set. + * @return the CertificateEmailProperties object itself. + */ + public CertificateEmailProperties withEmailId(String emailId) { + this.emailId = emailId; + return this; + } + + /** + * Get the timestamp property: Time stamp. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: Time stamp. + * + * @param timestamp the timestamp value to set. + * @return the CertificateEmailProperties object itself. + */ + public CertificateEmailProperties withTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateInner.java new file mode 100644 index 0000000000000..49ff06d5c7795 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateInner.java @@ -0,0 +1,394 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** SSL certificate for an app. */ +@Fluent +public final class CertificateInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateInner.class); + + /* + * Certificate resource specific properties + */ + @JsonProperty(value = "properties") + private CertificateProperties innerProperties; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: Certificate resource specific properties. + * + * @return the innerProperties value. + */ + private CertificateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public CertificateInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public CertificateInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the password property: Certificate password. + * + * @return the password value. + */ + public String password() { + return this.innerProperties() == null ? null : this.innerProperties().password(); + } + + /** + * Set the password property: Certificate password. + * + * @param password the password value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withPassword(String password) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateProperties(); + } + this.innerProperties().withPassword(password); + return this; + } + + /** + * Get the friendlyName property: Friendly name of the certificate. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + } + + /** + * Get the subjectName property: Subject name of the certificate. + * + * @return the subjectName value. + */ + public String subjectName() { + return this.innerProperties() == null ? null : this.innerProperties().subjectName(); + } + + /** + * Get the hostNames property: Host names the certificate applies to. + * + * @return the hostNames value. + */ + public List hostNames() { + return this.innerProperties() == null ? null : this.innerProperties().hostNames(); + } + + /** + * Set the hostNames property: Host names the certificate applies to. + * + * @param hostNames the hostNames value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withHostNames(List hostNames) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateProperties(); + } + this.innerProperties().withHostNames(hostNames); + return this; + } + + /** + * Get the pfxBlob property: Pfx blob. + * + * @return the pfxBlob value. + */ + public byte[] pfxBlob() { + return this.innerProperties() == null ? new byte[0] : this.innerProperties().pfxBlob(); + } + + /** + * Set the pfxBlob property: Pfx blob. + * + * @param pfxBlob the pfxBlob value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withPfxBlob(byte[] pfxBlob) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateProperties(); + } + this.innerProperties().withPfxBlob(pfxBlob); + return this; + } + + /** + * Get the siteName property: App name. + * + * @return the siteName value. + */ + public String siteName() { + return this.innerProperties() == null ? null : this.innerProperties().siteName(); + } + + /** + * Get the selfLink property: Self link. + * + * @return the selfLink value. + */ + public String selfLink() { + return this.innerProperties() == null ? null : this.innerProperties().selfLink(); + } + + /** + * Get the issuer property: Certificate issuer. + * + * @return the issuer value. + */ + public String issuer() { + return this.innerProperties() == null ? null : this.innerProperties().issuer(); + } + + /** + * Get the issueDate property: Certificate issue Date. + * + * @return the issueDate value. + */ + public OffsetDateTime issueDate() { + return this.innerProperties() == null ? null : this.innerProperties().issueDate(); + } + + /** + * Get the expirationDate property: Certificate expiration date. + * + * @return the expirationDate value. + */ + public OffsetDateTime expirationDate() { + return this.innerProperties() == null ? null : this.innerProperties().expirationDate(); + } + + /** + * Get the thumbprint property: Certificate thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + } + + /** + * Get the valid property: Is the certificate valid?. + * + * @return the valid value. + */ + public Boolean valid() { + return this.innerProperties() == null ? null : this.innerProperties().valid(); + } + + /** + * Get the cerBlob property: Raw bytes of .cer file. + * + * @return the cerBlob value. + */ + public byte[] cerBlob() { + return this.innerProperties() == null ? new byte[0] : this.innerProperties().cerBlob(); + } + + /** + * Get the publicKeyHash property: Public key hash. + * + * @return the publicKeyHash value. + */ + public String publicKeyHash() { + return this.innerProperties() == null ? null : this.innerProperties().publicKeyHash(); + } + + /** + * Get the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the + * certificate. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerProperties() == null ? null : this.innerProperties().hostingEnvironmentProfile(); + } + + /** + * Get the keyVaultId property: Key Vault Csm resource Id. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultId(); + } + + /** + * Set the keyVaultId property: Key Vault Csm resource Id. + * + * @param keyVaultId the keyVaultId value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withKeyVaultId(String keyVaultId) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateProperties(); + } + this.innerProperties().withKeyVaultId(keyVaultId); + return this; + } + + /** + * Get the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultSecretName(); + } + + /** + * Set the keyVaultSecretName property: Key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withKeyVaultSecretName(String keyVaultSecretName) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateProperties(); + } + this.innerProperties().withKeyVaultSecretName(keyVaultSecretName); + return this; + } + + /** + * Get the keyVaultSecretStatus property: Status of the Key Vault secret. + * + * @return the keyVaultSecretStatus value. + */ + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultSecretStatus(); + } + + /** + * Get the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.innerProperties() == null ? null : this.innerProperties().serverFarmId(); + } + + /** + * Set the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withServerFarmId(String serverFarmId) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateProperties(); + } + this.innerProperties().withServerFarmId(serverFarmId); + return this; + } + + /** + * Get the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @return the canonicalName value. + */ + public String canonicalName() { + return this.innerProperties() == null ? null : this.innerProperties().canonicalName(); + } + + /** + * Set the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @param canonicalName the canonicalName value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withCanonicalName(String canonicalName) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateProperties(); + } + this.innerProperties().withCanonicalName(canonicalName); + return this; + } + + /** + * Get the domainValidationMethod property: Method of domain validation for free cert. + * + * @return the domainValidationMethod value. + */ + public String domainValidationMethod() { + return this.innerProperties() == null ? null : this.innerProperties().domainValidationMethod(); + } + + /** + * Set the domainValidationMethod property: Method of domain validation for free cert. + * + * @param domainValidationMethod the domainValidationMethod value to set. + * @return the CertificateInner object itself. + */ + public CertificateInner withDomainValidationMethod(String domainValidationMethod) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificateProperties(); + } + this.innerProperties().withDomainValidationMethod(domainValidationMethod); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateOrderActionInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateOrderActionInner.java new file mode 100644 index 0000000000000..66215cbe87785 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateOrderActionInner.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderActionType; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Certificate order action. */ +@Fluent +public final class CertificateOrderActionInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateOrderActionInner.class); + + /* + * CertificateOrderAction resource specific properties + */ + @JsonProperty(value = "properties") + private CertificateOrderActionProperties innerProperties; + + /** + * Get the innerProperties property: CertificateOrderAction resource specific properties. + * + * @return the innerProperties value. + */ + private CertificateOrderActionProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public CertificateOrderActionInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the actionType property: Action type. + * + * @return the actionType value. + */ + public CertificateOrderActionType actionType() { + return this.innerProperties() == null ? null : this.innerProperties().actionType(); + } + + /** + * Get the createdAt property: Time at which the certificate action was performed. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.innerProperties() == null ? null : this.innerProperties().createdAt(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateOrderActionProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateOrderActionProperties.java new file mode 100644 index 0000000000000..e3a99382c367e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateOrderActionProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderActionType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** CertificateOrderAction resource specific properties. */ +@Immutable +public final class CertificateOrderActionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateOrderActionProperties.class); + + /* + * Action type. + */ + @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) + private CertificateOrderActionType actionType; + + /* + * Time at which the certificate action was performed. + */ + @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /** + * Get the actionType property: Action type. + * + * @return the actionType value. + */ + public CertificateOrderActionType actionType() { + return this.actionType; + } + + /** + * Get the createdAt property: Time at which the certificate action was performed. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificatePatchResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificatePatchResourceProperties.java new file mode 100644 index 0000000000000..8b911ed6ac373 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificatePatchResourceProperties.java @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** CertificatePatchResource resource specific properties. */ +@Fluent +public final class CertificatePatchResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificatePatchResourceProperties.class); + + /* + * Certificate password. + */ + @JsonProperty(value = "password") + private String password; + + /* + * Friendly name of the certificate. + */ + @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) + private String friendlyName; + + /* + * Subject name of the certificate. + */ + @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) + private String subjectName; + + /* + * Host names the certificate applies to. + */ + @JsonProperty(value = "hostNames") + private List hostNames; + + /* + * Pfx blob. + */ + @JsonProperty(value = "pfxBlob") + private byte[] pfxBlob; + + /* + * App name. + */ + @JsonProperty(value = "siteName", access = JsonProperty.Access.WRITE_ONLY) + private String siteName; + + /* + * Self link. + */ + @JsonProperty(value = "selfLink", access = JsonProperty.Access.WRITE_ONLY) + private String selfLink; + + /* + * Certificate issuer. + */ + @JsonProperty(value = "issuer", access = JsonProperty.Access.WRITE_ONLY) + private String issuer; + + /* + * Certificate issue Date. + */ + @JsonProperty(value = "issueDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime issueDate; + + /* + * 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; + + /* + * Is the certificate valid?. + */ + @JsonProperty(value = "valid", access = JsonProperty.Access.WRITE_ONLY) + private Boolean valid; + + /* + * Raw bytes of .cer file + */ + @JsonProperty(value = "cerBlob", access = JsonProperty.Access.WRITE_ONLY) + private byte[] cerBlob; + + /* + * Public key hash. + */ + @JsonProperty(value = "publicKeyHash", access = JsonProperty.Access.WRITE_ONLY) + private String publicKeyHash; + + /* + * Specification for the App Service Environment to use for the + * certificate. + */ + @JsonProperty(value = "hostingEnvironmentProfile", access = JsonProperty.Access.WRITE_ONLY) + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /* + * Key Vault Csm resource Id. + */ + @JsonProperty(value = "keyVaultId") + private String keyVaultId; + + /* + * Key Vault secret name. + */ + @JsonProperty(value = "keyVaultSecretName") + private String keyVaultSecretName; + + /* + * Status of the Key Vault secret. + */ + @JsonProperty(value = "keyVaultSecretStatus", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultSecretStatus keyVaultSecretStatus; + + /* + * Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + */ + @JsonProperty(value = "serverFarmId") + private String serverFarmId; + + /* + * CNAME of the certificate to be issued via free certificate + */ + @JsonProperty(value = "canonicalName") + private String canonicalName; + + /* + * Method of domain validation for free cert + */ + @JsonProperty(value = "domainValidationMethod") + private String domainValidationMethod; + + /** + * Get the password property: Certificate password. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: Certificate password. + * + * @param password the password value to set. + * @return the CertificatePatchResourceProperties object itself. + */ + public CertificatePatchResourceProperties withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the friendlyName property: Friendly name of the certificate. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Get the subjectName property: Subject name of the certificate. + * + * @return the subjectName value. + */ + public String subjectName() { + return this.subjectName; + } + + /** + * Get the hostNames property: Host names the certificate applies to. + * + * @return the hostNames value. + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Set the hostNames property: Host names the certificate applies to. + * + * @param hostNames the hostNames value to set. + * @return the CertificatePatchResourceProperties object itself. + */ + public CertificatePatchResourceProperties withHostNames(List hostNames) { + this.hostNames = hostNames; + return this; + } + + /** + * Get the pfxBlob property: Pfx blob. + * + * @return the pfxBlob value. + */ + public byte[] pfxBlob() { + return CoreUtils.clone(this.pfxBlob); + } + + /** + * Set the pfxBlob property: Pfx blob. + * + * @param pfxBlob the pfxBlob value to set. + * @return the CertificatePatchResourceProperties object itself. + */ + public CertificatePatchResourceProperties withPfxBlob(byte[] pfxBlob) { + this.pfxBlob = CoreUtils.clone(pfxBlob); + return this; + } + + /** + * Get the siteName property: App name. + * + * @return the siteName value. + */ + public String siteName() { + return this.siteName; + } + + /** + * Get the selfLink property: Self link. + * + * @return the selfLink value. + */ + public String selfLink() { + return this.selfLink; + } + + /** + * Get the issuer property: Certificate issuer. + * + * @return the issuer value. + */ + public String issuer() { + return this.issuer; + } + + /** + * Get the issueDate property: Certificate issue Date. + * + * @return the issueDate value. + */ + public OffsetDateTime issueDate() { + return this.issueDate; + } + + /** + * 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 valid property: Is the certificate valid?. + * + * @return the valid value. + */ + public Boolean valid() { + return this.valid; + } + + /** + * Get the cerBlob property: Raw bytes of .cer file. + * + * @return the cerBlob value. + */ + public byte[] cerBlob() { + return CoreUtils.clone(this.cerBlob); + } + + /** + * Get the publicKeyHash property: Public key hash. + * + * @return the publicKeyHash value. + */ + public String publicKeyHash() { + return this.publicKeyHash; + } + + /** + * Get the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the + * certificate. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Get the keyVaultId property: Key Vault Csm resource Id. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId property: Key Vault Csm resource Id. + * + * @param keyVaultId the keyVaultId value to set. + * @return the CertificatePatchResourceProperties object itself. + */ + public CertificatePatchResourceProperties withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName property: Key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the CertificatePatchResourceProperties object itself. + */ + public CertificatePatchResourceProperties withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the keyVaultSecretStatus property: Status of the Key Vault secret. + * + * @return the keyVaultSecretStatus value. + */ + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.keyVaultSecretStatus; + } + + /** + * Get the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set. + * @return the CertificatePatchResourceProperties object itself. + */ + public CertificatePatchResourceProperties withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @return the canonicalName value. + */ + public String canonicalName() { + return this.canonicalName; + } + + /** + * Set the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @param canonicalName the canonicalName value to set. + * @return the CertificatePatchResourceProperties object itself. + */ + public CertificatePatchResourceProperties withCanonicalName(String canonicalName) { + this.canonicalName = canonicalName; + return this; + } + + /** + * Get the domainValidationMethod property: Method of domain validation for free cert. + * + * @return the domainValidationMethod value. + */ + public String domainValidationMethod() { + return this.domainValidationMethod; + } + + /** + * Set the domainValidationMethod property: Method of domain validation for free cert. + * + * @param domainValidationMethod the domainValidationMethod value to set. + * @return the CertificatePatchResourceProperties object itself. + */ + public CertificatePatchResourceProperties withDomainValidationMethod(String domainValidationMethod) { + this.domainValidationMethod = domainValidationMethod; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hostingEnvironmentProfile() != null) { + hostingEnvironmentProfile().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateProperties.java new file mode 100644 index 0000000000000..7b879aded6ffc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CertificateProperties.java @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.KeyVaultSecretStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Certificate resource specific properties. */ +@Fluent +public final class CertificateProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateProperties.class); + + /* + * Certificate password. + */ + @JsonProperty(value = "password") + private String password; + + /* + * Friendly name of the certificate. + */ + @JsonProperty(value = "friendlyName", access = JsonProperty.Access.WRITE_ONLY) + private String friendlyName; + + /* + * Subject name of the certificate. + */ + @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) + private String subjectName; + + /* + * Host names the certificate applies to. + */ + @JsonProperty(value = "hostNames") + private List hostNames; + + /* + * Pfx blob. + */ + @JsonProperty(value = "pfxBlob") + private byte[] pfxBlob; + + /* + * App name. + */ + @JsonProperty(value = "siteName", access = JsonProperty.Access.WRITE_ONLY) + private String siteName; + + /* + * Self link. + */ + @JsonProperty(value = "selfLink", access = JsonProperty.Access.WRITE_ONLY) + private String selfLink; + + /* + * Certificate issuer. + */ + @JsonProperty(value = "issuer", access = JsonProperty.Access.WRITE_ONLY) + private String issuer; + + /* + * Certificate issue Date. + */ + @JsonProperty(value = "issueDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime issueDate; + + /* + * 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; + + /* + * Is the certificate valid?. + */ + @JsonProperty(value = "valid", access = JsonProperty.Access.WRITE_ONLY) + private Boolean valid; + + /* + * Raw bytes of .cer file + */ + @JsonProperty(value = "cerBlob", access = JsonProperty.Access.WRITE_ONLY) + private byte[] cerBlob; + + /* + * Public key hash. + */ + @JsonProperty(value = "publicKeyHash", access = JsonProperty.Access.WRITE_ONLY) + private String publicKeyHash; + + /* + * Specification for the App Service Environment to use for the + * certificate. + */ + @JsonProperty(value = "hostingEnvironmentProfile", access = JsonProperty.Access.WRITE_ONLY) + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /* + * Key Vault Csm resource Id. + */ + @JsonProperty(value = "keyVaultId") + private String keyVaultId; + + /* + * Key Vault secret name. + */ + @JsonProperty(value = "keyVaultSecretName") + private String keyVaultSecretName; + + /* + * Status of the Key Vault secret. + */ + @JsonProperty(value = "keyVaultSecretStatus", access = JsonProperty.Access.WRITE_ONLY) + private KeyVaultSecretStatus keyVaultSecretStatus; + + /* + * Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + */ + @JsonProperty(value = "serverFarmId") + private String serverFarmId; + + /* + * CNAME of the certificate to be issued via free certificate + */ + @JsonProperty(value = "canonicalName") + private String canonicalName; + + /* + * Method of domain validation for free cert + */ + @JsonProperty(value = "domainValidationMethod") + private String domainValidationMethod; + + /** + * Get the password property: Certificate password. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: Certificate password. + * + * @param password the password value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withPassword(String password) { + this.password = password; + return this; + } + + /** + * Get the friendlyName property: Friendly name of the certificate. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.friendlyName; + } + + /** + * Get the subjectName property: Subject name of the certificate. + * + * @return the subjectName value. + */ + public String subjectName() { + return this.subjectName; + } + + /** + * Get the hostNames property: Host names the certificate applies to. + * + * @return the hostNames value. + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Set the hostNames property: Host names the certificate applies to. + * + * @param hostNames the hostNames value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withHostNames(List hostNames) { + this.hostNames = hostNames; + return this; + } + + /** + * Get the pfxBlob property: Pfx blob. + * + * @return the pfxBlob value. + */ + public byte[] pfxBlob() { + return CoreUtils.clone(this.pfxBlob); + } + + /** + * Set the pfxBlob property: Pfx blob. + * + * @param pfxBlob the pfxBlob value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withPfxBlob(byte[] pfxBlob) { + this.pfxBlob = CoreUtils.clone(pfxBlob); + return this; + } + + /** + * Get the siteName property: App name. + * + * @return the siteName value. + */ + public String siteName() { + return this.siteName; + } + + /** + * Get the selfLink property: Self link. + * + * @return the selfLink value. + */ + public String selfLink() { + return this.selfLink; + } + + /** + * Get the issuer property: Certificate issuer. + * + * @return the issuer value. + */ + public String issuer() { + return this.issuer; + } + + /** + * Get the issueDate property: Certificate issue Date. + * + * @return the issueDate value. + */ + public OffsetDateTime issueDate() { + return this.issueDate; + } + + /** + * 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 valid property: Is the certificate valid?. + * + * @return the valid value. + */ + public Boolean valid() { + return this.valid; + } + + /** + * Get the cerBlob property: Raw bytes of .cer file. + * + * @return the cerBlob value. + */ + public byte[] cerBlob() { + return CoreUtils.clone(this.cerBlob); + } + + /** + * Get the publicKeyHash property: Public key hash. + * + * @return the publicKeyHash value. + */ + public String publicKeyHash() { + return this.publicKeyHash; + } + + /** + * Get the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the + * certificate. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Get the keyVaultId property: Key Vault Csm resource Id. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.keyVaultId; + } + + /** + * Set the keyVaultId property: Key Vault Csm resource Id. + * + * @param keyVaultId the keyVaultId value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withKeyVaultId(String keyVaultId) { + this.keyVaultId = keyVaultId; + return this; + } + + /** + * Get the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.keyVaultSecretName; + } + + /** + * Set the keyVaultSecretName property: Key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withKeyVaultSecretName(String keyVaultSecretName) { + this.keyVaultSecretName = keyVaultSecretName; + return this; + } + + /** + * Get the keyVaultSecretStatus property: Status of the Key Vault secret. + * + * @return the keyVaultSecretStatus value. + */ + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.keyVaultSecretStatus; + } + + /** + * Get the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @return the canonicalName value. + */ + public String canonicalName() { + return this.canonicalName; + } + + /** + * Set the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @param canonicalName the canonicalName value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withCanonicalName(String canonicalName) { + this.canonicalName = canonicalName; + return this; + } + + /** + * Get the domainValidationMethod property: Method of domain validation for free cert. + * + * @return the domainValidationMethod value. + */ + public String domainValidationMethod() { + return this.domainValidationMethod; + } + + /** + * Set the domainValidationMethod property: Method of domain validation for free cert. + * + * @param domainValidationMethod the domainValidationMethod value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withDomainValidationMethod(String domainValidationMethod) { + this.domainValidationMethod = domainValidationMethod; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hostingEnvironmentProfile() != null) { + hostingEnvironmentProfile().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ConnectionStringDictionaryInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ConnectionStringDictionaryInner.java new file mode 100644 index 0000000000000..26dbf35964d20 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ConnectionStringDictionaryInner.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ConnStringValueTypePair; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** String dictionary resource. */ +@Fluent +public final class ConnectionStringDictionaryInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnectionStringDictionaryInner.class); + + /* + * Connection strings. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /** + * Get the properties property: Connection strings. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Connection strings. + * + * @param properties the properties value to set. + * @return the ConnectionStringDictionaryInner object itself. + */ + public ConnectionStringDictionaryInner withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** {@inheritDoc} */ + @Override + public ConnectionStringDictionaryInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (properties() != null) { + properties() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContainerAppInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContainerAppInner.java new file mode 100644 index 0000000000000..15cb2fc498e55 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContainerAppInner.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Configuration; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.Template; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Container App. */ +@Fluent +public final class ContainerAppInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerAppInner.class); + + /* + * ContainerApp resource specific properties + */ + @JsonProperty(value = "properties") + private ContainerAppProperties innerProperties; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: ContainerApp resource specific properties. + * + * @return the innerProperties value. + */ + private ContainerAppProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public ContainerAppInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ContainerAppInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Container App. + * + * @return the provisioningState value. + */ + public ContainerAppProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the kubeEnvironmentId property: Resource ID of the Container App's KubeEnvironment. + * + * @return the kubeEnvironmentId value. + */ + public String kubeEnvironmentId() { + return this.innerProperties() == null ? null : this.innerProperties().kubeEnvironmentId(); + } + + /** + * Set the kubeEnvironmentId property: Resource ID of the Container App's KubeEnvironment. + * + * @param kubeEnvironmentId the kubeEnvironmentId value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withKubeEnvironmentId(String kubeEnvironmentId) { + if (this.innerProperties() == null) { + this.innerProperties = new ContainerAppProperties(); + } + this.innerProperties().withKubeEnvironmentId(kubeEnvironmentId); + return this; + } + + /** + * Get the latestRevisionName property: Name of the latest revision of the Container App. + * + * @return the latestRevisionName value. + */ + public String latestRevisionName() { + return this.innerProperties() == null ? null : this.innerProperties().latestRevisionName(); + } + + /** + * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. + * + * @return the latestRevisionFqdn value. + */ + public String latestRevisionFqdn() { + return this.innerProperties() == null ? null : this.innerProperties().latestRevisionFqdn(); + } + + /** + * Get the configuration property: Non versioned Container App configuration properties. + * + * @return the configuration value. + */ + public Configuration configuration() { + return this.innerProperties() == null ? null : this.innerProperties().configuration(); + } + + /** + * Set the configuration property: Non versioned Container App configuration properties. + * + * @param configuration the configuration value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withConfiguration(Configuration configuration) { + if (this.innerProperties() == null) { + this.innerProperties = new ContainerAppProperties(); + } + this.innerProperties().withConfiguration(configuration); + return this; + } + + /** + * Get the template property: Container App versioned application definition. + * + * @return the template value. + */ + public Template template() { + return this.innerProperties() == null ? null : this.innerProperties().template(); + } + + /** + * Set the template property: Container App versioned application definition. + * + * @param template the template value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withTemplate(Template template) { + if (this.innerProperties() == null) { + this.innerProperties = new ContainerAppProperties(); + } + this.innerProperties().withTemplate(template); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContainerAppProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContainerAppProperties.java new file mode 100644 index 0000000000000..66436cf1924ee --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContainerAppProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Configuration; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.Template; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ContainerApp resource specific properties. */ +@Fluent +public final class ContainerAppProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerAppProperties.class); + + /* + * Provisioning state of the Container App. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ContainerAppProvisioningState provisioningState; + + /* + * Resource ID of the Container App's KubeEnvironment. + */ + @JsonProperty(value = "kubeEnvironmentId") + private String kubeEnvironmentId; + + /* + * Name of the latest revision of the Container App. + */ + @JsonProperty(value = "latestRevisionName", access = JsonProperty.Access.WRITE_ONLY) + private String latestRevisionName; + + /* + * Fully Qualified Domain Name of the latest revision of the Container App. + */ + @JsonProperty(value = "latestRevisionFqdn", access = JsonProperty.Access.WRITE_ONLY) + private String latestRevisionFqdn; + + /* + * Non versioned Container App configuration properties. + */ + @JsonProperty(value = "configuration") + private Configuration configuration; + + /* + * Container App versioned application definition. + */ + @JsonProperty(value = "template") + private Template template; + + /** + * Get the provisioningState property: Provisioning state of the Container App. + * + * @return the provisioningState value. + */ + public ContainerAppProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the kubeEnvironmentId property: Resource ID of the Container App's KubeEnvironment. + * + * @return the kubeEnvironmentId value. + */ + public String kubeEnvironmentId() { + return this.kubeEnvironmentId; + } + + /** + * Set the kubeEnvironmentId property: Resource ID of the Container App's KubeEnvironment. + * + * @param kubeEnvironmentId the kubeEnvironmentId value to set. + * @return the ContainerAppProperties object itself. + */ + public ContainerAppProperties withKubeEnvironmentId(String kubeEnvironmentId) { + this.kubeEnvironmentId = kubeEnvironmentId; + return this; + } + + /** + * Get the latestRevisionName property: Name of the latest revision of the Container App. + * + * @return the latestRevisionName value. + */ + public String latestRevisionName() { + return this.latestRevisionName; + } + + /** + * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. + * + * @return the latestRevisionFqdn value. + */ + public String latestRevisionFqdn() { + return this.latestRevisionFqdn; + } + + /** + * Get the configuration property: Non versioned Container App configuration properties. + * + * @return the configuration value. + */ + public Configuration configuration() { + return this.configuration; + } + + /** + * Set the configuration property: Non versioned Container App configuration properties. + * + * @param configuration the configuration value to set. + * @return the ContainerAppProperties object itself. + */ + public ContainerAppProperties withConfiguration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /** + * Get the template property: Container App versioned application definition. + * + * @return the template value. + */ + public Template template() { + return this.template; + } + + /** + * Set the template property: Container App versioned application definition. + * + * @param template the template value to set. + * @return the ContainerAppProperties object itself. + */ + public ContainerAppProperties withTemplate(Template template) { + this.template = template; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (configuration() != null) { + configuration().validate(); + } + if (template() != null) { + template().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContinuousWebJobInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContinuousWebJobInner.java new file mode 100644 index 0000000000000..b2815c265e6d1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContinuousWebJobInner.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ContinuousWebJobStatus; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Continuous Web Job Information. */ +@Fluent +public final class ContinuousWebJobInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContinuousWebJobInner.class); + + /* + * ContinuousWebJob resource specific properties + */ + @JsonProperty(value = "properties") + private ContinuousWebJobProperties innerProperties; + + /** + * Get the innerProperties property: ContinuousWebJob resource specific properties. + * + * @return the innerProperties value. + */ + private ContinuousWebJobProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ContinuousWebJobInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the status property: Job status. + * + * @return the status value. + */ + public ContinuousWebJobStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: Job status. + * + * @param status the status value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withStatus(ContinuousWebJobStatus status) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the detailedStatus property: Detailed status. + * + * @return the detailedStatus value. + */ + public String detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Set the detailedStatus property: Detailed status. + * + * @param detailedStatus the detailedStatus value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withDetailedStatus(String detailedStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withDetailedStatus(detailedStatus); + return this; + } + + /** + * Get the logUrl property: Log URL. + * + * @return the logUrl value. + */ + public String logUrl() { + return this.innerProperties() == null ? null : this.innerProperties().logUrl(); + } + + /** + * Set the logUrl property: Log URL. + * + * @param logUrl the logUrl value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withLogUrl(String logUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withLogUrl(logUrl); + return this; + } + + /** + * Get the runCommand property: Run command. + * + * @return the runCommand value. + */ + public String runCommand() { + return this.innerProperties() == null ? null : this.innerProperties().runCommand(); + } + + /** + * Set the runCommand property: Run command. + * + * @param runCommand the runCommand value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withRunCommand(String runCommand) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withRunCommand(runCommand); + return this; + } + + /** + * Get the url property: Job URL. + * + * @return the url value. + */ + public String url() { + return this.innerProperties() == null ? null : this.innerProperties().url(); + } + + /** + * Set the url property: Job URL. + * + * @param url the url value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withUrl(String url) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withUrl(url); + return this; + } + + /** + * Get the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + public String extraInfoUrl() { + return this.innerProperties() == null ? null : this.innerProperties().extraInfoUrl(); + } + + /** + * Set the extraInfoUrl property: Extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withExtraInfoUrl(String extraInfoUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withExtraInfoUrl(extraInfoUrl); + return this; + } + + /** + * Get the webJobType property: Job type. + * + * @return the webJobType value. + */ + public WebJobType webJobType() { + return this.innerProperties() == null ? null : this.innerProperties().webJobType(); + } + + /** + * Set the webJobType property: Job type. + * + * @param webJobType the webJobType value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withWebJobType(WebJobType webJobType) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withWebJobType(webJobType); + return this; + } + + /** + * Get the error property: Error information. + * + * @return the error value. + */ + public String error() { + return this.innerProperties() == null ? null : this.innerProperties().error(); + } + + /** + * Set the error property: Error information. + * + * @param error the error value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withError(String error) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withError(error); + return this; + } + + /** + * Get the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + public Boolean usingSdk() { + return this.innerProperties() == null ? null : this.innerProperties().usingSdk(); + } + + /** + * Set the usingSdk property: Using SDK?. + * + * @param usingSdk the usingSdk value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withUsingSdk(Boolean usingSdk) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withUsingSdk(usingSdk); + return this; + } + + /** + * Get the settings property: Job settings. + * + * @return the settings value. + */ + public Map settings() { + return this.innerProperties() == null ? null : this.innerProperties().settings(); + } + + /** + * Set the settings property: Job settings. + * + * @param settings the settings value to set. + * @return the ContinuousWebJobInner object itself. + */ + public ContinuousWebJobInner withSettings(Map settings) { + if (this.innerProperties() == null) { + this.innerProperties = new ContinuousWebJobProperties(); + } + this.innerProperties().withSettings(settings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContinuousWebJobProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContinuousWebJobProperties.java new file mode 100644 index 0000000000000..cdee17bb4516e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ContinuousWebJobProperties.java @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ContinuousWebJobStatus; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** ContinuousWebJob resource specific properties. */ +@Fluent +public final class ContinuousWebJobProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContinuousWebJobProperties.class); + + /* + * Job status. + */ + @JsonProperty(value = "status") + private ContinuousWebJobStatus status; + + /* + * Detailed status. + */ + @JsonProperty(value = "detailed_status") + private String detailedStatus; + + /* + * Log URL. + */ + @JsonProperty(value = "log_url") + private String logUrl; + + /* + * Run command. + */ + @JsonProperty(value = "run_command") + private String runCommand; + + /* + * Job URL. + */ + @JsonProperty(value = "url") + private String url; + + /* + * Extra Info URL. + */ + @JsonProperty(value = "extra_info_url") + private String extraInfoUrl; + + /* + * Job type. + */ + @JsonProperty(value = "web_job_type") + private WebJobType webJobType; + + /* + * Error information. + */ + @JsonProperty(value = "error") + private String error; + + /* + * Using SDK? + */ + @JsonProperty(value = "using_sdk") + private Boolean usingSdk; + + /* + * Job settings. + */ + @JsonProperty(value = "settings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map settings; + + /** + * Get the status property: Job status. + * + * @return the status value. + */ + public ContinuousWebJobStatus status() { + return this.status; + } + + /** + * Set the status property: Job status. + * + * @param status the status value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withStatus(ContinuousWebJobStatus status) { + this.status = status; + return this; + } + + /** + * Get the detailedStatus property: Detailed status. + * + * @return the detailedStatus value. + */ + public String detailedStatus() { + return this.detailedStatus; + } + + /** + * Set the detailedStatus property: Detailed status. + * + * @param detailedStatus the detailedStatus value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withDetailedStatus(String detailedStatus) { + this.detailedStatus = detailedStatus; + return this; + } + + /** + * Get the logUrl property: Log URL. + * + * @return the logUrl value. + */ + public String logUrl() { + return this.logUrl; + } + + /** + * Set the logUrl property: Log URL. + * + * @param logUrl the logUrl value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withLogUrl(String logUrl) { + this.logUrl = logUrl; + return this; + } + + /** + * Get the runCommand property: Run command. + * + * @return the runCommand value. + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set the runCommand property: Run command. + * + * @param runCommand the runCommand value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get the url property: Job URL. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: Job URL. + * + * @param url the url value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set the extraInfoUrl property: Extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get the webJobType property: Job type. + * + * @return the webJobType value. + */ + public WebJobType webJobType() { + return this.webJobType; + } + + /** + * Set the webJobType property: Job type. + * + * @param webJobType the webJobType value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withWebJobType(WebJobType webJobType) { + this.webJobType = webJobType; + return this; + } + + /** + * Get the error property: Error information. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * Set the error property: Error information. + * + * @param error the error value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withError(String error) { + this.error = error; + return this; + } + + /** + * Get the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set the usingSdk property: Using SDK?. + * + * @param usingSdk the usingSdk value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get the settings property: Job settings. + * + * @return the settings value. + */ + public Map settings() { + return this.settings; + } + + /** + * Set the settings property: Job settings. + * + * @param settings the settings value to set. + * @return the ContinuousWebJobProperties object itself. + */ + public ContinuousWebJobProperties withSettings(Map settings) { + this.settings = settings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmOperationDescriptionInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmOperationDescriptionInner.java new file mode 100644 index 0000000000000..4da7f96ee3885 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmOperationDescriptionInner.java @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationDescriptionProperties; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationDisplay; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Description of an operation available for Microsoft.Web resource provider. */ +@Fluent +public final class CsmOperationDescriptionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmOperationDescriptionInner.class); + + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The isDataAction property. + */ + @JsonProperty(value = "isDataAction") + private Boolean isDataAction; + + /* + * Meta data about operation used for display in portal. + */ + @JsonProperty(value = "display") + private CsmOperationDisplay display; + + /* + * The origin property. + */ + @JsonProperty(value = "origin") + private String origin; + + /* + * Properties available for a Microsoft.Web resource provider operation. + */ + @JsonProperty(value = "properties") + private CsmOperationDescriptionProperties properties; + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the isDataAction property: The isDataAction property. + * + * @return the isDataAction value. + */ + public Boolean isDataAction() { + return this.isDataAction; + } + + /** + * Set the isDataAction property: The isDataAction property. + * + * @param isDataAction the isDataAction value to set. + * @return the CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withIsDataAction(Boolean isDataAction) { + this.isDataAction = isDataAction; + return this; + } + + /** + * Get the display property: Meta data about operation used for display in portal. + * + * @return the display value. + */ + public CsmOperationDisplay display() { + return this.display; + } + + /** + * Set the display property: Meta data about operation used for display in portal. + * + * @param display the display value to set. + * @return the CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withDisplay(CsmOperationDisplay display) { + this.display = display; + return this; + } + + /** + * Get the origin property: The origin property. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin property: The origin property. + * + * @param origin the origin value to set. + * @return the CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withOrigin(String origin) { + this.origin = origin; + return this; + } + + /** + * Get the properties property: Properties available for a Microsoft.Web resource provider operation. + * + * @return the properties value. + */ + public CsmOperationDescriptionProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties available for a Microsoft.Web resource provider operation. + * + * @param properties the properties value to set. + * @return the CsmOperationDescriptionInner object itself. + */ + public CsmOperationDescriptionInner withProperties(CsmOperationDescriptionProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (display() != null) { + display().validate(); + } + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmPublishingCredentialsPoliciesEntityInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmPublishingCredentialsPoliciesEntityInner.java new file mode 100644 index 0000000000000..383446fdabb7d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmPublishingCredentialsPoliciesEntityInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Publishing Credentials Policies parameters. */ +@Fluent +public final class CsmPublishingCredentialsPoliciesEntityInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmPublishingCredentialsPoliciesEntityInner.class); + + /* + * CsmPublishingCredentialsPoliciesEntity resource specific properties + */ + @JsonProperty(value = "properties") + private CsmPublishingCredentialsPoliciesEntityProperties innerProperties; + + /** + * Get the innerProperties property: CsmPublishingCredentialsPoliciesEntity resource specific properties. + * + * @return the innerProperties value. + */ + private CsmPublishingCredentialsPoliciesEntityProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public CsmPublishingCredentialsPoliciesEntityInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the allow property: <code>true</code> to allow access to a publishing method; otherwise, + * <code>false</code>. + * + * @return the allow value. + */ + public Boolean allow() { + return this.innerProperties() == null ? null : this.innerProperties().allow(); + } + + /** + * Set the allow property: <code>true</code> to allow access to a publishing method; otherwise, + * <code>false</code>. + * + * @param allow the allow value to set. + * @return the CsmPublishingCredentialsPoliciesEntityInner object itself. + */ + public CsmPublishingCredentialsPoliciesEntityInner withAllow(Boolean allow) { + if (this.innerProperties() == null) { + this.innerProperties = new CsmPublishingCredentialsPoliciesEntityProperties(); + } + this.innerProperties().withAllow(allow); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmPublishingCredentialsPoliciesEntityProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmPublishingCredentialsPoliciesEntityProperties.java new file mode 100644 index 0000000000000..72ec4ab1333c1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmPublishingCredentialsPoliciesEntityProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** CsmPublishingCredentialsPoliciesEntity resource specific properties. */ +@Fluent +public final class CsmPublishingCredentialsPoliciesEntityProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(CsmPublishingCredentialsPoliciesEntityProperties.class); + + /* + * true to allow access to a publishing method; otherwise, + * false. + */ + @JsonProperty(value = "allow", required = true) + private boolean allow; + + /** + * Get the allow property: <code>true</code> to allow access to a publishing method; otherwise, + * <code>false</code>. + * + * @return the allow value. + */ + public boolean allow() { + return this.allow; + } + + /** + * Set the allow property: <code>true</code> to allow access to a publishing method; otherwise, + * <code>false</code>. + * + * @param allow the allow value to set. + * @return the CsmPublishingCredentialsPoliciesEntityProperties object itself. + */ + public CsmPublishingCredentialsPoliciesEntityProperties withAllow(boolean allow) { + this.allow = allow; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmUsageQuotaInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmUsageQuotaInner.java new file mode 100644 index 0000000000000..1d4663cfd25f7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CsmUsageQuotaInner.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.LocalizableString; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Usage of the quota resource. */ +@Fluent +public final class CsmUsageQuotaInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmUsageQuotaInner.class); + + /* + * Units of measurement for the quota resource. + */ + @JsonProperty(value = "unit") + private String unit; + + /* + * Next reset time for the resource counter. + */ + @JsonProperty(value = "nextResetTime") + private OffsetDateTime nextResetTime; + + /* + * The current value of the resource counter. + */ + @JsonProperty(value = "currentValue") + private Long currentValue; + + /* + * The resource limit. + */ + @JsonProperty(value = "limit") + private Long limit; + + /* + * Quota name. + */ + @JsonProperty(value = "name") + private LocalizableString name; + + /** + * Get the unit property: Units of measurement for the quota resource. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit property: Units of measurement for the quota resource. + * + * @param unit the unit value to set. + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the nextResetTime property: Next reset time for the resource counter. + * + * @return the nextResetTime value. + */ + public OffsetDateTime nextResetTime() { + return this.nextResetTime; + } + + /** + * Set the nextResetTime property: Next reset time for the resource counter. + * + * @param nextResetTime the nextResetTime value to set. + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withNextResetTime(OffsetDateTime nextResetTime) { + this.nextResetTime = nextResetTime; + return this; + } + + /** + * Get the currentValue property: The current value of the resource counter. + * + * @return the currentValue value. + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Set the currentValue property: The current value of the resource counter. + * + * @param currentValue the currentValue value to set. + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withCurrentValue(Long currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the limit property: The resource limit. + * + * @return the limit value. + */ + public Long limit() { + return this.limit; + } + + /** + * Set the limit property: The resource limit. + * + * @param limit the limit value to set. + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Get the name property: Quota name. + * + * @return the name value. + */ + public LocalizableString name() { + return this.name; + } + + /** + * Set the name property: Quota name. + * + * @param name the name value to set. + * @return the CsmUsageQuotaInner object itself. + */ + public CsmUsageQuotaInner withName(LocalizableString name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() != null) { + name().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameAnalysisResultInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameAnalysisResultInner.java new file mode 100644 index 0000000000000..4681af1e1f643 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameAnalysisResultInner.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.DnsVerificationTestResult; +import com.azure.resourcemanager.appservice.generated.models.ErrorEntity; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Custom domain analysis. */ +@Fluent +public final class CustomHostnameAnalysisResultInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomHostnameAnalysisResultInner.class); + + /* + * CustomHostnameAnalysisResult resource specific properties + */ + @JsonProperty(value = "properties") + private CustomHostnameAnalysisResultProperties innerProperties; + + /** + * Get the innerProperties property: CustomHostnameAnalysisResult resource specific properties. + * + * @return the innerProperties value. + */ + private CustomHostnameAnalysisResultProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public CustomHostnameAnalysisResultInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * 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.innerProperties() == null ? null : this.innerProperties().isHostnameAlreadyVerified(); + } + + /** + * Get the customDomainVerificationTest property: DNS verification test result. + * + * @return the customDomainVerificationTest value. + */ + public DnsVerificationTestResult customDomainVerificationTest() { + return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationTest(); + } + + /** + * Get the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. + * + * @return the customDomainVerificationFailureInfo value. + */ + public ErrorEntity customDomainVerificationFailureInfo() { + return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationFailureInfo(); + } + + /** + * Get the hasConflictOnScaleUnit property: <code>true</code> if there is a conflict on a scale unit; + * otherwise, <code>false</code>. + * + * @return the hasConflictOnScaleUnit value. + */ + public Boolean hasConflictOnScaleUnit() { + return this.innerProperties() == null ? null : this.innerProperties().hasConflictOnScaleUnit(); + } + + /** + * Get the hasConflictAcrossSubscription property: <code>true</code> if there is a conflict across + * subscriptions; otherwise, <code>false</code>. + * + * @return the hasConflictAcrossSubscription value. + */ + public Boolean hasConflictAcrossSubscription() { + return this.innerProperties() == null ? null : this.innerProperties().hasConflictAcrossSubscription(); + } + + /** + * Get the conflictingAppResourceId property: Name of the conflicting app on scale unit if it's within the same + * subscription. + * + * @return the conflictingAppResourceId value. + */ + public String conflictingAppResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().conflictingAppResourceId(); + } + + /** + * Get the cNameRecords property: CName records controller can see for this hostname. + * + * @return the cNameRecords value. + */ + public List cNameRecords() { + return this.innerProperties() == null ? null : this.innerProperties().cNameRecords(); + } + + /** + * Set the cNameRecords property: CName records controller can see for this hostname. + * + * @param cNameRecords the cNameRecords value to set. + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withCNameRecords(List cNameRecords) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomHostnameAnalysisResultProperties(); + } + this.innerProperties().withCNameRecords(cNameRecords); + return this; + } + + /** + * Get the txtRecords property: TXT records controller can see for this hostname. + * + * @return the txtRecords value. + */ + public List txtRecords() { + return this.innerProperties() == null ? null : this.innerProperties().txtRecords(); + } + + /** + * Set the txtRecords property: TXT records controller can see for this hostname. + * + * @param txtRecords the txtRecords value to set. + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomHostnameAnalysisResultProperties(); + } + this.innerProperties().withTxtRecords(txtRecords); + return this; + } + + /** + * Get the aRecords property: A records controller can see for this hostname. + * + * @return the aRecords value. + */ + public List aRecords() { + return this.innerProperties() == null ? null : this.innerProperties().aRecords(); + } + + /** + * Set the aRecords property: A records controller can see for this hostname. + * + * @param aRecords the aRecords value to set. + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withARecords(List aRecords) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomHostnameAnalysisResultProperties(); + } + this.innerProperties().withARecords(aRecords); + return this; + } + + /** + * Get the alternateCNameRecords property: Alternate CName records controller can see for this hostname. + * + * @return the alternateCNameRecords value. + */ + public List alternateCNameRecords() { + return this.innerProperties() == null ? null : this.innerProperties().alternateCNameRecords(); + } + + /** + * Set the alternateCNameRecords property: Alternate CName records controller can see for this hostname. + * + * @param alternateCNameRecords the alternateCNameRecords value to set. + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List alternateCNameRecords) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomHostnameAnalysisResultProperties(); + } + this.innerProperties().withAlternateCNameRecords(alternateCNameRecords); + return this; + } + + /** + * Get the alternateTxtRecords property: Alternate TXT records controller can see for this hostname. + * + * @return the alternateTxtRecords value. + */ + public List alternateTxtRecords() { + return this.innerProperties() == null ? null : this.innerProperties().alternateTxtRecords(); + } + + /** + * Set the alternateTxtRecords property: Alternate TXT records controller can see for this hostname. + * + * @param alternateTxtRecords the alternateTxtRecords value to set. + * @return the CustomHostnameAnalysisResultInner object itself. + */ + public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List alternateTxtRecords) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomHostnameAnalysisResultProperties(); + } + this.innerProperties().withAlternateTxtRecords(alternateTxtRecords); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameAnalysisResultProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameAnalysisResultProperties.java new file mode 100644 index 0000000000000..52cc8bb50d1b6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameAnalysisResultProperties.java @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.DnsVerificationTestResult; +import com.azure.resourcemanager.appservice.generated.models.ErrorEntity; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** CustomHostnameAnalysisResult resource specific properties. */ +@Fluent +public final class CustomHostnameAnalysisResultProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomHostnameAnalysisResultProperties.class); + + /* + * 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 ErrorEntity customDomainVerificationFailureInfo; + + /* + * true if there is a conflict on a scale unit; otherwise, + * false. + */ + @JsonProperty(value = "hasConflictOnScaleUnit", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasConflictOnScaleUnit; + + /* + * true if there is a conflict across subscriptions; + * otherwise, false. + */ + @JsonProperty(value = "hasConflictAcrossSubscription", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasConflictAcrossSubscription; + + /* + * Name of the conflicting app on scale unit if it's within the same + * subscription. + */ + @JsonProperty(value = "conflictingAppResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String conflictingAppResourceId; + + /* + * CName records controller can see for this hostname. + */ + @JsonProperty(value = "cNameRecords") + private List cNameRecords; + + /* + * TXT records controller can see for this hostname. + */ + @JsonProperty(value = "txtRecords") + private List txtRecords; + + /* + * A records controller can see for this hostname. + */ + @JsonProperty(value = "aRecords") + private List aRecords; + + /* + * Alternate CName records controller can see for this hostname. + */ + @JsonProperty(value = "alternateCNameRecords") + private List alternateCNameRecords; + + /* + * Alternate TXT records controller can see for this hostname. + */ + @JsonProperty(value = "alternateTxtRecords") + private List alternateTxtRecords; + + /** + * 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 ErrorEntity customDomainVerificationFailureInfo() { + return this.customDomainVerificationFailureInfo; + } + + /** + * Get the hasConflictOnScaleUnit property: <code>true</code> if there is a conflict on a scale unit; + * otherwise, <code>false</code>. + * + * @return the hasConflictOnScaleUnit value. + */ + public Boolean hasConflictOnScaleUnit() { + return this.hasConflictOnScaleUnit; + } + + /** + * Get the hasConflictAcrossSubscription property: <code>true</code> if there is a conflict across + * subscriptions; otherwise, <code>false</code>. + * + * @return the hasConflictAcrossSubscription value. + */ + public Boolean hasConflictAcrossSubscription() { + return this.hasConflictAcrossSubscription; + } + + /** + * Get the conflictingAppResourceId property: Name of the conflicting app on scale unit if it's within the same + * subscription. + * + * @return the conflictingAppResourceId value. + */ + public String conflictingAppResourceId() { + return this.conflictingAppResourceId; + } + + /** + * Get the cNameRecords property: CName records controller can see for this hostname. + * + * @return the cNameRecords value. + */ + public List cNameRecords() { + return this.cNameRecords; + } + + /** + * Set the cNameRecords property: CName records controller can see 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 controller can see for this hostname. + * + * @return the txtRecords value. + */ + public List txtRecords() { + return this.txtRecords; + } + + /** + * Set the txtRecords property: TXT records controller can see 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 controller can see for this hostname. + * + * @return the aRecords value. + */ + public List aRecords() { + return this.aRecords; + } + + /** + * Set the aRecords property: A records controller can see 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 controller can see for this hostname. + * + * @return the alternateCNameRecords value. + */ + public List alternateCNameRecords() { + return this.alternateCNameRecords; + } + + /** + * Set the alternateCNameRecords property: Alternate CName records controller can see 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 controller can see for this hostname. + * + * @return the alternateTxtRecords value. + */ + public List alternateTxtRecords() { + return this.alternateTxtRecords; + } + + /** + * Set the alternateTxtRecords property: Alternate TXT records controller can see 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameSitesInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameSitesInner.java new file mode 100644 index 0000000000000..7f7b771590318 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameSitesInner.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A hostname and its assigned sites. */ +@Fluent +public final class CustomHostnameSitesInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomHostnameSitesInner.class); + + /* + * CustomHostnameSites resource specific properties + */ + @JsonProperty(value = "properties") + private CustomHostnameSitesProperties innerProperties; + + /** + * Get the innerProperties property: CustomHostnameSites resource specific properties. + * + * @return the innerProperties value. + */ + private CustomHostnameSitesProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public CustomHostnameSitesInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the customHostname property: The customHostname property. + * + * @return the customHostname value. + */ + public String customHostname() { + return this.innerProperties() == null ? null : this.innerProperties().customHostname(); + } + + /** + * Set the customHostname property: The customHostname property. + * + * @param customHostname the customHostname value to set. + * @return the CustomHostnameSitesInner object itself. + */ + public CustomHostnameSitesInner withCustomHostname(String customHostname) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomHostnameSitesProperties(); + } + this.innerProperties().withCustomHostname(customHostname); + return this; + } + + /** + * Get the region property: The region property. + * + * @return the region value. + */ + public String region() { + return this.innerProperties() == null ? null : this.innerProperties().region(); + } + + /** + * Set the region property: The region property. + * + * @param region the region value to set. + * @return the CustomHostnameSitesInner object itself. + */ + public CustomHostnameSitesInner withRegion(String region) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomHostnameSitesProperties(); + } + this.innerProperties().withRegion(region); + return this; + } + + /** + * Get the siteResourceIds property: The siteResourceIds property. + * + * @return the siteResourceIds value. + */ + public List siteResourceIds() { + return this.innerProperties() == null ? null : this.innerProperties().siteResourceIds(); + } + + /** + * Set the siteResourceIds property: The siteResourceIds property. + * + * @param siteResourceIds the siteResourceIds value to set. + * @return the CustomHostnameSitesInner object itself. + */ + public CustomHostnameSitesInner withSiteResourceIds(List siteResourceIds) { + if (this.innerProperties() == null) { + this.innerProperties = new CustomHostnameSitesProperties(); + } + this.innerProperties().withSiteResourceIds(siteResourceIds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameSitesProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameSitesProperties.java new file mode 100644 index 0000000000000..6c972b3be7f20 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/CustomHostnameSitesProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** CustomHostnameSites resource specific properties. */ +@Fluent +public final class CustomHostnameSitesProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomHostnameSitesProperties.class); + + /* + * The customHostname property. + */ + @JsonProperty(value = "customHostname") + private String customHostname; + + /* + * The region property. + */ + @JsonProperty(value = "region") + private String region; + + /* + * The siteResourceIds property. + */ + @JsonProperty(value = "siteResourceIds") + private List siteResourceIds; + + /** + * Get the customHostname property: The customHostname property. + * + * @return the customHostname value. + */ + public String customHostname() { + return this.customHostname; + } + + /** + * Set the customHostname property: The customHostname property. + * + * @param customHostname the customHostname value to set. + * @return the CustomHostnameSitesProperties object itself. + */ + public CustomHostnameSitesProperties withCustomHostname(String customHostname) { + this.customHostname = customHostname; + return this; + } + + /** + * Get the region property: The region property. + * + * @return the region value. + */ + public String region() { + return this.region; + } + + /** + * Set the region property: The region property. + * + * @param region the region value to set. + * @return the CustomHostnameSitesProperties object itself. + */ + public CustomHostnameSitesProperties withRegion(String region) { + this.region = region; + return this; + } + + /** + * Get the siteResourceIds property: The siteResourceIds property. + * + * @return the siteResourceIds value. + */ + public List siteResourceIds() { + return this.siteResourceIds; + } + + /** + * Set the siteResourceIds property: The siteResourceIds property. + * + * @param siteResourceIds the siteResourceIds value to set. + * @return the CustomHostnameSitesProperties object itself. + */ + public CustomHostnameSitesProperties withSiteResourceIds(List siteResourceIds) { + this.siteResourceIds = siteResourceIds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (siteResourceIds() != null) { + siteResourceIds().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedAppRestoreRequestProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedAppRestoreRequestProperties.java new file mode 100644 index 0000000000000..ebee17860aed2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedAppRestoreRequestProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DeletedAppRestoreRequest resource specific properties. */ +@Fluent +public final class DeletedAppRestoreRequestProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedAppRestoreRequestProperties.class); + + /* + * ARM resource ID of the deleted app. Example: + * /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} + */ + @JsonProperty(value = "deletedSiteId") + private String deletedSiteId; + + /* + * If true, deleted site configuration, in addition to content, will be + * restored. + */ + @JsonProperty(value = "recoverConfiguration") + private Boolean recoverConfiguration; + + /* + * Point in time to restore the deleted app from, formatted as a DateTime + * string. + * If unspecified, default value is the time that the app was deleted. + */ + @JsonProperty(value = "snapshotTime") + private String snapshotTime; + + /* + * If true, the snapshot is retrieved from DRSecondary endpoint. + */ + @JsonProperty(value = "useDRSecondary") + private Boolean useDRSecondary; + + /** + * Get the deletedSiteId property: ARM resource ID of the deleted app. Example: + * /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + * + * @return the deletedSiteId value. + */ + public String deletedSiteId() { + return this.deletedSiteId; + } + + /** + * Set the deletedSiteId property: ARM resource ID of the deleted app. Example: + * /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + * + * @param deletedSiteId the deletedSiteId value to set. + * @return the DeletedAppRestoreRequestProperties object itself. + */ + public DeletedAppRestoreRequestProperties withDeletedSiteId(String deletedSiteId) { + this.deletedSiteId = deletedSiteId; + return this; + } + + /** + * Get the recoverConfiguration property: If true, deleted site configuration, in addition to content, will be + * restored. + * + * @return the recoverConfiguration value. + */ + public Boolean recoverConfiguration() { + return this.recoverConfiguration; + } + + /** + * Set the recoverConfiguration property: If true, deleted site configuration, in addition to content, will be + * restored. + * + * @param recoverConfiguration the recoverConfiguration value to set. + * @return the DeletedAppRestoreRequestProperties object itself. + */ + public DeletedAppRestoreRequestProperties withRecoverConfiguration(Boolean recoverConfiguration) { + this.recoverConfiguration = recoverConfiguration; + return this; + } + + /** + * Get the snapshotTime property: Point in time to restore the deleted app from, formatted as a DateTime string. If + * unspecified, default value is the time that the app was deleted. + * + * @return the snapshotTime value. + */ + public String snapshotTime() { + return this.snapshotTime; + } + + /** + * Set the snapshotTime property: Point in time to restore the deleted app from, formatted as a DateTime string. If + * unspecified, default value is the time that the app was deleted. + * + * @param snapshotTime the snapshotTime value to set. + * @return the DeletedAppRestoreRequestProperties object itself. + */ + public DeletedAppRestoreRequestProperties withSnapshotTime(String snapshotTime) { + this.snapshotTime = snapshotTime; + return this; + } + + /** + * Get the useDRSecondary property: If true, the snapshot is retrieved from DRSecondary endpoint. + * + * @return the useDRSecondary value. + */ + public Boolean useDRSecondary() { + return this.useDRSecondary; + } + + /** + * Set the useDRSecondary property: If true, the snapshot is retrieved from DRSecondary endpoint. + * + * @param useDRSecondary the useDRSecondary value to set. + * @return the DeletedAppRestoreRequestProperties object itself. + */ + public DeletedAppRestoreRequestProperties withUseDRSecondary(Boolean useDRSecondary) { + this.useDRSecondary = useDRSecondary; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedSiteInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedSiteInner.java new file mode 100644 index 0000000000000..fe2edfd6c0d76 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedSiteInner.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A deleted app. */ +@Fluent +public final class DeletedSiteInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedSiteInner.class); + + /* + * DeletedSite resource specific properties + */ + @JsonProperty(value = "properties") + private DeletedSiteProperties innerProperties; + + /** + * Get the innerProperties property: DeletedSite resource specific properties. + * + * @return the innerProperties value. + */ + private DeletedSiteProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DeletedSiteInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the deletedSiteId property: Numeric id for the deleted site. + * + * @return the deletedSiteId value. + */ + public Integer deletedSiteId() { + return this.innerProperties() == null ? null : this.innerProperties().deletedSiteId(); + } + + /** + * Get the deletedTimestamp property: Time in UTC when the app was deleted. + * + * @return the deletedTimestamp value. + */ + public String deletedTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().deletedTimestamp(); + } + + /** + * Get the subscription property: Subscription containing the deleted site. + * + * @return the subscription value. + */ + public String subscription() { + return this.innerProperties() == null ? null : this.innerProperties().subscription(); + } + + /** + * Get the resourceGroup property: ResourceGroup that contained the deleted site. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().resourceGroup(); + } + + /** + * Get the deletedSiteName property: Name of the deleted site. + * + * @return the deletedSiteName value. + */ + public String deletedSiteName() { + return this.innerProperties() == null ? null : this.innerProperties().deletedSiteName(); + } + + /** + * Get the slot property: Slot of the deleted site. + * + * @return the slot value. + */ + public String slot() { + return this.innerProperties() == null ? null : this.innerProperties().slot(); + } + + /** + * Get the kind property: Kind of site that was deleted. + * + * @return the kind value. + */ + public String kindPropertiesKind() { + return this.innerProperties() == null ? null : this.innerProperties().kind(); + } + + /** + * Get the geoRegionName property: Geo Region of the deleted site. + * + * @return the geoRegionName value. + */ + public String geoRegionName() { + return this.innerProperties() == null ? null : this.innerProperties().geoRegionName(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedSiteProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedSiteProperties.java new file mode 100644 index 0000000000000..4d05320c6bf93 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeletedSiteProperties.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DeletedSite resource specific properties. */ +@Immutable +public final class DeletedSiteProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedSiteProperties.class); + + /* + * Numeric id for the deleted site + */ + @JsonProperty(value = "deletedSiteId", access = JsonProperty.Access.WRITE_ONLY) + private Integer deletedSiteId; + + /* + * Time in UTC when the app was deleted. + */ + @JsonProperty(value = "deletedTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private String deletedTimestamp; + + /* + * Subscription containing the deleted site + */ + @JsonProperty(value = "subscription", access = JsonProperty.Access.WRITE_ONLY) + private String subscription; + + /* + * ResourceGroup that contained the deleted site + */ + @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /* + * Name of the deleted site + */ + @JsonProperty(value = "deletedSiteName", access = JsonProperty.Access.WRITE_ONLY) + private String deletedSiteName; + + /* + * Slot of the deleted site + */ + @JsonProperty(value = "slot", access = JsonProperty.Access.WRITE_ONLY) + private String slot; + + /* + * Kind of site that was deleted + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private String kind; + + /* + * Geo Region of the deleted site + */ + @JsonProperty(value = "geoRegionName", access = JsonProperty.Access.WRITE_ONLY) + private String geoRegionName; + + /** + * Get the deletedSiteId property: Numeric id for the deleted site. + * + * @return the deletedSiteId value. + */ + public Integer deletedSiteId() { + return this.deletedSiteId; + } + + /** + * Get the deletedTimestamp property: Time in UTC when the app was deleted. + * + * @return the deletedTimestamp value. + */ + public String deletedTimestamp() { + return this.deletedTimestamp; + } + + /** + * Get the subscription property: Subscription containing the deleted site. + * + * @return the subscription value. + */ + public String subscription() { + return this.subscription; + } + + /** + * Get the resourceGroup property: ResourceGroup that contained the deleted site. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the deletedSiteName property: Name of the deleted site. + * + * @return the deletedSiteName value. + */ + public String deletedSiteName() { + return this.deletedSiteName; + } + + /** + * Get the slot property: Slot of the deleted site. + * + * @return the slot value. + */ + public String slot() { + return this.slot; + } + + /** + * Get the kind property: Kind of site that was deleted. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Get the geoRegionName property: Geo Region of the deleted site. + * + * @return the geoRegionName value. + */ + public String geoRegionName() { + return this.geoRegionName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentInner.java new file mode 100644 index 0000000000000..cf164e0e5772b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentInner.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** User credentials used for publishing activity. */ +@Fluent +public final class DeploymentInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentInner.class); + + /* + * Deployment resource specific properties + */ + @JsonProperty(value = "properties") + private DeploymentProperties innerProperties; + + /** + * Get the innerProperties property: Deployment resource specific properties. + * + * @return the innerProperties value. + */ + private DeploymentProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DeploymentInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the status property: Deployment status. + * + * @return the status value. + */ + public Integer status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: Deployment status. + * + * @param status the status value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withStatus(Integer status) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the message property: Details about deployment status. + * + * @return the message value. + */ + public String message() { + return this.innerProperties() == null ? null : this.innerProperties().message(); + } + + /** + * Set the message property: Details about deployment status. + * + * @param message the message value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withMessage(String message) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withMessage(message); + return this; + } + + /** + * Get the author property: Who authored the deployment. + * + * @return the author value. + */ + public String author() { + return this.innerProperties() == null ? null : this.innerProperties().author(); + } + + /** + * Set the author property: Who authored the deployment. + * + * @param author the author value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withAuthor(String author) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withAuthor(author); + return this; + } + + /** + * Get the deployer property: Who performed the deployment. + * + * @return the deployer value. + */ + public String deployer() { + return this.innerProperties() == null ? null : this.innerProperties().deployer(); + } + + /** + * Set the deployer property: Who performed the deployment. + * + * @param deployer the deployer value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withDeployer(String deployer) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withDeployer(deployer); + return this; + } + + /** + * Get the authorEmail property: Author email. + * + * @return the authorEmail value. + */ + public String authorEmail() { + return this.innerProperties() == null ? null : this.innerProperties().authorEmail(); + } + + /** + * Set the authorEmail property: Author email. + * + * @param authorEmail the authorEmail value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withAuthorEmail(String authorEmail) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withAuthorEmail(authorEmail); + return this; + } + + /** + * Get the startTime property: Start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.innerProperties() == null ? null : this.innerProperties().startTime(); + } + + /** + * Set the startTime property: Start time. + * + * @param startTime the startTime value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withStartTime(OffsetDateTime startTime) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withStartTime(startTime); + return this; + } + + /** + * Get the endTime property: End time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.innerProperties() == null ? null : this.innerProperties().endTime(); + } + + /** + * Set the endTime property: End time. + * + * @param endTime the endTime value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withEndTime(OffsetDateTime endTime) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withEndTime(endTime); + return this; + } + + /** + * Get the active property: True if deployment is currently active, false if completed and null if not started. + * + * @return the active value. + */ + public Boolean active() { + return this.innerProperties() == null ? null : this.innerProperties().active(); + } + + /** + * Set the active property: True if deployment is currently active, false if completed and null if not started. + * + * @param active the active value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withActive(Boolean active) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withActive(active); + return this; + } + + /** + * Get the details property: Details on deployment. + * + * @return the details value. + */ + public String details() { + return this.innerProperties() == null ? null : this.innerProperties().details(); + } + + /** + * Set the details property: Details on deployment. + * + * @param details the details value to set. + * @return the DeploymentInner object itself. + */ + public DeploymentInner withDetails(String details) { + if (this.innerProperties() == null) { + this.innerProperties = new DeploymentProperties(); + } + this.innerProperties().withDetails(details); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentLocationsInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentLocationsInner.java new file mode 100644 index 0000000000000..458ea3d409abc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentLocationsInner.java @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentDeploymentInfo; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List of available locations (regions or App Service Environments) for deployment of App Service resources. */ +@Fluent +public final class DeploymentLocationsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentLocationsInner.class); + + /* + * Available regions. + */ + @JsonProperty(value = "locations") + private List locations; + + /* + * Available App Service Environments with full descriptions of the + * environments. + */ + @JsonProperty(value = "hostingEnvironments") + private List hostingEnvironments; + + /* + * Available App Service Environments with basic information. + */ + @JsonProperty(value = "hostingEnvironmentDeploymentInfos") + private List hostingEnvironmentDeploymentInfos; + + /** + * Get the locations property: Available regions. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations property: Available regions. + * + * @param locations the locations value to set. + * @return the DeploymentLocationsInner object itself. + */ + public DeploymentLocationsInner withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the hostingEnvironments property: Available App Service Environments with full descriptions of the + * environments. + * + * @return the hostingEnvironments value. + */ + public List hostingEnvironments() { + return this.hostingEnvironments; + } + + /** + * Set the hostingEnvironments property: Available App Service Environments with full descriptions of the + * environments. + * + * @param hostingEnvironments the hostingEnvironments value to set. + * @return the DeploymentLocationsInner object itself. + */ + public DeploymentLocationsInner withHostingEnvironments(List hostingEnvironments) { + this.hostingEnvironments = hostingEnvironments; + return this; + } + + /** + * Get the hostingEnvironmentDeploymentInfos property: Available App Service Environments with basic information. + * + * @return the hostingEnvironmentDeploymentInfos value. + */ + public List hostingEnvironmentDeploymentInfos() { + return this.hostingEnvironmentDeploymentInfos; + } + + /** + * Set the hostingEnvironmentDeploymentInfos property: Available App Service Environments with basic information. + * + * @param hostingEnvironmentDeploymentInfos the hostingEnvironmentDeploymentInfos value to set. + * @return the DeploymentLocationsInner object itself. + */ + public DeploymentLocationsInner withHostingEnvironmentDeploymentInfos( + List hostingEnvironmentDeploymentInfos) { + this.hostingEnvironmentDeploymentInfos = hostingEnvironmentDeploymentInfos; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (locations() != null) { + locations().forEach(e -> e.validate()); + } + if (hostingEnvironments() != null) { + hostingEnvironments().forEach(e -> e.validate()); + } + if (hostingEnvironmentDeploymentInfos() != null) { + hostingEnvironmentDeploymentInfos().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentProperties.java new file mode 100644 index 0000000000000..e0194700ee08e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DeploymentProperties.java @@ -0,0 +1,260 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Deployment resource specific properties. */ +@Fluent +public final class DeploymentProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentProperties.class); + + /* + * Deployment status. + */ + @JsonProperty(value = "status") + private Integer status; + + /* + * Details about deployment status. + */ + @JsonProperty(value = "message") + private String message; + + /* + * Who authored the deployment. + */ + @JsonProperty(value = "author") + private String author; + + /* + * Who performed the deployment. + */ + @JsonProperty(value = "deployer") + private String deployer; + + /* + * Author email. + */ + @JsonProperty(value = "author_email") + private String authorEmail; + + /* + * Start time. + */ + @JsonProperty(value = "start_time") + private OffsetDateTime startTime; + + /* + * End time. + */ + @JsonProperty(value = "end_time") + private OffsetDateTime endTime; + + /* + * True if deployment is currently active, false if completed and null if + * not started. + */ + @JsonProperty(value = "active") + private Boolean active; + + /* + * Details on deployment. + */ + @JsonProperty(value = "details") + private String details; + + /** + * Get the status property: Deployment status. + * + * @return the status value. + */ + public Integer status() { + return this.status; + } + + /** + * Set the status property: Deployment status. + * + * @param status the status value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withStatus(Integer status) { + this.status = status; + return this; + } + + /** + * Get the message property: Details about deployment status. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Details about deployment status. + * + * @param message the message value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the author property: Who authored the deployment. + * + * @return the author value. + */ + public String author() { + return this.author; + } + + /** + * Set the author property: Who authored the deployment. + * + * @param author the author value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withAuthor(String author) { + this.author = author; + return this; + } + + /** + * Get the deployer property: Who performed the deployment. + * + * @return the deployer value. + */ + public String deployer() { + return this.deployer; + } + + /** + * Set the deployer property: Who performed the deployment. + * + * @param deployer the deployer value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withDeployer(String deployer) { + this.deployer = deployer; + return this; + } + + /** + * Get the authorEmail property: Author email. + * + * @return the authorEmail value. + */ + public String authorEmail() { + return this.authorEmail; + } + + /** + * Set the authorEmail property: Author email. + * + * @param authorEmail the authorEmail value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withAuthorEmail(String authorEmail) { + this.authorEmail = authorEmail; + return this; + } + + /** + * Get the startTime property: Start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time. + * + * @param startTime the startTime value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: End time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time. + * + * @param endTime the endTime value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the active property: True if deployment is currently active, false if completed and null if not started. + * + * @return the active value. + */ + public Boolean active() { + return this.active; + } + + /** + * Set the active property: True if deployment is currently active, false if completed and null if not started. + * + * @param active the active value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withActive(Boolean active) { + this.active = active; + return this; + } + + /** + * Get the details property: Details on deployment. + * + * @return the details value. + */ + public String details() { + return this.details; + } + + /** + * Set the details property: Details on deployment. + * + * @param details the details value to set. + * @return the DeploymentProperties object itself. + */ + public DeploymentProperties withDetails(String details) { + this.details = details; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorDefinition.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorDefinition.java new file mode 100644 index 0000000000000..7edd48b57576f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorDefinition.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Class representing detector definition. */ +@Immutable +public final class DetectorDefinition { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorDefinition.class); + + /* + * Display name of the detector + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /* + * Description of the detector + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Detector Rank + */ + @JsonProperty(value = "rank", access = JsonProperty.Access.WRITE_ONLY) + private Double rank; + + /* + * Flag representing whether detector is enabled or not. + */ + @JsonProperty(value = "isEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEnabled; + + /** + * Get the displayName property: Display name of the detector. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the description property: Description of the detector. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the rank property: Detector Rank. + * + * @return the rank value. + */ + public Double rank() { + return this.rank; + } + + /** + * Get the isEnabled property: Flag representing whether detector is enabled or not. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.isEnabled; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorDefinitionResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorDefinitionResourceInner.java new file mode 100644 index 0000000000000..0ede2015ac26b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorDefinitionResourceInner.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ARM resource for a detector definition. */ +@Fluent +public final class DetectorDefinitionResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorDefinitionResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private DetectorDefinition innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private DetectorDefinition innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DetectorDefinitionResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the displayName property: Display name of the detector. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Get the description property: Description of the detector. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Get the rank property: Detector Rank. + * + * @return the rank value. + */ + public Double rank() { + return this.innerProperties() == null ? null : this.innerProperties().rank(); + } + + /** + * Get the isEnabled property: Flag representing whether detector is enabled or not. + * + * @return the isEnabled value. + */ + public Boolean isEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorResponseInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorResponseInner.java new file mode 100644 index 0000000000000..9927082ea6a66 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorResponseInner.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.DataProviderMetadata; +import com.azure.resourcemanager.appservice.generated.models.DetectorInfo; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticData; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.QueryUtterancesResults; +import com.azure.resourcemanager.appservice.generated.models.Status; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Class representing Response from Detector. */ +@Fluent +public final class DetectorResponseInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorResponseInner.class); + + /* + * DetectorResponse resource specific properties + */ + @JsonProperty(value = "properties") + private DetectorResponseProperties innerProperties; + + /** + * Get the innerProperties property: DetectorResponse resource specific properties. + * + * @return the innerProperties value. + */ + private DetectorResponseProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DetectorResponseInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the metadata property: metadata for the detector. + * + * @return the metadata value. + */ + public DetectorInfo metadata() { + return this.innerProperties() == null ? null : this.innerProperties().metadata(); + } + + /** + * Set the metadata property: metadata for the detector. + * + * @param metadata the metadata value to set. + * @return the DetectorResponseInner object itself. + */ + public DetectorResponseInner withMetadata(DetectorInfo metadata) { + if (this.innerProperties() == null) { + this.innerProperties = new DetectorResponseProperties(); + } + this.innerProperties().withMetadata(metadata); + return this; + } + + /** + * Get the dataset property: Data Set. + * + * @return the dataset value. + */ + public List dataset() { + return this.innerProperties() == null ? null : this.innerProperties().dataset(); + } + + /** + * Set the dataset property: Data Set. + * + * @param dataset the dataset value to set. + * @return the DetectorResponseInner object itself. + */ + public DetectorResponseInner withDataset(List dataset) { + if (this.innerProperties() == null) { + this.innerProperties = new DetectorResponseProperties(); + } + this.innerProperties().withDataset(dataset); + return this; + } + + /** + * Get the status property: Indicates status of the most severe insight. + * + * @return the status value. + */ + public Status status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Set the status property: Indicates status of the most severe insight. + * + * @param status the status value to set. + * @return the DetectorResponseInner object itself. + */ + public DetectorResponseInner withStatus(Status status) { + if (this.innerProperties() == null) { + this.innerProperties = new DetectorResponseProperties(); + } + this.innerProperties().withStatus(status); + return this; + } + + /** + * Get the dataProvidersMetadata property: Additional configuration for different data providers to be used by the + * UI. + * + * @return the dataProvidersMetadata value. + */ + public List dataProvidersMetadata() { + return this.innerProperties() == null ? null : this.innerProperties().dataProvidersMetadata(); + } + + /** + * Set the dataProvidersMetadata property: Additional configuration for different data providers to be used by the + * UI. + * + * @param dataProvidersMetadata the dataProvidersMetadata value to set. + * @return the DetectorResponseInner object itself. + */ + public DetectorResponseInner withDataProvidersMetadata(List dataProvidersMetadata) { + if (this.innerProperties() == null) { + this.innerProperties = new DetectorResponseProperties(); + } + this.innerProperties().withDataProvidersMetadata(dataProvidersMetadata); + return this; + } + + /** + * Get the suggestedUtterances property: Suggested utterances where the detector can be applicable. + * + * @return the suggestedUtterances value. + */ + public QueryUtterancesResults suggestedUtterances() { + return this.innerProperties() == null ? null : this.innerProperties().suggestedUtterances(); + } + + /** + * Set the suggestedUtterances property: Suggested utterances where the detector can be applicable. + * + * @param suggestedUtterances the suggestedUtterances value to set. + * @return the DetectorResponseInner object itself. + */ + public DetectorResponseInner withSuggestedUtterances(QueryUtterancesResults suggestedUtterances) { + if (this.innerProperties() == null) { + this.innerProperties = new DetectorResponseProperties(); + } + this.innerProperties().withSuggestedUtterances(suggestedUtterances); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorResponseProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorResponseProperties.java new file mode 100644 index 0000000000000..ea3ee6121abc7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DetectorResponseProperties.java @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.DataProviderMetadata; +import com.azure.resourcemanager.appservice.generated.models.DetectorInfo; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticData; +import com.azure.resourcemanager.appservice.generated.models.QueryUtterancesResults; +import com.azure.resourcemanager.appservice.generated.models.Status; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** DetectorResponse resource specific properties. */ +@Fluent +public final class DetectorResponseProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorResponseProperties.class); + + /* + * metadata for the detector + */ + @JsonProperty(value = "metadata") + private DetectorInfo metadata; + + /* + * Data Set + */ + @JsonProperty(value = "dataset") + private List dataset; + + /* + * Indicates status of the most severe insight. + */ + @JsonProperty(value = "status") + private Status status; + + /* + * Additional configuration for different data providers to be used by the + * UI + */ + @JsonProperty(value = "dataProvidersMetadata") + private List dataProvidersMetadata; + + /* + * Suggested utterances where the detector can be applicable. + */ + @JsonProperty(value = "suggestedUtterances") + private QueryUtterancesResults suggestedUtterances; + + /** + * Get the metadata property: metadata for the detector. + * + * @return the metadata value. + */ + public DetectorInfo metadata() { + return this.metadata; + } + + /** + * Set the metadata property: metadata for the detector. + * + * @param metadata the metadata value to set. + * @return the DetectorResponseProperties object itself. + */ + public DetectorResponseProperties withMetadata(DetectorInfo metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the dataset property: Data Set. + * + * @return the dataset value. + */ + public List dataset() { + return this.dataset; + } + + /** + * Set the dataset property: Data Set. + * + * @param dataset the dataset value to set. + * @return the DetectorResponseProperties object itself. + */ + public DetectorResponseProperties withDataset(List dataset) { + this.dataset = dataset; + return this; + } + + /** + * Get the status property: Indicates status of the most severe insight. + * + * @return the status value. + */ + public Status status() { + return this.status; + } + + /** + * Set the status property: Indicates status of the most severe insight. + * + * @param status the status value to set. + * @return the DetectorResponseProperties object itself. + */ + public DetectorResponseProperties withStatus(Status status) { + this.status = status; + return this; + } + + /** + * Get the dataProvidersMetadata property: Additional configuration for different data providers to be used by the + * UI. + * + * @return the dataProvidersMetadata value. + */ + public List dataProvidersMetadata() { + return this.dataProvidersMetadata; + } + + /** + * Set the dataProvidersMetadata property: Additional configuration for different data providers to be used by the + * UI. + * + * @param dataProvidersMetadata the dataProvidersMetadata value to set. + * @return the DetectorResponseProperties object itself. + */ + public DetectorResponseProperties withDataProvidersMetadata(List dataProvidersMetadata) { + this.dataProvidersMetadata = dataProvidersMetadata; + return this; + } + + /** + * Get the suggestedUtterances property: Suggested utterances where the detector can be applicable. + * + * @return the suggestedUtterances value. + */ + public QueryUtterancesResults suggestedUtterances() { + return this.suggestedUtterances; + } + + /** + * Set the suggestedUtterances property: Suggested utterances where the detector can be applicable. + * + * @param suggestedUtterances the suggestedUtterances value to set. + * @return the DetectorResponseProperties object itself. + */ + public DetectorResponseProperties withSuggestedUtterances(QueryUtterancesResults suggestedUtterances) { + this.suggestedUtterances = suggestedUtterances; + 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 (dataProvidersMetadata() != null) { + dataProvidersMetadata().forEach(e -> e.validate()); + } + if (suggestedUtterances() != null) { + suggestedUtterances().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticAnalysisInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticAnalysisInner.java new file mode 100644 index 0000000000000..7d7129a884972 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticAnalysisInner.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AbnormalTimePeriod; +import com.azure.resourcemanager.appservice.generated.models.AnalysisData; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Class representing a diagnostic analysis done on an application. */ +@Fluent +public final class DiagnosticAnalysisInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticAnalysisInner.class); + + /* + * DiagnosticAnalysis resource specific properties + */ + @JsonProperty(value = "properties") + private DiagnosticAnalysisProperties innerProperties; + + /** + * Get the innerProperties property: DiagnosticAnalysis resource specific properties. + * + * @return the innerProperties value. + */ + private DiagnosticAnalysisProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DiagnosticAnalysisInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the startTime property: Start time of the period. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.innerProperties() == null ? null : this.innerProperties().startTime(); + } + + /** + * Set the startTime property: Start time of the period. + * + * @param startTime the startTime value to set. + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withStartTime(OffsetDateTime startTime) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticAnalysisProperties(); + } + this.innerProperties().withStartTime(startTime); + return this; + } + + /** + * Get the endTime property: End time of the period. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.innerProperties() == null ? null : this.innerProperties().endTime(); + } + + /** + * Set the endTime property: End time of the period. + * + * @param endTime the endTime value to set. + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withEndTime(OffsetDateTime endTime) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticAnalysisProperties(); + } + this.innerProperties().withEndTime(endTime); + return this; + } + + /** + * Get the abnormalTimePeriods property: List of time periods. + * + * @return the abnormalTimePeriods value. + */ + public List abnormalTimePeriods() { + return this.innerProperties() == null ? null : this.innerProperties().abnormalTimePeriods(); + } + + /** + * Set the abnormalTimePeriods property: List of time periods. + * + * @param abnormalTimePeriods the abnormalTimePeriods value to set. + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withAbnormalTimePeriods(List abnormalTimePeriods) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticAnalysisProperties(); + } + this.innerProperties().withAbnormalTimePeriods(abnormalTimePeriods); + return this; + } + + /** + * Get the payload property: Data by each detector. + * + * @return the payload value. + */ + public List payload() { + return this.innerProperties() == null ? null : this.innerProperties().payload(); + } + + /** + * Set the payload property: Data by each detector. + * + * @param payload the payload value to set. + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withPayload(List payload) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticAnalysisProperties(); + } + this.innerProperties().withPayload(payload); + return this; + } + + /** + * Get the nonCorrelatedDetectors property: Data by each detector for detectors that did not corelate. + * + * @return the nonCorrelatedDetectors value. + */ + public List nonCorrelatedDetectors() { + return this.innerProperties() == null ? null : this.innerProperties().nonCorrelatedDetectors(); + } + + /** + * Set the nonCorrelatedDetectors property: Data by each detector for detectors that did not corelate. + * + * @param nonCorrelatedDetectors the nonCorrelatedDetectors value to set. + * @return the DiagnosticAnalysisInner object itself. + */ + public DiagnosticAnalysisInner withNonCorrelatedDetectors(List nonCorrelatedDetectors) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticAnalysisProperties(); + } + this.innerProperties().withNonCorrelatedDetectors(nonCorrelatedDetectors); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticAnalysisProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticAnalysisProperties.java new file mode 100644 index 0000000000000..cb76ca1ad25b7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticAnalysisProperties.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AbnormalTimePeriod; +import com.azure.resourcemanager.appservice.generated.models.AnalysisData; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** DiagnosticAnalysis resource specific properties. */ +@Fluent +public final class DiagnosticAnalysisProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticAnalysisProperties.class); + + /* + * Start time of the period + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * End time of the period + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * List of time periods. + */ + @JsonProperty(value = "abnormalTimePeriods") + private List abnormalTimePeriods; + + /* + * Data by each detector + */ + @JsonProperty(value = "payload") + private List payload; + + /* + * Data by each detector for detectors that did not corelate + */ + @JsonProperty(value = "nonCorrelatedDetectors") + private List nonCorrelatedDetectors; + + /** + * Get the startTime property: Start time of the period. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time of the period. + * + * @param startTime the startTime value to set. + * @return the DiagnosticAnalysisProperties object itself. + */ + public DiagnosticAnalysisProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: End time of the period. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time of the period. + * + * @param endTime the endTime value to set. + * @return the DiagnosticAnalysisProperties object itself. + */ + public DiagnosticAnalysisProperties withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the abnormalTimePeriods property: List of time periods. + * + * @return the abnormalTimePeriods value. + */ + public List abnormalTimePeriods() { + return this.abnormalTimePeriods; + } + + /** + * Set the abnormalTimePeriods property: List of time periods. + * + * @param abnormalTimePeriods the abnormalTimePeriods value to set. + * @return the DiagnosticAnalysisProperties object itself. + */ + public DiagnosticAnalysisProperties withAbnormalTimePeriods(List abnormalTimePeriods) { + this.abnormalTimePeriods = abnormalTimePeriods; + return this; + } + + /** + * Get the payload property: Data by each detector. + * + * @return the payload value. + */ + public List payload() { + return this.payload; + } + + /** + * Set the payload property: Data by each detector. + * + * @param payload the payload value to set. + * @return the DiagnosticAnalysisProperties object itself. + */ + public DiagnosticAnalysisProperties withPayload(List payload) { + this.payload = payload; + return this; + } + + /** + * Get the nonCorrelatedDetectors property: Data by each detector for detectors that did not corelate. + * + * @return the nonCorrelatedDetectors value. + */ + public List nonCorrelatedDetectors() { + return this.nonCorrelatedDetectors; + } + + /** + * Set the nonCorrelatedDetectors property: Data by each detector for detectors that did not corelate. + * + * @param nonCorrelatedDetectors the nonCorrelatedDetectors value to set. + * @return the DiagnosticAnalysisProperties object itself. + */ + public DiagnosticAnalysisProperties withNonCorrelatedDetectors(List nonCorrelatedDetectors) { + this.nonCorrelatedDetectors = nonCorrelatedDetectors; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (abnormalTimePeriods() != null) { + abnormalTimePeriods().forEach(e -> e.validate()); + } + if (payload() != null) { + payload().forEach(e -> e.validate()); + } + if (nonCorrelatedDetectors() != null) { + nonCorrelatedDetectors().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticCategoryInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticCategoryInner.java new file mode 100644 index 0000000000000..92213bfba8d94 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticCategoryInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Class representing detector definition. */ +@Fluent +public final class DiagnosticCategoryInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticCategoryInner.class); + + /* + * DiagnosticCategory resource specific properties + */ + @JsonProperty(value = "properties") + private DiagnosticCategoryProperties innerProperties; + + /** + * Get the innerProperties property: DiagnosticCategory resource specific properties. + * + * @return the innerProperties value. + */ + private DiagnosticCategoryProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DiagnosticCategoryInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the description property: Description of the diagnostic category. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticCategoryProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticCategoryProperties.java new file mode 100644 index 0000000000000..7f05b5bd404f7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticCategoryProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DiagnosticCategory resource specific properties. */ +@Immutable +public final class DiagnosticCategoryProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticCategoryProperties.class); + + /* + * Description of the diagnostic category + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the description property: Description of the diagnostic category. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticDetectorResponseInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticDetectorResponseInner.java new file mode 100644 index 0000000000000..5f74c57893839 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticDetectorResponseInner.java @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.DetectorAbnormalTimePeriod; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticMetricSet; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.ResponseMetadata; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Class representing Response from Diagnostic Detectors. */ +@Fluent +public final class DiagnosticDetectorResponseInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticDetectorResponseInner.class); + + /* + * DiagnosticDetectorResponse resource specific properties + */ + @JsonProperty(value = "properties") + private DiagnosticDetectorResponseProperties innerProperties; + + /** + * Get the innerProperties property: DiagnosticDetectorResponse resource specific properties. + * + * @return the innerProperties value. + */ + private DiagnosticDetectorResponseProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DiagnosticDetectorResponseInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the startTime property: Start time of the period. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.innerProperties() == null ? null : this.innerProperties().startTime(); + } + + /** + * Set the startTime property: Start time of the period. + * + * @param startTime the startTime value to set. + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withStartTime(OffsetDateTime startTime) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticDetectorResponseProperties(); + } + this.innerProperties().withStartTime(startTime); + return this; + } + + /** + * Get the endTime property: End time of the period. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.innerProperties() == null ? null : this.innerProperties().endTime(); + } + + /** + * Set the endTime property: End time of the period. + * + * @param endTime the endTime value to set. + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withEndTime(OffsetDateTime endTime) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticDetectorResponseProperties(); + } + this.innerProperties().withEndTime(endTime); + return this; + } + + /** + * Get the issueDetected property: Flag representing Issue was detected. + * + * @return the issueDetected value. + */ + public Boolean issueDetected() { + return this.innerProperties() == null ? null : this.innerProperties().issueDetected(); + } + + /** + * Set the issueDetected property: Flag representing Issue was detected. + * + * @param issueDetected the issueDetected value to set. + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withIssueDetected(Boolean issueDetected) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticDetectorResponseProperties(); + } + this.innerProperties().withIssueDetected(issueDetected); + return this; + } + + /** + * Get the detectorDefinition property: Detector's definition. + * + * @return the detectorDefinition value. + */ + public DetectorDefinition detectorDefinition() { + return this.innerProperties() == null ? null : this.innerProperties().detectorDefinition(); + } + + /** + * Set the detectorDefinition property: Detector's definition. + * + * @param detectorDefinition the detectorDefinition value to set. + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withDetectorDefinition(DetectorDefinition detectorDefinition) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticDetectorResponseProperties(); + } + this.innerProperties().withDetectorDefinition(detectorDefinition); + return this; + } + + /** + * Get the metrics property: Metrics provided by the detector. + * + * @return the metrics value. + */ + public List metrics() { + return this.innerProperties() == null ? null : this.innerProperties().metrics(); + } + + /** + * Set the metrics property: Metrics provided by the detector. + * + * @param metrics the metrics value to set. + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withMetrics(List metrics) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticDetectorResponseProperties(); + } + this.innerProperties().withMetrics(metrics); + return this; + } + + /** + * Get the abnormalTimePeriods property: List of Correlated events found by the detector. + * + * @return the abnormalTimePeriods value. + */ + public List abnormalTimePeriods() { + return this.innerProperties() == null ? null : this.innerProperties().abnormalTimePeriods(); + } + + /** + * Set the abnormalTimePeriods property: List of Correlated events found by the detector. + * + * @param abnormalTimePeriods the abnormalTimePeriods value to set. + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withAbnormalTimePeriods( + List abnormalTimePeriods) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticDetectorResponseProperties(); + } + this.innerProperties().withAbnormalTimePeriods(abnormalTimePeriods); + return this; + } + + /** + * Get the data property: Additional Data that detector wants to send. + * + * @return the data value. + */ + public List> data() { + return this.innerProperties() == null ? null : this.innerProperties().data(); + } + + /** + * Set the data property: Additional Data that detector wants to send. + * + * @param data the data value to set. + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withData(List> data) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticDetectorResponseProperties(); + } + this.innerProperties().withData(data); + return this; + } + + /** + * Get the responseMetadata property: Meta Data. + * + * @return the responseMetadata value. + */ + public ResponseMetadata responseMetadata() { + return this.innerProperties() == null ? null : this.innerProperties().responseMetadata(); + } + + /** + * Set the responseMetadata property: Meta Data. + * + * @param responseMetadata the responseMetadata value to set. + * @return the DiagnosticDetectorResponseInner object itself. + */ + public DiagnosticDetectorResponseInner withResponseMetadata(ResponseMetadata responseMetadata) { + if (this.innerProperties() == null) { + this.innerProperties = new DiagnosticDetectorResponseProperties(); + } + this.innerProperties().withResponseMetadata(responseMetadata); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticDetectorResponseProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticDetectorResponseProperties.java new file mode 100644 index 0000000000000..ad40f2517be20 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DiagnosticDetectorResponseProperties.java @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.DetectorAbnormalTimePeriod; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticMetricSet; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.ResponseMetadata; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** DiagnosticDetectorResponse resource specific properties. */ +@Fluent +public final class DiagnosticDetectorResponseProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticDetectorResponseProperties.class); + + /* + * Start time of the period + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * End time of the period + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Flag representing Issue was detected. + */ + @JsonProperty(value = "issueDetected") + private Boolean issueDetected; + + /* + * Detector's definition + */ + @JsonProperty(value = "detectorDefinition") + private DetectorDefinition detectorDefinition; + + /* + * Metrics provided by the detector + */ + @JsonProperty(value = "metrics") + private List metrics; + + /* + * List of Correlated events found by the detector + */ + @JsonProperty(value = "abnormalTimePeriods") + private List abnormalTimePeriods; + + /* + * Additional Data that detector wants to send. + */ + @JsonProperty(value = "data") + private List> data; + + /* + * Meta Data + */ + @JsonProperty(value = "responseMetaData") + private ResponseMetadata responseMetadata; + + /** + * Get the startTime property: Start time of the period. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time of the period. + * + * @param startTime the startTime value to set. + * @return the DiagnosticDetectorResponseProperties object itself. + */ + public DiagnosticDetectorResponseProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: End time of the period. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time of the period. + * + * @param endTime the endTime value to set. + * @return the DiagnosticDetectorResponseProperties object itself. + */ + public DiagnosticDetectorResponseProperties withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the issueDetected property: Flag representing Issue was detected. + * + * @return the issueDetected value. + */ + public Boolean issueDetected() { + return this.issueDetected; + } + + /** + * Set the issueDetected property: Flag representing Issue was detected. + * + * @param issueDetected the issueDetected value to set. + * @return the DiagnosticDetectorResponseProperties object itself. + */ + public DiagnosticDetectorResponseProperties withIssueDetected(Boolean issueDetected) { + this.issueDetected = issueDetected; + return this; + } + + /** + * Get the detectorDefinition property: Detector's definition. + * + * @return the detectorDefinition value. + */ + public DetectorDefinition detectorDefinition() { + return this.detectorDefinition; + } + + /** + * Set the detectorDefinition property: Detector's definition. + * + * @param detectorDefinition the detectorDefinition value to set. + * @return the DiagnosticDetectorResponseProperties object itself. + */ + public DiagnosticDetectorResponseProperties withDetectorDefinition(DetectorDefinition detectorDefinition) { + this.detectorDefinition = detectorDefinition; + return this; + } + + /** + * Get the metrics property: Metrics provided by the detector. + * + * @return the metrics value. + */ + public List metrics() { + return this.metrics; + } + + /** + * Set the metrics property: Metrics provided by the detector. + * + * @param metrics the metrics value to set. + * @return the DiagnosticDetectorResponseProperties object itself. + */ + public DiagnosticDetectorResponseProperties withMetrics(List metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get the abnormalTimePeriods property: List of Correlated events found by the detector. + * + * @return the abnormalTimePeriods value. + */ + public List abnormalTimePeriods() { + return this.abnormalTimePeriods; + } + + /** + * Set the abnormalTimePeriods property: List of Correlated events found by the detector. + * + * @param abnormalTimePeriods the abnormalTimePeriods value to set. + * @return the DiagnosticDetectorResponseProperties object itself. + */ + public DiagnosticDetectorResponseProperties withAbnormalTimePeriods( + List abnormalTimePeriods) { + this.abnormalTimePeriods = abnormalTimePeriods; + return this; + } + + /** + * Get the data property: Additional Data that detector wants to send. + * + * @return the data value. + */ + public List> data() { + return this.data; + } + + /** + * Set the data property: Additional Data that detector wants to send. + * + * @param data the data value to set. + * @return the DiagnosticDetectorResponseProperties object itself. + */ + public DiagnosticDetectorResponseProperties withData(List> data) { + this.data = data; + return this; + } + + /** + * Get the responseMetadata property: Meta Data. + * + * @return the responseMetadata value. + */ + public ResponseMetadata responseMetadata() { + return this.responseMetadata; + } + + /** + * Set the responseMetadata property: Meta Data. + * + * @param responseMetadata the responseMetadata value to set. + * @return the DiagnosticDetectorResponseProperties object itself. + */ + public DiagnosticDetectorResponseProperties withResponseMetadata(ResponseMetadata responseMetadata) { + this.responseMetadata = responseMetadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (detectorDefinition() != null) { + detectorDefinition().validate(); + } + if (metrics() != null) { + metrics().forEach(e -> e.validate()); + } + if (abnormalTimePeriods() != null) { + abnormalTimePeriods().forEach(e -> e.validate()); + } + if (data() != null) { + data().forEach(e -> e.forEach(e1 -> e1.validate())); + } + if (responseMetadata() != null) { + responseMetadata().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainAvailabilityCheckResultInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainAvailabilityCheckResultInner.java new file mode 100644 index 0000000000000..0c1933ec807e7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainAvailabilityCheckResultInner.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.DomainType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Domain availability check result. */ +@Fluent +public final class DomainAvailabilityCheckResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainAvailabilityCheckResultInner.class); + + /* + * Name of the domain. + */ + @JsonProperty(value = "name") + private String name; + + /* + * true if domain can be purchased using CreateDomain API; + * otherwise, false. + */ + @JsonProperty(value = "available") + private Boolean available; + + /* + * Valid values are Regular domain: Azure will charge the full price of + * domain registration, SoftDeleted: Purchasing this domain will simply + * restore it and this operation will not cost anything. + */ + @JsonProperty(value = "domainType") + private DomainType domainType; + + /** + * Get the name property: Name of the domain. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the domain. + * + * @param name the name value to set. + * @return the DomainAvailabilityCheckResultInner object itself. + */ + public DomainAvailabilityCheckResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the available property: <code>true</code> if domain can be purchased using CreateDomain API; + * otherwise, <code>false</code>. + * + * @return the available value. + */ + public Boolean available() { + return this.available; + } + + /** + * Set the available property: <code>true</code> if domain can be purchased using CreateDomain API; + * otherwise, <code>false</code>. + * + * @param available the available value to set. + * @return the DomainAvailabilityCheckResultInner object itself. + */ + public DomainAvailabilityCheckResultInner withAvailable(Boolean available) { + this.available = available; + return this; + } + + /** + * Get the domainType property: Valid values are Regular domain: Azure will charge the full price of domain + * registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost + * anything. + * + * @return the domainType value. + */ + public DomainType domainType() { + return this.domainType; + } + + /** + * Set the domainType property: Valid values are Regular domain: Azure will charge the full price of domain + * registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost + * anything. + * + * @param domainType the domainType value to set. + * @return the DomainAvailabilityCheckResultInner object itself. + */ + public DomainAvailabilityCheckResultInner withDomainType(DomainType domainType) { + this.domainType = domainType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainControlCenterSsoRequestInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainControlCenterSsoRequestInner.java new file mode 100644 index 0000000000000..a55dc86f9f48d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainControlCenterSsoRequestInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Single sign-on request information for domain management. */ +@Immutable +public final class DomainControlCenterSsoRequestInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainControlCenterSsoRequestInner.class); + + /* + * URL where the single sign-on request is to be made. + */ + @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY) + private String url; + + /* + * Post parameter key. + */ + @JsonProperty(value = "postParameterKey", access = JsonProperty.Access.WRITE_ONLY) + private String postParameterKey; + + /* + * Post parameter value. Client should use + * 'application/x-www-form-urlencoded' encoding for this value. + */ + @JsonProperty(value = "postParameterValue", access = JsonProperty.Access.WRITE_ONLY) + private String postParameterValue; + + /** + * Get the url property: URL where the single sign-on request is to be made. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Get the postParameterKey property: Post parameter key. + * + * @return the postParameterKey value. + */ + public String postParameterKey() { + return this.postParameterKey; + } + + /** + * Get the postParameterValue property: Post parameter value. Client should use 'application/x-www-form-urlencoded' + * encoding for this value. + * + * @return the postParameterValue value. + */ + public String postParameterValue() { + return this.postParameterValue; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainInner.java new file mode 100644 index 0000000000000..ec14fe06f874b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainInner.java @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Contact; +import com.azure.resourcemanager.appservice.generated.models.DnsType; +import com.azure.resourcemanager.appservice.generated.models.DomainPropertiesDomainNotRenewableReasonsItem; +import com.azure.resourcemanager.appservice.generated.models.DomainPurchaseConsent; +import com.azure.resourcemanager.appservice.generated.models.DomainStatus; +import com.azure.resourcemanager.appservice.generated.models.Hostname; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** Information about a domain. */ +@Fluent +public final class DomainInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainInner.class); + + /* + * Domain resource specific properties + */ + @JsonProperty(value = "properties") + private DomainProperties innerProperties; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: Domain resource specific properties. + * + * @return the innerProperties value. + */ + private DomainProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the DomainInner object itself. + */ + public DomainInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public DomainInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public DomainInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the contactAdmin property: Administrative contact. + * + * @return the contactAdmin value. + */ + public Contact contactAdmin() { + return this.innerProperties() == null ? null : this.innerProperties().contactAdmin(); + } + + /** + * Set the contactAdmin property: Administrative contact. + * + * @param contactAdmin the contactAdmin value to set. + * @return the DomainInner object itself. + */ + public DomainInner withContactAdmin(Contact contactAdmin) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withContactAdmin(contactAdmin); + return this; + } + + /** + * Get the contactBilling property: Billing contact. + * + * @return the contactBilling value. + */ + public Contact contactBilling() { + return this.innerProperties() == null ? null : this.innerProperties().contactBilling(); + } + + /** + * Set the contactBilling property: Billing contact. + * + * @param contactBilling the contactBilling value to set. + * @return the DomainInner object itself. + */ + public DomainInner withContactBilling(Contact contactBilling) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withContactBilling(contactBilling); + return this; + } + + /** + * Get the contactRegistrant property: Registrant contact. + * + * @return the contactRegistrant value. + */ + public Contact contactRegistrant() { + return this.innerProperties() == null ? null : this.innerProperties().contactRegistrant(); + } + + /** + * Set the contactRegistrant property: Registrant contact. + * + * @param contactRegistrant the contactRegistrant value to set. + * @return the DomainInner object itself. + */ + public DomainInner withContactRegistrant(Contact contactRegistrant) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withContactRegistrant(contactRegistrant); + return this; + } + + /** + * Get the contactTech property: Technical contact. + * + * @return the contactTech value. + */ + public Contact contactTech() { + return this.innerProperties() == null ? null : this.innerProperties().contactTech(); + } + + /** + * Set the contactTech property: Technical contact. + * + * @param contactTech the contactTech value to set. + * @return the DomainInner object itself. + */ + public DomainInner withContactTech(Contact contactTech) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withContactTech(contactTech); + return this; + } + + /** + * Get the registrationStatus property: Domain registration status. + * + * @return the registrationStatus value. + */ + public DomainStatus registrationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().registrationStatus(); + } + + /** + * Get the provisioningState property: Domain provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the nameServers property: Name servers. + * + * @return the nameServers value. + */ + public List nameServers() { + return this.innerProperties() == null ? null : this.innerProperties().nameServers(); + } + + /** + * Get the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @return the privacy value. + */ + public Boolean privacy() { + return this.innerProperties() == null ? null : this.innerProperties().privacy(); + } + + /** + * Set the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @param privacy the privacy value to set. + * @return the DomainInner object itself. + */ + public DomainInner withPrivacy(Boolean privacy) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withPrivacy(privacy); + return this; + } + + /** + * Get the createdTime property: Domain creation timestamp. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.innerProperties() == null ? null : this.innerProperties().createdTime(); + } + + /** + * Get the expirationTime property: Domain expiration timestamp. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().expirationTime(); + } + + /** + * Get the lastRenewedTime property: Timestamp when the domain was renewed last time. + * + * @return the lastRenewedTime value. + */ + public OffsetDateTime lastRenewedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastRenewedTime(); + } + + /** + * Get the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + public Boolean autoRenew() { + return this.innerProperties() == null ? null : this.innerProperties().autoRenew(); + } + + /** + * Set the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set. + * @return the DomainInner object itself. + */ + public DomainInner withAutoRenew(Boolean autoRenew) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withAutoRenew(autoRenew); + return this; + } + + /** + * Get the readyForDnsRecordManagement property: <code>true</code> if Azure can assign this domain to + * App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if + * domain registration status is active and it is hosted on name servers Azure has programmatic access to. + * + * @return the readyForDnsRecordManagement value. + */ + public Boolean readyForDnsRecordManagement() { + return this.innerProperties() == null ? null : this.innerProperties().readyForDnsRecordManagement(); + } + + /** + * Get the managedHostNames property: All hostnames derived from the domain and assigned to Azure resources. + * + * @return the managedHostNames value. + */ + public List managedHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().managedHostNames(); + } + + /** + * Get the consent property: Legal agreement consent. + * + * @return the consent value. + */ + public DomainPurchaseConsent consent() { + return this.innerProperties() == null ? null : this.innerProperties().consent(); + } + + /** + * Set the consent property: Legal agreement consent. + * + * @param consent the consent value to set. + * @return the DomainInner object itself. + */ + public DomainInner withConsent(DomainPurchaseConsent consent) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withConsent(consent); + return this; + } + + /** + * Get the domainNotRenewableReasons property: Reasons why domain is not renewable. + * + * @return the domainNotRenewableReasons value. + */ + public List domainNotRenewableReasons() { + return this.innerProperties() == null ? null : this.innerProperties().domainNotRenewableReasons(); + } + + /** + * Get the dnsType property: Current DNS type. + * + * @return the dnsType value. + */ + public DnsType dnsType() { + return this.innerProperties() == null ? null : this.innerProperties().dnsType(); + } + + /** + * Set the dnsType property: Current DNS type. + * + * @param dnsType the dnsType value to set. + * @return the DomainInner object itself. + */ + public DomainInner withDnsType(DnsType dnsType) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withDnsType(dnsType); + return this; + } + + /** + * Get the dnsZoneId property: Azure DNS Zone to use. + * + * @return the dnsZoneId value. + */ + public String dnsZoneId() { + return this.innerProperties() == null ? null : this.innerProperties().dnsZoneId(); + } + + /** + * Set the dnsZoneId property: Azure DNS Zone to use. + * + * @param dnsZoneId the dnsZoneId value to set. + * @return the DomainInner object itself. + */ + public DomainInner withDnsZoneId(String dnsZoneId) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withDnsZoneId(dnsZoneId); + return this; + } + + /** + * Get the targetDnsType property: Target DNS type (would be used for migration). + * + * @return the targetDnsType value. + */ + public DnsType targetDnsType() { + return this.innerProperties() == null ? null : this.innerProperties().targetDnsType(); + } + + /** + * Set the targetDnsType property: Target DNS type (would be used for migration). + * + * @param targetDnsType the targetDnsType value to set. + * @return the DomainInner object itself. + */ + public DomainInner withTargetDnsType(DnsType targetDnsType) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withTargetDnsType(targetDnsType); + return this; + } + + /** + * Get the authCode property: The authCode property. + * + * @return the authCode value. + */ + public String authCode() { + return this.innerProperties() == null ? null : this.innerProperties().authCode(); + } + + /** + * Set the authCode property: The authCode property. + * + * @param authCode the authCode value to set. + * @return the DomainInner object itself. + */ + public DomainInner withAuthCode(String authCode) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainProperties(); + } + this.innerProperties().withAuthCode(authCode); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainOwnershipIdentifierInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainOwnershipIdentifierInner.java new file mode 100644 index 0000000000000..94dd7d9097fe3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainOwnershipIdentifierInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Domain ownership Identifier. */ +@Fluent +public final class DomainOwnershipIdentifierInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainOwnershipIdentifierInner.class); + + /* + * DomainOwnershipIdentifier resource specific properties + */ + @JsonProperty(value = "properties") + private DomainOwnershipIdentifierProperties innerProperties; + + /** + * Get the innerProperties property: DomainOwnershipIdentifier resource specific properties. + * + * @return the innerProperties value. + */ + private DomainOwnershipIdentifierProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DomainOwnershipIdentifierInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the ownershipId property: Ownership Id. + * + * @return the ownershipId value. + */ + public String ownershipId() { + return this.innerProperties() == null ? null : this.innerProperties().ownershipId(); + } + + /** + * Set the ownershipId property: Ownership Id. + * + * @param ownershipId the ownershipId value to set. + * @return the DomainOwnershipIdentifierInner object itself. + */ + public DomainOwnershipIdentifierInner withOwnershipId(String ownershipId) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainOwnershipIdentifierProperties(); + } + this.innerProperties().withOwnershipId(ownershipId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainOwnershipIdentifierProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainOwnershipIdentifierProperties.java new file mode 100644 index 0000000000000..a5bb54344bab5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainOwnershipIdentifierProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** DomainOwnershipIdentifier resource specific properties. */ +@Fluent +public final class DomainOwnershipIdentifierProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainOwnershipIdentifierProperties.class); + + /* + * Ownership Id. + */ + @JsonProperty(value = "ownershipId") + private String ownershipId; + + /** + * Get the ownershipId property: Ownership Id. + * + * @return the ownershipId value. + */ + public String ownershipId() { + return this.ownershipId; + } + + /** + * Set the ownershipId property: Ownership Id. + * + * @param ownershipId the ownershipId value to set. + * @return the DomainOwnershipIdentifierProperties object itself. + */ + public DomainOwnershipIdentifierProperties withOwnershipId(String ownershipId) { + this.ownershipId = ownershipId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainPatchResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainPatchResourceProperties.java new file mode 100644 index 0000000000000..a2cb1942abb87 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainPatchResourceProperties.java @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Contact; +import com.azure.resourcemanager.appservice.generated.models.DnsType; +import com.azure.resourcemanager.appservice.generated.models.DomainPatchResourcePropertiesDomainNotRenewableReasonsItem; +import com.azure.resourcemanager.appservice.generated.models.DomainPurchaseConsent; +import com.azure.resourcemanager.appservice.generated.models.DomainStatus; +import com.azure.resourcemanager.appservice.generated.models.Hostname; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** DomainPatchResource resource specific properties. */ +@Fluent +public final class DomainPatchResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainPatchResourceProperties.class); + + /* + * Administrative contact. + */ + @JsonProperty(value = "contactAdmin", required = true) + private Contact contactAdmin; + + /* + * Billing contact. + */ + @JsonProperty(value = "contactBilling", required = true) + private Contact contactBilling; + + /* + * Registrant contact. + */ + @JsonProperty(value = "contactRegistrant", required = true) + private Contact contactRegistrant; + + /* + * Technical contact. + */ + @JsonProperty(value = "contactTech", required = true) + private Contact contactTech; + + /* + * Domain registration status. + */ + @JsonProperty(value = "registrationStatus", access = JsonProperty.Access.WRITE_ONLY) + private DomainStatus registrationStatus; + + /* + * Domain provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Name servers. + */ + @JsonProperty(value = "nameServers", access = JsonProperty.Access.WRITE_ONLY) + private List nameServers; + + /* + * true if domain privacy is enabled for this domain; + * otherwise, false. + */ + @JsonProperty(value = "privacy") + private Boolean privacy; + + /* + * Domain creation timestamp. + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTime; + + /* + * Domain expiration timestamp. + */ + @JsonProperty(value = "expirationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expirationTime; + + /* + * Timestamp when the domain was renewed last time. + */ + @JsonProperty(value = "lastRenewedTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastRenewedTime; + + /* + * true if the domain should be automatically renewed; + * otherwise, false. + */ + @JsonProperty(value = "autoRenew") + private Boolean autoRenew; + + /* + * true if Azure can assign this domain to App Service apps; + * otherwise, false. This value will be true if + * domain registration status is active and + * it is hosted on name servers Azure has programmatic access to. + */ + @JsonProperty(value = "readyForDnsRecordManagement", access = JsonProperty.Access.WRITE_ONLY) + private Boolean readyForDnsRecordManagement; + + /* + * All hostnames derived from the domain and assigned to Azure resources. + */ + @JsonProperty(value = "managedHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List managedHostNames; + + /* + * Legal agreement consent. + */ + @JsonProperty(value = "consent", required = true) + private DomainPurchaseConsent consent; + + /* + * Reasons why domain is not renewable. + */ + @JsonProperty(value = "domainNotRenewableReasons", access = JsonProperty.Access.WRITE_ONLY) + private List domainNotRenewableReasons; + + /* + * Current DNS type + */ + @JsonProperty(value = "dnsType") + private DnsType dnsType; + + /* + * Azure DNS Zone to use + */ + @JsonProperty(value = "dnsZoneId") + private String dnsZoneId; + + /* + * Target DNS type (would be used for migration) + */ + @JsonProperty(value = "targetDnsType") + private DnsType targetDnsType; + + /* + * The authCode property. + */ + @JsonProperty(value = "authCode") + private String authCode; + + /** + * Get the contactAdmin property: Administrative contact. + * + * @return the contactAdmin value. + */ + public Contact contactAdmin() { + return this.contactAdmin; + } + + /** + * Set the contactAdmin property: Administrative contact. + * + * @param contactAdmin the contactAdmin value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withContactAdmin(Contact contactAdmin) { + this.contactAdmin = contactAdmin; + return this; + } + + /** + * Get the contactBilling property: Billing contact. + * + * @return the contactBilling value. + */ + public Contact contactBilling() { + return this.contactBilling; + } + + /** + * Set the contactBilling property: Billing contact. + * + * @param contactBilling the contactBilling value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withContactBilling(Contact contactBilling) { + this.contactBilling = contactBilling; + return this; + } + + /** + * Get the contactRegistrant property: Registrant contact. + * + * @return the contactRegistrant value. + */ + public Contact contactRegistrant() { + return this.contactRegistrant; + } + + /** + * Set the contactRegistrant property: Registrant contact. + * + * @param contactRegistrant the contactRegistrant value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withContactRegistrant(Contact contactRegistrant) { + this.contactRegistrant = contactRegistrant; + return this; + } + + /** + * Get the contactTech property: Technical contact. + * + * @return the contactTech value. + */ + public Contact contactTech() { + return this.contactTech; + } + + /** + * Set the contactTech property: Technical contact. + * + * @param contactTech the contactTech value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withContactTech(Contact contactTech) { + this.contactTech = contactTech; + return this; + } + + /** + * Get the registrationStatus property: Domain registration status. + * + * @return the registrationStatus value. + */ + public DomainStatus registrationStatus() { + return this.registrationStatus; + } + + /** + * Get the provisioningState property: Domain provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the nameServers property: Name servers. + * + * @return the nameServers value. + */ + public List nameServers() { + return this.nameServers; + } + + /** + * Get the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @return the privacy value. + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @param privacy the privacy value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withPrivacy(Boolean privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get the createdTime property: Domain creation timestamp. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.createdTime; + } + + /** + * Get the expirationTime property: Domain expiration timestamp. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get the lastRenewedTime property: Timestamp when the domain was renewed last time. + * + * @return the lastRenewedTime value. + */ + public OffsetDateTime lastRenewedTime() { + return this.lastRenewedTime; + } + + /** + * Get the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get the readyForDnsRecordManagement property: <code>true</code> if Azure can assign this domain to + * App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if + * domain registration status is active and it is hosted on name servers Azure has programmatic access to. + * + * @return the readyForDnsRecordManagement value. + */ + public Boolean readyForDnsRecordManagement() { + return this.readyForDnsRecordManagement; + } + + /** + * Get the managedHostNames property: All hostnames derived from the domain and assigned to Azure resources. + * + * @return the managedHostNames value. + */ + public List managedHostNames() { + return this.managedHostNames; + } + + /** + * Get the consent property: Legal agreement consent. + * + * @return the consent value. + */ + public DomainPurchaseConsent consent() { + return this.consent; + } + + /** + * Set the consent property: Legal agreement consent. + * + * @param consent the consent value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withConsent(DomainPurchaseConsent consent) { + this.consent = consent; + return this; + } + + /** + * Get the domainNotRenewableReasons property: Reasons why domain is not renewable. + * + * @return the domainNotRenewableReasons value. + */ + public List domainNotRenewableReasons() { + return this.domainNotRenewableReasons; + } + + /** + * Get the dnsType property: Current DNS type. + * + * @return the dnsType value. + */ + public DnsType dnsType() { + return this.dnsType; + } + + /** + * Set the dnsType property: Current DNS type. + * + * @param dnsType the dnsType value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withDnsType(DnsType dnsType) { + this.dnsType = dnsType; + return this; + } + + /** + * Get the dnsZoneId property: Azure DNS Zone to use. + * + * @return the dnsZoneId value. + */ + public String dnsZoneId() { + return this.dnsZoneId; + } + + /** + * Set the dnsZoneId property: Azure DNS Zone to use. + * + * @param dnsZoneId the dnsZoneId value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withDnsZoneId(String dnsZoneId) { + this.dnsZoneId = dnsZoneId; + return this; + } + + /** + * Get the targetDnsType property: Target DNS type (would be used for migration). + * + * @return the targetDnsType value. + */ + public DnsType targetDnsType() { + return this.targetDnsType; + } + + /** + * Set the targetDnsType property: Target DNS type (would be used for migration). + * + * @param targetDnsType the targetDnsType value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withTargetDnsType(DnsType targetDnsType) { + this.targetDnsType = targetDnsType; + return this; + } + + /** + * Get the authCode property: The authCode property. + * + * @return the authCode value. + */ + public String authCode() { + return this.authCode; + } + + /** + * Set the authCode property: The authCode property. + * + * @param authCode the authCode value to set. + * @return the DomainPatchResourceProperties object itself. + */ + public DomainPatchResourceProperties withAuthCode(String authCode) { + this.authCode = authCode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contactAdmin() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property contactAdmin in model DomainPatchResourceProperties")); + } else { + contactAdmin().validate(); + } + if (contactBilling() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property contactBilling in model DomainPatchResourceProperties")); + } else { + contactBilling().validate(); + } + if (contactRegistrant() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property contactRegistrant in model DomainPatchResourceProperties")); + } else { + contactRegistrant().validate(); + } + if (contactTech() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property contactTech in model DomainPatchResourceProperties")); + } else { + contactTech().validate(); + } + if (managedHostNames() != null) { + managedHostNames().forEach(e -> e.validate()); + } + if (consent() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property consent in model DomainPatchResourceProperties")); + } else { + consent().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainProperties.java new file mode 100644 index 0000000000000..a05ecdc86d449 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/DomainProperties.java @@ -0,0 +1,504 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Contact; +import com.azure.resourcemanager.appservice.generated.models.DnsType; +import com.azure.resourcemanager.appservice.generated.models.DomainPropertiesDomainNotRenewableReasonsItem; +import com.azure.resourcemanager.appservice.generated.models.DomainPurchaseConsent; +import com.azure.resourcemanager.appservice.generated.models.DomainStatus; +import com.azure.resourcemanager.appservice.generated.models.Hostname; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Domain resource specific properties. */ +@Fluent +public final class DomainProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainProperties.class); + + /* + * Administrative contact. + */ + @JsonProperty(value = "contactAdmin", required = true) + private Contact contactAdmin; + + /* + * Billing contact. + */ + @JsonProperty(value = "contactBilling", required = true) + private Contact contactBilling; + + /* + * Registrant contact. + */ + @JsonProperty(value = "contactRegistrant", required = true) + private Contact contactRegistrant; + + /* + * Technical contact. + */ + @JsonProperty(value = "contactTech", required = true) + private Contact contactTech; + + /* + * Domain registration status. + */ + @JsonProperty(value = "registrationStatus", access = JsonProperty.Access.WRITE_ONLY) + private DomainStatus registrationStatus; + + /* + * Domain provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Name servers. + */ + @JsonProperty(value = "nameServers", access = JsonProperty.Access.WRITE_ONLY) + private List nameServers; + + /* + * true if domain privacy is enabled for this domain; + * otherwise, false. + */ + @JsonProperty(value = "privacy") + private Boolean privacy; + + /* + * Domain creation timestamp. + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTime; + + /* + * Domain expiration timestamp. + */ + @JsonProperty(value = "expirationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expirationTime; + + /* + * Timestamp when the domain was renewed last time. + */ + @JsonProperty(value = "lastRenewedTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastRenewedTime; + + /* + * true if the domain should be automatically renewed; + * otherwise, false. + */ + @JsonProperty(value = "autoRenew") + private Boolean autoRenew; + + /* + * true if Azure can assign this domain to App Service apps; + * otherwise, false. This value will be true if + * domain registration status is active and + * it is hosted on name servers Azure has programmatic access to. + */ + @JsonProperty(value = "readyForDnsRecordManagement", access = JsonProperty.Access.WRITE_ONLY) + private Boolean readyForDnsRecordManagement; + + /* + * All hostnames derived from the domain and assigned to Azure resources. + */ + @JsonProperty(value = "managedHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List managedHostNames; + + /* + * Legal agreement consent. + */ + @JsonProperty(value = "consent", required = true) + private DomainPurchaseConsent consent; + + /* + * Reasons why domain is not renewable. + */ + @JsonProperty(value = "domainNotRenewableReasons", access = JsonProperty.Access.WRITE_ONLY) + private List domainNotRenewableReasons; + + /* + * Current DNS type + */ + @JsonProperty(value = "dnsType") + private DnsType dnsType; + + /* + * Azure DNS Zone to use + */ + @JsonProperty(value = "dnsZoneId") + private String dnsZoneId; + + /* + * Target DNS type (would be used for migration) + */ + @JsonProperty(value = "targetDnsType") + private DnsType targetDnsType; + + /* + * The authCode property. + */ + @JsonProperty(value = "authCode") + private String authCode; + + /** + * Get the contactAdmin property: Administrative contact. + * + * @return the contactAdmin value. + */ + public Contact contactAdmin() { + return this.contactAdmin; + } + + /** + * Set the contactAdmin property: Administrative contact. + * + * @param contactAdmin the contactAdmin value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withContactAdmin(Contact contactAdmin) { + this.contactAdmin = contactAdmin; + return this; + } + + /** + * Get the contactBilling property: Billing contact. + * + * @return the contactBilling value. + */ + public Contact contactBilling() { + return this.contactBilling; + } + + /** + * Set the contactBilling property: Billing contact. + * + * @param contactBilling the contactBilling value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withContactBilling(Contact contactBilling) { + this.contactBilling = contactBilling; + return this; + } + + /** + * Get the contactRegistrant property: Registrant contact. + * + * @return the contactRegistrant value. + */ + public Contact contactRegistrant() { + return this.contactRegistrant; + } + + /** + * Set the contactRegistrant property: Registrant contact. + * + * @param contactRegistrant the contactRegistrant value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withContactRegistrant(Contact contactRegistrant) { + this.contactRegistrant = contactRegistrant; + return this; + } + + /** + * Get the contactTech property: Technical contact. + * + * @return the contactTech value. + */ + public Contact contactTech() { + return this.contactTech; + } + + /** + * Set the contactTech property: Technical contact. + * + * @param contactTech the contactTech value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withContactTech(Contact contactTech) { + this.contactTech = contactTech; + return this; + } + + /** + * Get the registrationStatus property: Domain registration status. + * + * @return the registrationStatus value. + */ + public DomainStatus registrationStatus() { + return this.registrationStatus; + } + + /** + * Get the provisioningState property: Domain provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the nameServers property: Name servers. + * + * @return the nameServers value. + */ + public List nameServers() { + return this.nameServers; + } + + /** + * Get the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @return the privacy value. + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @param privacy the privacy value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withPrivacy(Boolean privacy) { + this.privacy = privacy; + return this; + } + + /** + * Get the createdTime property: Domain creation timestamp. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.createdTime; + } + + /** + * Get the expirationTime property: Domain expiration timestamp. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.expirationTime; + } + + /** + * Get the lastRenewedTime property: Timestamp when the domain was renewed last time. + * + * @return the lastRenewedTime value. + */ + public OffsetDateTime lastRenewedTime() { + return this.lastRenewedTime; + } + + /** + * Get the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + public Boolean autoRenew() { + return this.autoRenew; + } + + /** + * Set the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withAutoRenew(Boolean autoRenew) { + this.autoRenew = autoRenew; + return this; + } + + /** + * Get the readyForDnsRecordManagement property: <code>true</code> if Azure can assign this domain to + * App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if + * domain registration status is active and it is hosted on name servers Azure has programmatic access to. + * + * @return the readyForDnsRecordManagement value. + */ + public Boolean readyForDnsRecordManagement() { + return this.readyForDnsRecordManagement; + } + + /** + * Get the managedHostNames property: All hostnames derived from the domain and assigned to Azure resources. + * + * @return the managedHostNames value. + */ + public List managedHostNames() { + return this.managedHostNames; + } + + /** + * Get the consent property: Legal agreement consent. + * + * @return the consent value. + */ + public DomainPurchaseConsent consent() { + return this.consent; + } + + /** + * Set the consent property: Legal agreement consent. + * + * @param consent the consent value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withConsent(DomainPurchaseConsent consent) { + this.consent = consent; + return this; + } + + /** + * Get the domainNotRenewableReasons property: Reasons why domain is not renewable. + * + * @return the domainNotRenewableReasons value. + */ + public List domainNotRenewableReasons() { + return this.domainNotRenewableReasons; + } + + /** + * Get the dnsType property: Current DNS type. + * + * @return the dnsType value. + */ + public DnsType dnsType() { + return this.dnsType; + } + + /** + * Set the dnsType property: Current DNS type. + * + * @param dnsType the dnsType value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withDnsType(DnsType dnsType) { + this.dnsType = dnsType; + return this; + } + + /** + * Get the dnsZoneId property: Azure DNS Zone to use. + * + * @return the dnsZoneId value. + */ + public String dnsZoneId() { + return this.dnsZoneId; + } + + /** + * Set the dnsZoneId property: Azure DNS Zone to use. + * + * @param dnsZoneId the dnsZoneId value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withDnsZoneId(String dnsZoneId) { + this.dnsZoneId = dnsZoneId; + return this; + } + + /** + * Get the targetDnsType property: Target DNS type (would be used for migration). + * + * @return the targetDnsType value. + */ + public DnsType targetDnsType() { + return this.targetDnsType; + } + + /** + * Set the targetDnsType property: Target DNS type (would be used for migration). + * + * @param targetDnsType the targetDnsType value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withTargetDnsType(DnsType targetDnsType) { + this.targetDnsType = targetDnsType; + return this; + } + + /** + * Get the authCode property: The authCode property. + * + * @return the authCode value. + */ + public String authCode() { + return this.authCode; + } + + /** + * Set the authCode property: The authCode property. + * + * @param authCode the authCode value to set. + * @return the DomainProperties object itself. + */ + public DomainProperties withAuthCode(String authCode) { + this.authCode = authCode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (contactAdmin() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property contactAdmin in model DomainProperties")); + } else { + contactAdmin().validate(); + } + if (contactBilling() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property contactBilling in model DomainProperties")); + } else { + contactBilling().validate(); + } + if (contactRegistrant() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property contactRegistrant in model DomainProperties")); + } else { + contactRegistrant().validate(); + } + if (contactTech() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property contactTech in model DomainProperties")); + } else { + contactTech().validate(); + } + if (managedHostNames() != null) { + managedHostNames().forEach(e -> e.validate()); + } + if (consent() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property consent in model DomainProperties")); + } else { + consent().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionAppStackInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionAppStackInner.java new file mode 100644 index 0000000000000..da435d2404d64 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionAppStackInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.FunctionAppMajorVersion; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.StackPreferredOs; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Function App Stack. */ +@Fluent +public final class FunctionAppStackInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionAppStackInner.class); + + /* + * Function App stack location. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /* + * FunctionAppStack resource specific properties + */ + @JsonProperty(value = "properties") + private FunctionAppStackProperties innerProperties; + + /** + * Get the location property: Function App stack location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the innerProperties property: FunctionAppStack resource specific properties. + * + * @return the innerProperties value. + */ + private FunctionAppStackProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public FunctionAppStackInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the displayText property: Function App stack (display only). + * + * @return the displayText value. + */ + public String displayText() { + return this.innerProperties() == null ? null : this.innerProperties().displayText(); + } + + /** + * Get the value property: Function App stack name. + * + * @return the value value. + */ + public String value() { + return this.innerProperties() == null ? null : this.innerProperties().value(); + } + + /** + * Get the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + public List majorVersions() { + return this.innerProperties() == null ? null : this.innerProperties().majorVersions(); + } + + /** + * Get the preferredOs property: Function App stack preferred OS. + * + * @return the preferredOs value. + */ + public StackPreferredOs preferredOs() { + return this.innerProperties() == null ? null : this.innerProperties().preferredOs(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionAppStackProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionAppStackProperties.java new file mode 100644 index 0000000000000..e9eea9617d47c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionAppStackProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.FunctionAppMajorVersion; +import com.azure.resourcemanager.appservice.generated.models.StackPreferredOs; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** FunctionAppStack resource specific properties. */ +@Immutable +public final class FunctionAppStackProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionAppStackProperties.class); + + /* + * Function App stack (display only). + */ + @JsonProperty(value = "displayText", access = JsonProperty.Access.WRITE_ONLY) + private String displayText; + + /* + * Function App stack name. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /* + * List of major versions available. + */ + @JsonProperty(value = "majorVersions", access = JsonProperty.Access.WRITE_ONLY) + private List majorVersions; + + /* + * Function App stack preferred OS. + */ + @JsonProperty(value = "preferredOs", access = JsonProperty.Access.WRITE_ONLY) + private StackPreferredOs preferredOs; + + /** + * Get the displayText property: Function App stack (display only). + * + * @return the displayText value. + */ + public String displayText() { + return this.displayText; + } + + /** + * Get the value property: Function App stack name. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Get the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + public List majorVersions() { + return this.majorVersions; + } + + /** + * Get the preferredOs property: Function App stack preferred OS. + * + * @return the preferredOs value. + */ + public StackPreferredOs preferredOs() { + return this.preferredOs; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (majorVersions() != null) { + majorVersions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionEnvelopeInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionEnvelopeInner.java new file mode 100644 index 0000000000000..a8fbed0b6a008 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionEnvelopeInner.java @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Function information. */ +@Fluent +public final class FunctionEnvelopeInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionEnvelopeInner.class); + + /* + * FunctionEnvelope resource specific properties + */ + @JsonProperty(value = "properties") + private FunctionEnvelopeProperties innerProperties; + + /** + * Get the innerProperties property: FunctionEnvelope resource specific properties. + * + * @return the innerProperties value. + */ + private FunctionEnvelopeProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public FunctionEnvelopeInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the functionAppId property: Function App ID. + * + * @return the functionAppId value. + */ + public String functionAppId() { + return this.innerProperties() == null ? null : this.innerProperties().functionAppId(); + } + + /** + * Set the functionAppId property: Function App ID. + * + * @param functionAppId the functionAppId value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withFunctionAppId(String functionAppId) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withFunctionAppId(functionAppId); + return this; + } + + /** + * Get the scriptRootPathHref property: Script root path URI. + * + * @return the scriptRootPathHref value. + */ + public String scriptRootPathHref() { + return this.innerProperties() == null ? null : this.innerProperties().scriptRootPathHref(); + } + + /** + * Set the scriptRootPathHref property: Script root path URI. + * + * @param scriptRootPathHref the scriptRootPathHref value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withScriptRootPathHref(String scriptRootPathHref) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withScriptRootPathHref(scriptRootPathHref); + return this; + } + + /** + * Get the scriptHref property: Script URI. + * + * @return the scriptHref value. + */ + public String scriptHref() { + return this.innerProperties() == null ? null : this.innerProperties().scriptHref(); + } + + /** + * Set the scriptHref property: Script URI. + * + * @param scriptHref the scriptHref value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withScriptHref(String scriptHref) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withScriptHref(scriptHref); + return this; + } + + /** + * Get the configHref property: Config URI. + * + * @return the configHref value. + */ + public String configHref() { + return this.innerProperties() == null ? null : this.innerProperties().configHref(); + } + + /** + * Set the configHref property: Config URI. + * + * @param configHref the configHref value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withConfigHref(String configHref) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withConfigHref(configHref); + return this; + } + + /** + * Get the testDataHref property: Test data URI. + * + * @return the testDataHref value. + */ + public String testDataHref() { + return this.innerProperties() == null ? null : this.innerProperties().testDataHref(); + } + + /** + * Set the testDataHref property: Test data URI. + * + * @param testDataHref the testDataHref value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withTestDataHref(String testDataHref) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withTestDataHref(testDataHref); + return this; + } + + /** + * Get the secretsFileHref property: Secrets file URI. + * + * @return the secretsFileHref value. + */ + public String secretsFileHref() { + return this.innerProperties() == null ? null : this.innerProperties().secretsFileHref(); + } + + /** + * Set the secretsFileHref property: Secrets file URI. + * + * @param secretsFileHref the secretsFileHref value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withSecretsFileHref(String secretsFileHref) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withSecretsFileHref(secretsFileHref); + return this; + } + + /** + * Get the href property: Function URI. + * + * @return the href value. + */ + public String href() { + return this.innerProperties() == null ? null : this.innerProperties().href(); + } + + /** + * Set the href property: Function URI. + * + * @param href the href value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withHref(String href) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withHref(href); + return this; + } + + /** + * Get the config property: Config information. + * + * @return the config value. + */ + public Object config() { + return this.innerProperties() == null ? null : this.innerProperties().config(); + } + + /** + * Set the config property: Config information. + * + * @param config the config value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withConfig(Object config) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withConfig(config); + return this; + } + + /** + * Get the files property: File list. + * + * @return the files value. + */ + public Map files() { + return this.innerProperties() == null ? null : this.innerProperties().files(); + } + + /** + * Set the files property: File list. + * + * @param files the files value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withFiles(Map files) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withFiles(files); + return this; + } + + /** + * Get the testData property: Test data used when testing via the Azure Portal. + * + * @return the testData value. + */ + public String testData() { + return this.innerProperties() == null ? null : this.innerProperties().testData(); + } + + /** + * Set the testData property: Test data used when testing via the Azure Portal. + * + * @param testData the testData value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withTestData(String testData) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withTestData(testData); + return this; + } + + /** + * Get the invokeUrlTemplate property: The invocation URL. + * + * @return the invokeUrlTemplate value. + */ + public String invokeUrlTemplate() { + return this.innerProperties() == null ? null : this.innerProperties().invokeUrlTemplate(); + } + + /** + * Set the invokeUrlTemplate property: The invocation URL. + * + * @param invokeUrlTemplate the invokeUrlTemplate value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withInvokeUrlTemplate(String invokeUrlTemplate) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withInvokeUrlTemplate(invokeUrlTemplate); + return this; + } + + /** + * Get the language property: The function language. + * + * @return the language value. + */ + public String language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: The function language. + * + * @param language the language value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withLanguage(String language) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + + /** + * Get the isDisabled property: Gets or sets a value indicating whether the function is disabled. + * + * @return the isDisabled value. + */ + public Boolean isDisabled() { + return this.innerProperties() == null ? null : this.innerProperties().isDisabled(); + } + + /** + * Set the isDisabled property: Gets or sets a value indicating whether the function is disabled. + * + * @param isDisabled the isDisabled value to set. + * @return the FunctionEnvelopeInner object itself. + */ + public FunctionEnvelopeInner withIsDisabled(Boolean isDisabled) { + if (this.innerProperties() == null) { + this.innerProperties = new FunctionEnvelopeProperties(); + } + this.innerProperties().withIsDisabled(isDisabled); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionEnvelopeProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionEnvelopeProperties.java new file mode 100644 index 0000000000000..b51006706a0ce --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionEnvelopeProperties.java @@ -0,0 +1,365 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** FunctionEnvelope resource specific properties. */ +@Fluent +public final class FunctionEnvelopeProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionEnvelopeProperties.class); + + /* + * Function App ID. + */ + @JsonProperty(value = "function_app_id") + private String functionAppId; + + /* + * Script root path URI. + */ + @JsonProperty(value = "script_root_path_href") + private String scriptRootPathHref; + + /* + * Script URI. + */ + @JsonProperty(value = "script_href") + private String scriptHref; + + /* + * Config URI. + */ + @JsonProperty(value = "config_href") + private String configHref; + + /* + * Test data URI. + */ + @JsonProperty(value = "test_data_href") + private String testDataHref; + + /* + * Secrets file URI. + */ + @JsonProperty(value = "secrets_file_href") + private String secretsFileHref; + + /* + * Function URI. + */ + @JsonProperty(value = "href") + private String href; + + /* + * Config information. + */ + @JsonProperty(value = "config") + private Object config; + + /* + * File list. + */ + @JsonProperty(value = "files") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map files; + + /* + * Test data used when testing via the Azure Portal. + */ + @JsonProperty(value = "test_data") + private String testData; + + /* + * The invocation URL + */ + @JsonProperty(value = "invoke_url_template") + private String invokeUrlTemplate; + + /* + * The function language + */ + @JsonProperty(value = "language") + private String language; + + /* + * Gets or sets a value indicating whether the function is disabled + */ + @JsonProperty(value = "isDisabled") + private Boolean isDisabled; + + /** + * Get the functionAppId property: Function App ID. + * + * @return the functionAppId value. + */ + public String functionAppId() { + return this.functionAppId; + } + + /** + * Set the functionAppId property: Function App ID. + * + * @param functionAppId the functionAppId value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withFunctionAppId(String functionAppId) { + this.functionAppId = functionAppId; + return this; + } + + /** + * Get the scriptRootPathHref property: Script root path URI. + * + * @return the scriptRootPathHref value. + */ + public String scriptRootPathHref() { + return this.scriptRootPathHref; + } + + /** + * Set the scriptRootPathHref property: Script root path URI. + * + * @param scriptRootPathHref the scriptRootPathHref value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withScriptRootPathHref(String scriptRootPathHref) { + this.scriptRootPathHref = scriptRootPathHref; + return this; + } + + /** + * Get the scriptHref property: Script URI. + * + * @return the scriptHref value. + */ + public String scriptHref() { + return this.scriptHref; + } + + /** + * Set the scriptHref property: Script URI. + * + * @param scriptHref the scriptHref value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withScriptHref(String scriptHref) { + this.scriptHref = scriptHref; + return this; + } + + /** + * Get the configHref property: Config URI. + * + * @return the configHref value. + */ + public String configHref() { + return this.configHref; + } + + /** + * Set the configHref property: Config URI. + * + * @param configHref the configHref value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withConfigHref(String configHref) { + this.configHref = configHref; + return this; + } + + /** + * Get the testDataHref property: Test data URI. + * + * @return the testDataHref value. + */ + public String testDataHref() { + return this.testDataHref; + } + + /** + * Set the testDataHref property: Test data URI. + * + * @param testDataHref the testDataHref value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withTestDataHref(String testDataHref) { + this.testDataHref = testDataHref; + return this; + } + + /** + * Get the secretsFileHref property: Secrets file URI. + * + * @return the secretsFileHref value. + */ + public String secretsFileHref() { + return this.secretsFileHref; + } + + /** + * Set the secretsFileHref property: Secrets file URI. + * + * @param secretsFileHref the secretsFileHref value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withSecretsFileHref(String secretsFileHref) { + this.secretsFileHref = secretsFileHref; + return this; + } + + /** + * Get the href property: Function URI. + * + * @return the href value. + */ + public String href() { + return this.href; + } + + /** + * Set the href property: Function URI. + * + * @param href the href value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the config property: Config information. + * + * @return the config value. + */ + public Object config() { + return this.config; + } + + /** + * Set the config property: Config information. + * + * @param config the config value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withConfig(Object config) { + this.config = config; + return this; + } + + /** + * Get the files property: File list. + * + * @return the files value. + */ + public Map files() { + return this.files; + } + + /** + * Set the files property: File list. + * + * @param files the files value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withFiles(Map files) { + this.files = files; + return this; + } + + /** + * Get the testData property: Test data used when testing via the Azure Portal. + * + * @return the testData value. + */ + public String testData() { + return this.testData; + } + + /** + * Set the testData property: Test data used when testing via the Azure Portal. + * + * @param testData the testData value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withTestData(String testData) { + this.testData = testData; + return this; + } + + /** + * Get the invokeUrlTemplate property: The invocation URL. + * + * @return the invokeUrlTemplate value. + */ + public String invokeUrlTemplate() { + return this.invokeUrlTemplate; + } + + /** + * Set the invokeUrlTemplate property: The invocation URL. + * + * @param invokeUrlTemplate the invokeUrlTemplate value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withInvokeUrlTemplate(String invokeUrlTemplate) { + this.invokeUrlTemplate = invokeUrlTemplate; + return this; + } + + /** + * Get the language property: The function language. + * + * @return the language value. + */ + public String language() { + return this.language; + } + + /** + * Set the language property: The function language. + * + * @param language the language value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withLanguage(String language) { + this.language = language; + return this; + } + + /** + * Get the isDisabled property: Gets or sets a value indicating whether the function is disabled. + * + * @return the isDisabled value. + */ + public Boolean isDisabled() { + return this.isDisabled; + } + + /** + * Set the isDisabled property: Gets or sets a value indicating whether the function is disabled. + * + * @param isDisabled the isDisabled value to set. + * @return the FunctionEnvelopeProperties object itself. + */ + public FunctionEnvelopeProperties withIsDisabled(Boolean isDisabled) { + this.isDisabled = isDisabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionSecretsInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionSecretsInner.java new file mode 100644 index 0000000000000..9fe335f04bfe4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/FunctionSecretsInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Function secrets. */ +@Fluent +public final class FunctionSecretsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionSecretsInner.class); + + /* + * Secret key. + */ + @JsonProperty(value = "key") + private String key; + + /* + * Trigger URL. + */ + @JsonProperty(value = "trigger_url") + private String triggerUrl; + + /** + * Get the key property: Secret key. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: Secret key. + * + * @param key the key value to set. + * @return the FunctionSecretsInner object itself. + */ + public FunctionSecretsInner withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the triggerUrl property: Trigger URL. + * + * @return the triggerUrl value. + */ + public String triggerUrl() { + return this.triggerUrl; + } + + /** + * Set the triggerUrl property: Trigger URL. + * + * @param triggerUrl the triggerUrl value to set. + * @return the FunctionSecretsInner object itself. + */ + public FunctionSecretsInner withTriggerUrl(String triggerUrl) { + this.triggerUrl = triggerUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/GeoRegionInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/GeoRegionInner.java new file mode 100644 index 0000000000000..78b6449e19adb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/GeoRegionInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Geographical region. */ +@Fluent +public final class GeoRegionInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GeoRegionInner.class); + + /* + * GeoRegion resource specific properties + */ + @JsonProperty(value = "properties") + private GeoRegionProperties innerProperties; + + /** + * Get the innerProperties property: GeoRegion resource specific properties. + * + * @return the innerProperties value. + */ + private GeoRegionProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public GeoRegionInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the description property: Region description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Get the displayName property: Display name for region. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Get the orgDomain property: Display name for region. + * + * @return the orgDomain value. + */ + public String orgDomain() { + return this.innerProperties() == null ? null : this.innerProperties().orgDomain(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/GeoRegionProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/GeoRegionProperties.java new file mode 100644 index 0000000000000..80b75db8fc135 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/GeoRegionProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** GeoRegion resource specific properties. */ +@Immutable +public final class GeoRegionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GeoRegionProperties.class); + + /* + * Region description. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Display name for region. + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /* + * Display name for region. + */ + @JsonProperty(value = "orgDomain", access = JsonProperty.Access.WRITE_ONLY) + private String orgDomain; + + /** + * Get the description property: Region description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the displayName property: Display name for region. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the orgDomain property: Display name for region. + * + * @return the orgDomain value. + */ + public String orgDomain() { + return this.orgDomain; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostKeysInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostKeysInner.java new file mode 100644 index 0000000000000..74fba2353dd91 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostKeysInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Functions host level keys. */ +@Fluent +public final class HostKeysInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HostKeysInner.class); + + /* + * Secret key. + */ + @JsonProperty(value = "masterKey") + private String masterKey; + + /* + * Host level function keys. + */ + @JsonProperty(value = "functionKeys") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map functionKeys; + + /* + * System keys. + */ + @JsonProperty(value = "systemKeys") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map systemKeys; + + /** + * Get the masterKey property: Secret key. + * + * @return the masterKey value. + */ + public String masterKey() { + return this.masterKey; + } + + /** + * Set the masterKey property: Secret key. + * + * @param masterKey the masterKey value to set. + * @return the HostKeysInner object itself. + */ + public HostKeysInner withMasterKey(String masterKey) { + this.masterKey = masterKey; + return this; + } + + /** + * Get the functionKeys property: Host level function keys. + * + * @return the functionKeys value. + */ + public Map functionKeys() { + return this.functionKeys; + } + + /** + * Set the functionKeys property: Host level function keys. + * + * @param functionKeys the functionKeys value to set. + * @return the HostKeysInner object itself. + */ + public HostKeysInner withFunctionKeys(Map functionKeys) { + this.functionKeys = functionKeys; + return this; + } + + /** + * Get the systemKeys property: System keys. + * + * @return the systemKeys value. + */ + public Map systemKeys() { + return this.systemKeys; + } + + /** + * Set the systemKeys property: System keys. + * + * @param systemKeys the systemKeys value to set. + * @return the HostKeysInner object itself. + */ + public HostKeysInner withSystemKeys(Map systemKeys) { + this.systemKeys = systemKeys; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostingEnvironmentDiagnosticsInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostingEnvironmentDiagnosticsInner.java new file mode 100644 index 0000000000000..123d3618edef0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostingEnvironmentDiagnosticsInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Diagnostics for an App Service Environment. */ +@Fluent +public final class HostingEnvironmentDiagnosticsInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HostingEnvironmentDiagnosticsInner.class); + + /* + * Name/identifier of the diagnostics. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Diagnostics output. + */ + @JsonProperty(value = "diagnosticsOutput") + private String diagnosticsOutput; + + /** + * Get the name property: Name/identifier of the diagnostics. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name/identifier of the diagnostics. + * + * @param name the name value to set. + * @return the HostingEnvironmentDiagnosticsInner object itself. + */ + public HostingEnvironmentDiagnosticsInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the diagnosticsOutput property: Diagnostics output. + * + * @return the diagnosticsOutput value. + */ + public String diagnosticsOutput() { + return this.diagnosticsOutput; + } + + /** + * Set the diagnosticsOutput property: Diagnostics output. + * + * @param diagnosticsOutput the diagnosticsOutput value to set. + * @return the HostingEnvironmentDiagnosticsInner object itself. + */ + public HostingEnvironmentDiagnosticsInner withDiagnosticsOutput(String diagnosticsOutput) { + this.diagnosticsOutput = diagnosticsOutput; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostnameBindingInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostnameBindingInner.java new file mode 100644 index 0000000000000..f0f21563a83c8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostnameBindingInner.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AzureResourceType; +import com.azure.resourcemanager.appservice.generated.models.CustomHostnameDnsRecordType; +import com.azure.resourcemanager.appservice.generated.models.HostnameType; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.SslState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A hostname binding object. */ +@Fluent +public final class HostnameBindingInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HostnameBindingInner.class); + + /* + * HostNameBinding resource specific properties + */ + @JsonProperty(value = "properties") + private HostnameBindingProperties innerProperties; + + /** + * Get the innerProperties property: HostNameBinding resource specific properties. + * + * @return the innerProperties value. + */ + private HostnameBindingProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public HostnameBindingInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the siteName property: App Service app name. + * + * @return the siteName value. + */ + public String siteName() { + return this.innerProperties() == null ? null : this.innerProperties().siteName(); + } + + /** + * Set the siteName property: App Service app name. + * + * @param siteName the siteName value to set. + * @return the HostnameBindingInner object itself. + */ + public HostnameBindingInner withSiteName(String siteName) { + if (this.innerProperties() == null) { + this.innerProperties = new HostnameBindingProperties(); + } + this.innerProperties().withSiteName(siteName); + return this; + } + + /** + * Get the domainId property: Fully qualified ARM domain resource URI. + * + * @return the domainId value. + */ + public String domainId() { + return this.innerProperties() == null ? null : this.innerProperties().domainId(); + } + + /** + * Set the domainId property: Fully qualified ARM domain resource URI. + * + * @param domainId the domainId value to set. + * @return the HostnameBindingInner object itself. + */ + public HostnameBindingInner withDomainId(String domainId) { + if (this.innerProperties() == null) { + this.innerProperties = new HostnameBindingProperties(); + } + this.innerProperties().withDomainId(domainId); + return this; + } + + /** + * Get the azureResourceName property: Azure resource name. + * + * @return the azureResourceName value. + */ + public String azureResourceName() { + return this.innerProperties() == null ? null : this.innerProperties().azureResourceName(); + } + + /** + * Set the azureResourceName property: Azure resource name. + * + * @param azureResourceName the azureResourceName value to set. + * @return the HostnameBindingInner object itself. + */ + public HostnameBindingInner withAzureResourceName(String azureResourceName) { + if (this.innerProperties() == null) { + this.innerProperties = new HostnameBindingProperties(); + } + this.innerProperties().withAzureResourceName(azureResourceName); + return this; + } + + /** + * Get the azureResourceType property: Azure resource type. + * + * @return the azureResourceType value. + */ + public AzureResourceType azureResourceType() { + return this.innerProperties() == null ? null : this.innerProperties().azureResourceType(); + } + + /** + * Set the azureResourceType property: Azure resource type. + * + * @param azureResourceType the azureResourceType value to set. + * @return the HostnameBindingInner object itself. + */ + public HostnameBindingInner withAzureResourceType(AzureResourceType azureResourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new HostnameBindingProperties(); + } + this.innerProperties().withAzureResourceType(azureResourceType); + return this; + } + + /** + * Get the customHostnameDnsRecordType property: Custom DNS record type. + * + * @return the customHostnameDnsRecordType value. + */ + public CustomHostnameDnsRecordType customHostnameDnsRecordType() { + return this.innerProperties() == null ? null : this.innerProperties().customHostnameDnsRecordType(); + } + + /** + * Set the customHostnameDnsRecordType property: Custom DNS record type. + * + * @param customHostnameDnsRecordType the customHostnameDnsRecordType value to set. + * @return the HostnameBindingInner object itself. + */ + public HostnameBindingInner withCustomHostnameDnsRecordType( + CustomHostnameDnsRecordType customHostnameDnsRecordType) { + if (this.innerProperties() == null) { + this.innerProperties = new HostnameBindingProperties(); + } + this.innerProperties().withCustomHostnameDnsRecordType(customHostnameDnsRecordType); + return this; + } + + /** + * Get the hostnameType property: Hostname type. + * + * @return the hostnameType value. + */ + public HostnameType hostnameType() { + return this.innerProperties() == null ? null : this.innerProperties().hostnameType(); + } + + /** + * Set the hostnameType property: Hostname type. + * + * @param hostnameType the hostnameType value to set. + * @return the HostnameBindingInner object itself. + */ + public HostnameBindingInner withHostnameType(HostnameType hostnameType) { + if (this.innerProperties() == null) { + this.innerProperties = new HostnameBindingProperties(); + } + this.innerProperties().withHostnameType(hostnameType); + return this; + } + + /** + * Get the sslState property: SSL type. + * + * @return the sslState value. + */ + public SslState sslState() { + return this.innerProperties() == null ? null : this.innerProperties().sslState(); + } + + /** + * Set the sslState property: SSL type. + * + * @param sslState the sslState value to set. + * @return the HostnameBindingInner object itself. + */ + public HostnameBindingInner withSslState(SslState sslState) { + if (this.innerProperties() == null) { + this.innerProperties = new HostnameBindingProperties(); + } + this.innerProperties().withSslState(sslState); + return this; + } + + /** + * Get the thumbprint property: SSL certificate thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + } + + /** + * Set the thumbprint property: SSL certificate thumbprint. + * + * @param thumbprint the thumbprint value to set. + * @return the HostnameBindingInner object itself. + */ + public HostnameBindingInner withThumbprint(String thumbprint) { + if (this.innerProperties() == null) { + this.innerProperties = new HostnameBindingProperties(); + } + this.innerProperties().withThumbprint(thumbprint); + return this; + } + + /** + * Get the virtualIp property: Virtual IP address assigned to the hostname if IP based SSL is enabled. + * + * @return the virtualIp value. + */ + public String virtualIp() { + return this.innerProperties() == null ? null : this.innerProperties().virtualIp(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostnameBindingProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostnameBindingProperties.java new file mode 100644 index 0000000000000..2ab2135d0a370 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HostnameBindingProperties.java @@ -0,0 +1,252 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AzureResourceType; +import com.azure.resourcemanager.appservice.generated.models.CustomHostnameDnsRecordType; +import com.azure.resourcemanager.appservice.generated.models.HostnameType; +import com.azure.resourcemanager.appservice.generated.models.SslState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** HostNameBinding resource specific properties. */ +@Fluent +public final class HostnameBindingProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HostnameBindingProperties.class); + + /* + * App Service app name. + */ + @JsonProperty(value = "siteName") + private String siteName; + + /* + * Fully qualified ARM domain resource URI. + */ + @JsonProperty(value = "domainId") + private String domainId; + + /* + * Azure resource name. + */ + @JsonProperty(value = "azureResourceName") + private String azureResourceName; + + /* + * Azure resource type. + */ + @JsonProperty(value = "azureResourceType") + private AzureResourceType azureResourceType; + + /* + * Custom DNS record type. + */ + @JsonProperty(value = "customHostNameDnsRecordType") + private CustomHostnameDnsRecordType customHostnameDnsRecordType; + + /* + * Hostname type. + */ + @JsonProperty(value = "hostNameType") + private HostnameType hostnameType; + + /* + * SSL type + */ + @JsonProperty(value = "sslState") + private SslState sslState; + + /* + * SSL certificate thumbprint + */ + @JsonProperty(value = "thumbprint") + private String thumbprint; + + /* + * Virtual IP address assigned to the hostname if IP based SSL is enabled. + */ + @JsonProperty(value = "virtualIP", access = JsonProperty.Access.WRITE_ONLY) + private String virtualIp; + + /** + * Get the siteName property: App Service app name. + * + * @return the siteName value. + */ + public String siteName() { + return this.siteName; + } + + /** + * Set the siteName property: App Service app name. + * + * @param siteName the siteName value to set. + * @return the HostnameBindingProperties object itself. + */ + public HostnameBindingProperties withSiteName(String siteName) { + this.siteName = siteName; + return this; + } + + /** + * Get the domainId property: Fully qualified ARM domain resource URI. + * + * @return the domainId value. + */ + public String domainId() { + return this.domainId; + } + + /** + * Set the domainId property: Fully qualified ARM domain resource URI. + * + * @param domainId the domainId value to set. + * @return the HostnameBindingProperties object itself. + */ + public HostnameBindingProperties withDomainId(String domainId) { + this.domainId = domainId; + return this; + } + + /** + * Get the azureResourceName property: Azure resource name. + * + * @return the azureResourceName value. + */ + public String azureResourceName() { + return this.azureResourceName; + } + + /** + * Set the azureResourceName property: Azure resource name. + * + * @param azureResourceName the azureResourceName value to set. + * @return the HostnameBindingProperties object itself. + */ + public HostnameBindingProperties withAzureResourceName(String azureResourceName) { + this.azureResourceName = azureResourceName; + return this; + } + + /** + * Get the azureResourceType property: Azure resource type. + * + * @return the azureResourceType value. + */ + public AzureResourceType azureResourceType() { + return this.azureResourceType; + } + + /** + * Set the azureResourceType property: Azure resource type. + * + * @param azureResourceType the azureResourceType value to set. + * @return the HostnameBindingProperties object itself. + */ + public HostnameBindingProperties withAzureResourceType(AzureResourceType azureResourceType) { + this.azureResourceType = azureResourceType; + return this; + } + + /** + * Get the customHostnameDnsRecordType property: Custom DNS record type. + * + * @return the customHostnameDnsRecordType value. + */ + public CustomHostnameDnsRecordType customHostnameDnsRecordType() { + return this.customHostnameDnsRecordType; + } + + /** + * Set the customHostnameDnsRecordType property: Custom DNS record type. + * + * @param customHostnameDnsRecordType the customHostnameDnsRecordType value to set. + * @return the HostnameBindingProperties object itself. + */ + public HostnameBindingProperties withCustomHostnameDnsRecordType( + CustomHostnameDnsRecordType customHostnameDnsRecordType) { + this.customHostnameDnsRecordType = customHostnameDnsRecordType; + return this; + } + + /** + * Get the hostnameType property: Hostname type. + * + * @return the hostnameType value. + */ + public HostnameType hostnameType() { + return this.hostnameType; + } + + /** + * Set the hostnameType property: Hostname type. + * + * @param hostnameType the hostnameType value to set. + * @return the HostnameBindingProperties object itself. + */ + public HostnameBindingProperties withHostnameType(HostnameType hostnameType) { + this.hostnameType = hostnameType; + return this; + } + + /** + * Get the sslState property: SSL type. + * + * @return the sslState value. + */ + public SslState sslState() { + return this.sslState; + } + + /** + * Set the sslState property: SSL type. + * + * @param sslState the sslState value to set. + * @return the HostnameBindingProperties object itself. + */ + public HostnameBindingProperties withSslState(SslState sslState) { + this.sslState = sslState; + return this; + } + + /** + * Get the thumbprint property: SSL certificate thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the thumbprint property: SSL certificate thumbprint. + * + * @param thumbprint the thumbprint value to set. + * @return the HostnameBindingProperties object itself. + */ + public HostnameBindingProperties withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the virtualIp property: Virtual IP address assigned to the hostname if IP based SSL is enabled. + * + * @return the virtualIp value. + */ + public String virtualIp() { + return this.virtualIp; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionInner.java new file mode 100644 index 0000000000000..d46484e0948a4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionInner.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Hybrid Connection contract. This is used to configure a Hybrid Connection. */ +@Fluent +public final class HybridConnectionInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionInner.class); + + /* + * HybridConnection resource specific properties + */ + @JsonProperty(value = "properties") + private HybridConnectionProperties innerProperties; + + /** + * Get the innerProperties property: HybridConnection resource specific properties. + * + * @return the innerProperties value. + */ + private HybridConnectionProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public HybridConnectionInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the serviceBusNamespace property: The name of the Service Bus namespace. + * + * @return the serviceBusNamespace value. + */ + public String serviceBusNamespace() { + return this.innerProperties() == null ? null : this.innerProperties().serviceBusNamespace(); + } + + /** + * Set the serviceBusNamespace property: The name of the Service Bus namespace. + * + * @param serviceBusNamespace the serviceBusNamespace value to set. + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withServiceBusNamespace(String serviceBusNamespace) { + if (this.innerProperties() == null) { + this.innerProperties = new HybridConnectionProperties(); + } + this.innerProperties().withServiceBusNamespace(serviceBusNamespace); + return this; + } + + /** + * Get the relayName property: The name of the Service Bus relay. + * + * @return the relayName value. + */ + public String relayName() { + return this.innerProperties() == null ? null : this.innerProperties().relayName(); + } + + /** + * Set the relayName property: The name of the Service Bus relay. + * + * @param relayName the relayName value to set. + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withRelayName(String relayName) { + if (this.innerProperties() == null) { + this.innerProperties = new HybridConnectionProperties(); + } + this.innerProperties().withRelayName(relayName); + return this; + } + + /** + * Get the relayArmUri property: The ARM URI to the Service Bus relay. + * + * @return the relayArmUri value. + */ + public String relayArmUri() { + return this.innerProperties() == null ? null : this.innerProperties().relayArmUri(); + } + + /** + * Set the relayArmUri property: The ARM URI to the Service Bus relay. + * + * @param relayArmUri the relayArmUri value to set. + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withRelayArmUri(String relayArmUri) { + if (this.innerProperties() == null) { + this.innerProperties = new HybridConnectionProperties(); + } + this.innerProperties().withRelayArmUri(relayArmUri); + return this; + } + + /** + * Get the hostname property: The hostname of the endpoint. + * + * @return the hostname value. + */ + public String hostname() { + return this.innerProperties() == null ? null : this.innerProperties().hostname(); + } + + /** + * Set the hostname property: The hostname of the endpoint. + * + * @param hostname the hostname value to set. + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withHostname(String hostname) { + if (this.innerProperties() == null) { + this.innerProperties = new HybridConnectionProperties(); + } + this.innerProperties().withHostname(hostname); + return this; + } + + /** + * Get the port property: The port of the endpoint. + * + * @return the port value. + */ + public Integer port() { + return this.innerProperties() == null ? null : this.innerProperties().port(); + } + + /** + * Set the port property: The port of the endpoint. + * + * @param port the port value to set. + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withPort(Integer port) { + if (this.innerProperties() == null) { + this.innerProperties = new HybridConnectionProperties(); + } + this.innerProperties().withPort(port); + return this; + } + + /** + * Get the sendKeyName property: The name of the Service Bus key which has Send permissions. This is used to + * authenticate to Service Bus. + * + * @return the sendKeyName value. + */ + public String sendKeyName() { + return this.innerProperties() == null ? null : this.innerProperties().sendKeyName(); + } + + /** + * Set the sendKeyName property: The name of the Service Bus key which has Send permissions. This is used to + * authenticate to Service Bus. + * + * @param sendKeyName the sendKeyName value to set. + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withSendKeyName(String sendKeyName) { + if (this.innerProperties() == null) { + this.innerProperties = new HybridConnectionProperties(); + } + this.innerProperties().withSendKeyName(sendKeyName); + return this; + } + + /** + * Get the sendKeyValue property: The value of the Service Bus key. This is used to authenticate to Service Bus. In + * ARM this key will not be returned normally, use the POST /listKeys API instead. + * + * @return the sendKeyValue value. + */ + public String sendKeyValue() { + return this.innerProperties() == null ? null : this.innerProperties().sendKeyValue(); + } + + /** + * Set the sendKeyValue property: The value of the Service Bus key. This is used to authenticate to Service Bus. In + * ARM this key will not be returned normally, use the POST /listKeys API instead. + * + * @param sendKeyValue the sendKeyValue value to set. + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withSendKeyValue(String sendKeyValue) { + if (this.innerProperties() == null) { + this.innerProperties = new HybridConnectionProperties(); + } + this.innerProperties().withSendKeyValue(sendKeyValue); + return this; + } + + /** + * Get the serviceBusSuffix property: The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * + * @return the serviceBusSuffix value. + */ + public String serviceBusSuffix() { + return this.innerProperties() == null ? null : this.innerProperties().serviceBusSuffix(); + } + + /** + * Set the serviceBusSuffix property: The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * + * @param serviceBusSuffix the serviceBusSuffix value to set. + * @return the HybridConnectionInner object itself. + */ + public HybridConnectionInner withServiceBusSuffix(String serviceBusSuffix) { + if (this.innerProperties() == null) { + this.innerProperties = new HybridConnectionProperties(); + } + this.innerProperties().withServiceBusSuffix(serviceBusSuffix); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionKeyInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionKeyInner.java new file mode 100644 index 0000000000000..e7c564372a5bc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionKeyInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. */ +@Fluent +public final class HybridConnectionKeyInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionKeyInner.class); + + /* + * HybridConnectionKey resource specific properties + */ + @JsonProperty(value = "properties") + private HybridConnectionKeyProperties innerProperties; + + /** + * Get the innerProperties property: HybridConnectionKey resource specific properties. + * + * @return the innerProperties value. + */ + private HybridConnectionKeyProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public HybridConnectionKeyInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the sendKeyName property: The name of the send key. + * + * @return the sendKeyName value. + */ + public String sendKeyName() { + return this.innerProperties() == null ? null : this.innerProperties().sendKeyName(); + } + + /** + * Get the sendKeyValue property: The value of the send key. + * + * @return the sendKeyValue value. + */ + public String sendKeyValue() { + return this.innerProperties() == null ? null : this.innerProperties().sendKeyValue(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionKeyProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionKeyProperties.java new file mode 100644 index 0000000000000..e30aab9494e5f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionKeyProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** HybridConnectionKey resource specific properties. */ +@Immutable +public final class HybridConnectionKeyProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionKeyProperties.class); + + /* + * The name of the send key. + */ + @JsonProperty(value = "sendKeyName", access = JsonProperty.Access.WRITE_ONLY) + private String sendKeyName; + + /* + * The value of the send key. + */ + @JsonProperty(value = "sendKeyValue", access = JsonProperty.Access.WRITE_ONLY) + private String sendKeyValue; + + /** + * Get the sendKeyName property: The name of the send key. + * + * @return the sendKeyName value. + */ + public String sendKeyName() { + return this.sendKeyName; + } + + /** + * Get the sendKeyValue property: The value of the send key. + * + * @return the sendKeyValue value. + */ + public String sendKeyValue() { + return this.sendKeyValue; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionLimitsInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionLimitsInner.java new file mode 100644 index 0000000000000..740d88a3d8a8c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionLimitsInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Hybrid Connection limits contract. This is used to return the plan limits of Hybrid Connections. */ +@Fluent +public final class HybridConnectionLimitsInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionLimitsInner.class); + + /* + * HybridConnectionLimits resource specific properties + */ + @JsonProperty(value = "properties") + private HybridConnectionLimitsProperties innerProperties; + + /** + * Get the innerProperties property: HybridConnectionLimits resource specific properties. + * + * @return the innerProperties value. + */ + private HybridConnectionLimitsProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public HybridConnectionLimitsInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the current property: The current number of Hybrid Connections. + * + * @return the current value. + */ + public Integer current() { + return this.innerProperties() == null ? null : this.innerProperties().current(); + } + + /** + * Get the maximum property: The maximum number of Hybrid Connections allowed. + * + * @return the maximum value. + */ + public Integer maximum() { + return this.innerProperties() == null ? null : this.innerProperties().maximum(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionLimitsProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionLimitsProperties.java new file mode 100644 index 0000000000000..db77805b49f18 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionLimitsProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** HybridConnectionLimits resource specific properties. */ +@Immutable +public final class HybridConnectionLimitsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionLimitsProperties.class); + + /* + * The current number of Hybrid Connections. + */ + @JsonProperty(value = "current", access = JsonProperty.Access.WRITE_ONLY) + private Integer current; + + /* + * The maximum number of Hybrid Connections allowed. + */ + @JsonProperty(value = "maximum", access = JsonProperty.Access.WRITE_ONLY) + private Integer maximum; + + /** + * Get the current property: The current number of Hybrid Connections. + * + * @return the current value. + */ + public Integer current() { + return this.current; + } + + /** + * Get the maximum property: The maximum number of Hybrid Connections allowed. + * + * @return the maximum value. + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionProperties.java new file mode 100644 index 0000000000000..301813839e1b3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/HybridConnectionProperties.java @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** HybridConnection resource specific properties. */ +@Fluent +public final class HybridConnectionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionProperties.class); + + /* + * The name of the Service Bus namespace. + */ + @JsonProperty(value = "serviceBusNamespace") + private String serviceBusNamespace; + + /* + * The name of the Service Bus relay. + */ + @JsonProperty(value = "relayName") + private String relayName; + + /* + * The ARM URI to the Service Bus relay. + */ + @JsonProperty(value = "relayArmUri") + private String relayArmUri; + + /* + * The hostname of the endpoint. + */ + @JsonProperty(value = "hostname") + private String hostname; + + /* + * The port of the endpoint. + */ + @JsonProperty(value = "port") + private Integer port; + + /* + * The name of the Service Bus key which has Send permissions. This is used + * to authenticate to Service Bus. + */ + @JsonProperty(value = "sendKeyName") + private String sendKeyName; + + /* + * The value of the Service Bus key. This is used to authenticate to + * Service Bus. In ARM this key will not be returned + * normally, use the POST /listKeys API instead. + */ + @JsonProperty(value = "sendKeyValue") + private String sendKeyValue; + + /* + * The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net + */ + @JsonProperty(value = "serviceBusSuffix") + private String serviceBusSuffix; + + /** + * Get the serviceBusNamespace property: The name of the Service Bus namespace. + * + * @return the serviceBusNamespace value. + */ + public String serviceBusNamespace() { + return this.serviceBusNamespace; + } + + /** + * Set the serviceBusNamespace property: The name of the Service Bus namespace. + * + * @param serviceBusNamespace the serviceBusNamespace value to set. + * @return the HybridConnectionProperties object itself. + */ + public HybridConnectionProperties withServiceBusNamespace(String serviceBusNamespace) { + this.serviceBusNamespace = serviceBusNamespace; + return this; + } + + /** + * Get the relayName property: The name of the Service Bus relay. + * + * @return the relayName value. + */ + public String relayName() { + return this.relayName; + } + + /** + * Set the relayName property: The name of the Service Bus relay. + * + * @param relayName the relayName value to set. + * @return the HybridConnectionProperties object itself. + */ + public HybridConnectionProperties withRelayName(String relayName) { + this.relayName = relayName; + return this; + } + + /** + * Get the relayArmUri property: The ARM URI to the Service Bus relay. + * + * @return the relayArmUri value. + */ + public String relayArmUri() { + return this.relayArmUri; + } + + /** + * Set the relayArmUri property: The ARM URI to the Service Bus relay. + * + * @param relayArmUri the relayArmUri value to set. + * @return the HybridConnectionProperties object itself. + */ + public HybridConnectionProperties withRelayArmUri(String relayArmUri) { + this.relayArmUri = relayArmUri; + return this; + } + + /** + * Get the hostname property: The hostname of the endpoint. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: The hostname of the endpoint. + * + * @param hostname the hostname value to set. + * @return the HybridConnectionProperties object itself. + */ + public HybridConnectionProperties withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the port property: The port of the endpoint. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: The port of the endpoint. + * + * @param port the port value to set. + * @return the HybridConnectionProperties object itself. + */ + public HybridConnectionProperties withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the sendKeyName property: The name of the Service Bus key which has Send permissions. This is used to + * authenticate to Service Bus. + * + * @return the sendKeyName value. + */ + public String sendKeyName() { + return this.sendKeyName; + } + + /** + * Set the sendKeyName property: The name of the Service Bus key which has Send permissions. This is used to + * authenticate to Service Bus. + * + * @param sendKeyName the sendKeyName value to set. + * @return the HybridConnectionProperties object itself. + */ + public HybridConnectionProperties withSendKeyName(String sendKeyName) { + this.sendKeyName = sendKeyName; + return this; + } + + /** + * Get the sendKeyValue property: The value of the Service Bus key. This is used to authenticate to Service Bus. In + * ARM this key will not be returned normally, use the POST /listKeys API instead. + * + * @return the sendKeyValue value. + */ + public String sendKeyValue() { + return this.sendKeyValue; + } + + /** + * Set the sendKeyValue property: The value of the Service Bus key. This is used to authenticate to Service Bus. In + * ARM this key will not be returned normally, use the POST /listKeys API instead. + * + * @param sendKeyValue the sendKeyValue value to set. + * @return the HybridConnectionProperties object itself. + */ + public HybridConnectionProperties withSendKeyValue(String sendKeyValue) { + this.sendKeyValue = sendKeyValue; + return this; + } + + /** + * Get the serviceBusSuffix property: The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * + * @return the serviceBusSuffix value. + */ + public String serviceBusSuffix() { + return this.serviceBusSuffix; + } + + /** + * Set the serviceBusSuffix property: The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * + * @param serviceBusSuffix the serviceBusSuffix value to set. + * @return the HybridConnectionProperties object itself. + */ + public HybridConnectionProperties withServiceBusSuffix(String serviceBusSuffix) { + this.serviceBusSuffix = serviceBusSuffix; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/IdentifierInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/IdentifierInner.java new file mode 100644 index 0000000000000..55cce412053a8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/IdentifierInner.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A domain specific resource identifier. */ +@Fluent +public final class IdentifierInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentifierInner.class); + + /* + * Identifier resource specific properties + */ + @JsonProperty(value = "properties") + private IdentifierProperties innerProperties; + + /** + * Get the innerProperties property: Identifier resource specific properties. + * + * @return the innerProperties value. + */ + private IdentifierProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public IdentifierInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the value property: String representation of the identity. + * + * @return the value value. + */ + public String value() { + return this.innerProperties() == null ? null : this.innerProperties().value(); + } + + /** + * Set the value property: String representation of the identity. + * + * @param value the value value to set. + * @return the IdentifierInner object itself. + */ + public IdentifierInner withValue(String value) { + if (this.innerProperties() == null) { + this.innerProperties = new IdentifierProperties(); + } + this.innerProperties().withValue(value); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/IdentifierProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/IdentifierProperties.java new file mode 100644 index 0000000000000..f6e20a33b0a8e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/IdentifierProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Identifier resource specific properties. */ +@Fluent +public final class IdentifierProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentifierProperties.class); + + /* + * String representation of the identity. + */ + @JsonProperty(value = "id") + private String value; + + /** + * Get the value property: String representation of the identity. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: String representation of the identity. + * + * @param value the value value to set. + * @return the IdentifierProperties object itself. + */ + public IdentifierProperties 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/InboundEnvironmentEndpointInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/InboundEnvironmentEndpointInner.java new file mode 100644 index 0000000000000..833326432ebd3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/InboundEnvironmentEndpointInner.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The IP Addresses and Ports that require inbound network access to and within the subnet of the App Service + * Environment. + */ +@Fluent +public final class InboundEnvironmentEndpointInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(InboundEnvironmentEndpointInner.class); + + /* + * Short text describing the purpose of the network traffic. + */ + @JsonProperty(value = "description") + private String description; + + /* + * The IP addresses that network traffic will originate from in cidr + * notation. + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /* + * The ports that network traffic will arrive to the App Service + * Environment at. + */ + @JsonProperty(value = "ports") + private List ports; + + /** + * Get the description property: Short text describing the purpose of the network traffic. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Short text describing the purpose of the network traffic. + * + * @param description the description value to set. + * @return the InboundEnvironmentEndpointInner object itself. + */ + public InboundEnvironmentEndpointInner withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the endpoints property: The IP addresses that network traffic will originate from in cidr notation. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The IP addresses that network traffic will originate from in cidr notation. + * + * @param endpoints the endpoints value to set. + * @return the InboundEnvironmentEndpointInner object itself. + */ + public InboundEnvironmentEndpointInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Get the ports property: The ports that network traffic will arrive to the App Service Environment at. + * + * @return the ports value. + */ + public List ports() { + return this.ports; + } + + /** + * Set the ports property: The ports that network traffic will arrive to the App Service Environment at. + * + * @param ports the ports value to set. + * @return the InboundEnvironmentEndpointInner object itself. + */ + public InboundEnvironmentEndpointInner withPorts(List ports) { + this.ports = ports; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KeyInfoInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KeyInfoInner.java new file mode 100644 index 0000000000000..8d075cf5a100c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KeyInfoInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Function key info. */ +@Fluent +public final class KeyInfoInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyInfoInner.class); + + /* + * Key name + */ + @JsonProperty(value = "name") + private String name; + + /* + * Key value + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name property: Key name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Key name. + * + * @param name the name value to set. + * @return the KeyInfoInner object itself. + */ + public KeyInfoInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Key value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Key value. + * + * @param value the value value to set. + * @return the KeyInfoInner object itself. + */ + public KeyInfoInner 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentInner.java new file mode 100644 index 0000000000000..55869ef7337d1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentInner.java @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AppLogsConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ArcConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppsConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ExtendedLocation; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** A Kubernetes cluster specialized for web workloads by Azure App Service. */ +@Fluent +public final class KubeEnvironmentInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubeEnvironmentInner.class); + + /* + * KubeEnvironment resource specific properties + */ + @JsonProperty(value = "properties") + private KubeEnvironmentProperties innerProperties; + + /* + * Extended Location. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: KubeEnvironment resource specific properties. + * + * @return the innerProperties value. + */ + private KubeEnvironmentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the extendedLocation property: Extended Location. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: Extended Location. + * + * @param extendedLocation the extendedLocation value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public KubeEnvironmentInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public KubeEnvironmentInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Kubernetes Environment. + * + * @return the provisioningState value. + */ + public KubeEnvironmentProvisioningState 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 internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @return the internalLoadBalancerEnabled value. + */ + public Boolean internalLoadBalancerEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().internalLoadBalancerEnabled(); + } + + /** + * Set the internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @param internalLoadBalancerEnabled the internalLoadBalancerEnabled value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withInternalLoadBalancerEnabled(Boolean internalLoadBalancerEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentProperties(); + } + this.innerProperties().withInternalLoadBalancerEnabled(internalLoadBalancerEnabled); + return this; + } + + /** + * 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 KubeEnvironment. + * + * @return the staticIp value. + */ + public String staticIp() { + return this.innerProperties() == null ? null : this.innerProperties().staticIp(); + } + + /** + * Set the staticIp property: Static IP of the KubeEnvironment. + * + * @param staticIp the staticIp value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withStaticIp(String staticIp) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentProperties(); + } + this.innerProperties().withStaticIp(staticIp); + return this; + } + + /** + * Get the environmentType property: Type of Kubernetes Environment. Only supported for Container App Environments + * with value as Managed. + * + * @return the environmentType value. + */ + public String environmentType() { + return this.innerProperties() == null ? null : this.innerProperties().environmentType(); + } + + /** + * Set the environmentType property: Type of Kubernetes Environment. Only supported for Container App Environments + * with value as Managed. + * + * @param environmentType the environmentType value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withEnvironmentType(String environmentType) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentProperties(); + } + this.innerProperties().withEnvironmentType(environmentType); + return this; + } + + /** + * Get the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @return the arcConfiguration value. + */ + public ArcConfiguration arcConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().arcConfiguration(); + } + + /** + * Set the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @param arcConfiguration the arcConfiguration value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withArcConfiguration(ArcConfiguration arcConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentProperties(); + } + this.innerProperties().withArcConfiguration(arcConfiguration); + return this; + } + + /** + * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * + * @return the appLogsConfiguration value. + */ + public AppLogsConfiguration appLogsConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().appLogsConfiguration(); + } + + /** + * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * + * @param appLogsConfiguration the appLogsConfiguration value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentProperties(); + } + this.innerProperties().withAppLogsConfiguration(appLogsConfiguration); + return this; + } + + /** + * Get the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @return the containerAppsConfiguration value. + */ + public ContainerAppsConfiguration containerAppsConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().containerAppsConfiguration(); + } + + /** + * Set the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @param containerAppsConfiguration the containerAppsConfiguration value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withContainerAppsConfiguration(ContainerAppsConfiguration containerAppsConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentProperties(); + } + this.innerProperties().withContainerAppsConfiguration(containerAppsConfiguration); + return this; + } + + /** + * Get the aksResourceId property: The aksResourceID property. + * + * @return the aksResourceId value. + */ + public String aksResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().aksResourceId(); + } + + /** + * Set the aksResourceId property: The aksResourceID property. + * + * @param aksResourceId the aksResourceId value to set. + * @return the KubeEnvironmentInner object itself. + */ + public KubeEnvironmentInner withAksResourceId(String aksResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentProperties(); + } + this.innerProperties().withAksResourceId(aksResourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (extendedLocation() != null) { + extendedLocation().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentPatchResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentPatchResourceProperties.java new file mode 100644 index 0000000000000..78717a9a46b37 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentPatchResourceProperties.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AppLogsConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ArcConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppsConfiguration; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** KubeEnvironmentPatchResource resource specific properties. */ +@Fluent +public final class KubeEnvironmentPatchResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubeEnvironmentPatchResourceProperties.class); + + /* + * Provisioning state of the Kubernetes Environment. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private KubeEnvironmentProvisioningState provisioningState; + + /* + * Any errors that occurred during deployment or deployment validation + */ + @JsonProperty(value = "deploymentErrors", access = JsonProperty.Access.WRITE_ONLY) + private String deploymentErrors; + + /* + * Only visible within Vnet/Subnet + */ + @JsonProperty(value = "internalLoadBalancerEnabled") + private Boolean internalLoadBalancerEnabled; + + /* + * Default Domain Name for the cluster + */ + @JsonProperty(value = "defaultDomain", access = JsonProperty.Access.WRITE_ONLY) + private String defaultDomain; + + /* + * Static IP of the KubeEnvironment + */ + @JsonProperty(value = "staticIp") + private String staticIp; + + /* + * Cluster configuration which determines the ARC cluster + * components types. Eg: Choosing between BuildService kind, + * FrontEnd Service ArtifactsStorageType etc. + */ + @JsonProperty(value = "arcConfiguration") + private ArcConfiguration arcConfiguration; + + /* + * Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported + */ + @JsonProperty(value = "appLogsConfiguration") + private AppLogsConfiguration appLogsConfiguration; + + /* + * Cluster configuration for Container Apps Environments to configure Dapr + * Instrumentation Key and VNET Configuration + */ + @JsonProperty(value = "containerAppsConfiguration") + private ContainerAppsConfiguration containerAppsConfiguration; + + /* + * The aksResourceID property. + */ + @JsonProperty(value = "aksResourceID") + private String aksResourceId; + + /** + * Get the provisioningState property: Provisioning state of the Kubernetes Environment. + * + * @return the provisioningState value. + */ + public KubeEnvironmentProvisioningState 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 internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @return the internalLoadBalancerEnabled value. + */ + public Boolean internalLoadBalancerEnabled() { + return this.internalLoadBalancerEnabled; + } + + /** + * Set the internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @param internalLoadBalancerEnabled the internalLoadBalancerEnabled value to set. + * @return the KubeEnvironmentPatchResourceProperties object itself. + */ + public KubeEnvironmentPatchResourceProperties withInternalLoadBalancerEnabled(Boolean internalLoadBalancerEnabled) { + this.internalLoadBalancerEnabled = internalLoadBalancerEnabled; + return this; + } + + /** + * 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 KubeEnvironment. + * + * @return the staticIp value. + */ + public String staticIp() { + return this.staticIp; + } + + /** + * Set the staticIp property: Static IP of the KubeEnvironment. + * + * @param staticIp the staticIp value to set. + * @return the KubeEnvironmentPatchResourceProperties object itself. + */ + public KubeEnvironmentPatchResourceProperties withStaticIp(String staticIp) { + this.staticIp = staticIp; + return this; + } + + /** + * Get the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @return the arcConfiguration value. + */ + public ArcConfiguration arcConfiguration() { + return this.arcConfiguration; + } + + /** + * Set the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @param arcConfiguration the arcConfiguration value to set. + * @return the KubeEnvironmentPatchResourceProperties object itself. + */ + public KubeEnvironmentPatchResourceProperties withArcConfiguration(ArcConfiguration arcConfiguration) { + this.arcConfiguration = arcConfiguration; + return this; + } + + /** + * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * + * @return the appLogsConfiguration value. + */ + public AppLogsConfiguration appLogsConfiguration() { + return this.appLogsConfiguration; + } + + /** + * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * + * @param appLogsConfiguration the appLogsConfiguration value to set. + * @return the KubeEnvironmentPatchResourceProperties object itself. + */ + public KubeEnvironmentPatchResourceProperties withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { + this.appLogsConfiguration = appLogsConfiguration; + return this; + } + + /** + * Get the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @return the containerAppsConfiguration value. + */ + public ContainerAppsConfiguration containerAppsConfiguration() { + return this.containerAppsConfiguration; + } + + /** + * Set the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @param containerAppsConfiguration the containerAppsConfiguration value to set. + * @return the KubeEnvironmentPatchResourceProperties object itself. + */ + public KubeEnvironmentPatchResourceProperties withContainerAppsConfiguration( + ContainerAppsConfiguration containerAppsConfiguration) { + this.containerAppsConfiguration = containerAppsConfiguration; + return this; + } + + /** + * Get the aksResourceId property: The aksResourceID property. + * + * @return the aksResourceId value. + */ + public String aksResourceId() { + return this.aksResourceId; + } + + /** + * Set the aksResourceId property: The aksResourceID property. + * + * @param aksResourceId the aksResourceId value to set. + * @return the KubeEnvironmentPatchResourceProperties object itself. + */ + public KubeEnvironmentPatchResourceProperties withAksResourceId(String aksResourceId) { + this.aksResourceId = aksResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (arcConfiguration() != null) { + arcConfiguration().validate(); + } + if (appLogsConfiguration() != null) { + appLogsConfiguration().validate(); + } + if (containerAppsConfiguration() != null) { + containerAppsConfiguration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentProperties.java new file mode 100644 index 0000000000000..ba0f2c1263828 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/KubeEnvironmentProperties.java @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AppLogsConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ArcConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppsConfiguration; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** KubeEnvironment resource specific properties. */ +@Fluent +public final class KubeEnvironmentProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubeEnvironmentProperties.class); + + /* + * Provisioning state of the Kubernetes Environment. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private KubeEnvironmentProvisioningState provisioningState; + + /* + * Any errors that occurred during deployment or deployment validation + */ + @JsonProperty(value = "deploymentErrors", access = JsonProperty.Access.WRITE_ONLY) + private String deploymentErrors; + + /* + * Only visible within Vnet/Subnet + */ + @JsonProperty(value = "internalLoadBalancerEnabled") + private Boolean internalLoadBalancerEnabled; + + /* + * Default Domain Name for the cluster + */ + @JsonProperty(value = "defaultDomain", access = JsonProperty.Access.WRITE_ONLY) + private String defaultDomain; + + /* + * Static IP of the KubeEnvironment + */ + @JsonProperty(value = "staticIp") + private String staticIp; + + /* + * Type of Kubernetes Environment. Only supported for Container App + * Environments with value as Managed + */ + @JsonProperty(value = "environmentType") + private String environmentType; + + /* + * Cluster configuration which determines the ARC cluster + * components types. Eg: Choosing between BuildService kind, + * FrontEnd Service ArtifactsStorageType etc. + */ + @JsonProperty(value = "arcConfiguration") + private ArcConfiguration arcConfiguration; + + /* + * Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported + */ + @JsonProperty(value = "appLogsConfiguration") + private AppLogsConfiguration appLogsConfiguration; + + /* + * Cluster configuration for Container Apps Environments to configure Dapr + * Instrumentation Key and VNET Configuration + */ + @JsonProperty(value = "containerAppsConfiguration") + private ContainerAppsConfiguration containerAppsConfiguration; + + /* + * The aksResourceID property. + */ + @JsonProperty(value = "aksResourceID") + private String aksResourceId; + + /** + * Get the provisioningState property: Provisioning state of the Kubernetes Environment. + * + * @return the provisioningState value. + */ + public KubeEnvironmentProvisioningState 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 internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @return the internalLoadBalancerEnabled value. + */ + public Boolean internalLoadBalancerEnabled() { + return this.internalLoadBalancerEnabled; + } + + /** + * Set the internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @param internalLoadBalancerEnabled the internalLoadBalancerEnabled value to set. + * @return the KubeEnvironmentProperties object itself. + */ + public KubeEnvironmentProperties withInternalLoadBalancerEnabled(Boolean internalLoadBalancerEnabled) { + this.internalLoadBalancerEnabled = internalLoadBalancerEnabled; + return this; + } + + /** + * 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 KubeEnvironment. + * + * @return the staticIp value. + */ + public String staticIp() { + return this.staticIp; + } + + /** + * Set the staticIp property: Static IP of the KubeEnvironment. + * + * @param staticIp the staticIp value to set. + * @return the KubeEnvironmentProperties object itself. + */ + public KubeEnvironmentProperties withStaticIp(String staticIp) { + this.staticIp = staticIp; + return this; + } + + /** + * Get the environmentType property: Type of Kubernetes Environment. Only supported for Container App Environments + * with value as Managed. + * + * @return the environmentType value. + */ + public String environmentType() { + return this.environmentType; + } + + /** + * Set the environmentType property: Type of Kubernetes Environment. Only supported for Container App Environments + * with value as Managed. + * + * @param environmentType the environmentType value to set. + * @return the KubeEnvironmentProperties object itself. + */ + public KubeEnvironmentProperties withEnvironmentType(String environmentType) { + this.environmentType = environmentType; + return this; + } + + /** + * Get the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @return the arcConfiguration value. + */ + public ArcConfiguration arcConfiguration() { + return this.arcConfiguration; + } + + /** + * Set the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @param arcConfiguration the arcConfiguration value to set. + * @return the KubeEnvironmentProperties object itself. + */ + public KubeEnvironmentProperties withArcConfiguration(ArcConfiguration arcConfiguration) { + this.arcConfiguration = arcConfiguration; + return this; + } + + /** + * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * + * @return the appLogsConfiguration value. + */ + public AppLogsConfiguration appLogsConfiguration() { + return this.appLogsConfiguration; + } + + /** + * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * + * @param appLogsConfiguration the appLogsConfiguration value to set. + * @return the KubeEnvironmentProperties object itself. + */ + public KubeEnvironmentProperties withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { + this.appLogsConfiguration = appLogsConfiguration; + return this; + } + + /** + * Get the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @return the containerAppsConfiguration value. + */ + public ContainerAppsConfiguration containerAppsConfiguration() { + return this.containerAppsConfiguration; + } + + /** + * Set the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @param containerAppsConfiguration the containerAppsConfiguration value to set. + * @return the KubeEnvironmentProperties object itself. + */ + public KubeEnvironmentProperties withContainerAppsConfiguration( + ContainerAppsConfiguration containerAppsConfiguration) { + this.containerAppsConfiguration = containerAppsConfiguration; + return this; + } + + /** + * Get the aksResourceId property: The aksResourceID property. + * + * @return the aksResourceId value. + */ + public String aksResourceId() { + return this.aksResourceId; + } + + /** + * Set the aksResourceId property: The aksResourceID property. + * + * @param aksResourceId the aksResourceId value to set. + * @return the KubeEnvironmentProperties object itself. + */ + public KubeEnvironmentProperties withAksResourceId(String aksResourceId) { + this.aksResourceId = aksResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (arcConfiguration() != null) { + arcConfiguration().validate(); + } + if (appLogsConfiguration() != null) { + appLogsConfiguration().validate(); + } + if (containerAppsConfiguration() != null) { + containerAppsConfiguration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployLogInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployLogInner.java new file mode 100644 index 0000000000000..d455f15bfbca6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployLogInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.MSDeployLogEntry; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** MSDeploy log. */ +@Fluent +public final class MSDeployLogInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MSDeployLogInner.class); + + /* + * MSDeployLog resource specific properties + */ + @JsonProperty(value = "properties") + private MSDeployLogProperties innerProperties; + + /** + * Get the innerProperties property: MSDeployLog resource specific properties. + * + * @return the innerProperties value. + */ + private MSDeployLogProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public MSDeployLogInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the entries property: List of log entry messages. + * + * @return the entries value. + */ + public List entries() { + return this.innerProperties() == null ? null : this.innerProperties().entries(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployLogProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployLogProperties.java new file mode 100644 index 0000000000000..632546442aac9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployLogProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.MSDeployLogEntry; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** MSDeployLog resource specific properties. */ +@Immutable +public final class MSDeployLogProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MSDeployLogProperties.class); + + /* + * List of log entry messages + */ + @JsonProperty(value = "entries", access = JsonProperty.Access.WRITE_ONLY) + private List entries; + + /** + * Get the entries property: List of log entry messages. + * + * @return the entries value. + */ + public List entries() { + return this.entries; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (entries() != null) { + entries().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployProperties.java new file mode 100644 index 0000000000000..4da99ea91e2ba --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployProperties.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.MSDeployCore; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Core resource properties. */ +@Fluent +public final class MSDeployProperties extends MSDeployCore { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MSDeployProperties.class); + + /* + * List of Add-On packages. Add-On packages implicitly enable the Do Not + * Delete MSDeploy rule. + */ + @JsonProperty(value = "addOnPackages") + private List addOnPackages; + + /** + * Get the addOnPackages property: List of Add-On packages. Add-On packages implicitly enable the Do Not Delete + * MSDeploy rule. + * + * @return the addOnPackages value. + */ + public List addOnPackages() { + return this.addOnPackages; + } + + /** + * Set the addOnPackages property: List of Add-On packages. Add-On packages implicitly enable the Do Not Delete + * MSDeploy rule. + * + * @param addOnPackages the addOnPackages value to set. + * @return the MSDeployProperties object itself. + */ + public MSDeployProperties withAddOnPackages(List addOnPackages) { + this.addOnPackages = addOnPackages; + return this; + } + + /** {@inheritDoc} */ + @Override + public MSDeployProperties withPackageUri(String packageUri) { + super.withPackageUri(packageUri); + return this; + } + + /** {@inheritDoc} */ + @Override + public MSDeployProperties withConnectionString(String connectionString) { + super.withConnectionString(connectionString); + return this; + } + + /** {@inheritDoc} */ + @Override + public MSDeployProperties withDbType(String dbType) { + super.withDbType(dbType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MSDeployProperties withSetParametersXmlFileUri(String setParametersXmlFileUri) { + super.withSetParametersXmlFileUri(setParametersXmlFileUri); + return this; + } + + /** {@inheritDoc} */ + @Override + public MSDeployProperties withSetParameters(Map setParameters) { + super.withSetParameters(setParameters); + return this; + } + + /** {@inheritDoc} */ + @Override + public MSDeployProperties withSkipAppData(Boolean skipAppData) { + super.withSkipAppData(skipAppData); + return this; + } + + /** {@inheritDoc} */ + @Override + public MSDeployProperties withAppOffline(Boolean appOffline) { + super.withAppOffline(appOffline); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (addOnPackages() != null) { + addOnPackages().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployStatusInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployStatusInner.java new file mode 100644 index 0000000000000..9447b9a649b5f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployStatusInner.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.MSDeployProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** MSDeploy ARM response. */ +@Fluent +public final class MSDeployStatusInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MSDeployStatusInner.class); + + /* + * MSDeployStatus resource specific properties + */ + @JsonProperty(value = "properties") + private MSDeployStatusProperties innerProperties; + + /** + * Get the innerProperties property: MSDeployStatus resource specific properties. + * + * @return the innerProperties value. + */ + private MSDeployStatusProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public MSDeployStatusInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the deployer property: Username of deployer. + * + * @return the deployer value. + */ + public String deployer() { + return this.innerProperties() == null ? null : this.innerProperties().deployer(); + } + + /** + * Get the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + public MSDeployProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the startTime property: Start time of deploy operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.innerProperties() == null ? null : this.innerProperties().startTime(); + } + + /** + * Get the endTime property: End time of deploy operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.innerProperties() == null ? null : this.innerProperties().endTime(); + } + + /** + * Get the complete property: Whether the deployment operation has completed. + * + * @return the complete value. + */ + public Boolean complete() { + return this.innerProperties() == null ? null : this.innerProperties().complete(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployStatusProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployStatusProperties.java new file mode 100644 index 0000000000000..cf08642f7ad0e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MSDeployStatusProperties.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.MSDeployProvisioningState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** MSDeployStatus resource specific properties. */ +@Immutable +public final class MSDeployStatusProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MSDeployStatusProperties.class); + + /* + * Username of deployer + */ + @JsonProperty(value = "deployer", access = JsonProperty.Access.WRITE_ONLY) + private String deployer; + + /* + * Provisioning state + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private MSDeployProvisioningState provisioningState; + + /* + * Start time of deploy operation + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * End time of deploy operation + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endTime; + + /* + * Whether the deployment operation has completed + */ + @JsonProperty(value = "complete", access = JsonProperty.Access.WRITE_ONLY) + private Boolean complete; + + /** + * Get the deployer property: Username of deployer. + * + * @return the deployer value. + */ + public String deployer() { + return this.deployer; + } + + /** + * Get the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + public MSDeployProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the startTime property: Start time of deploy operation. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime property: End time of deploy operation. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Get the complete property: Whether the deployment operation has completed. + * + * @return the complete value. + */ + public Boolean complete() { + return this.complete; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlRequestProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlRequestProperties.java new file mode 100644 index 0000000000000..20d1919af22fe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlRequestProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.MySqlMigrationType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** MigrateMySqlRequest resource specific properties. */ +@Fluent +public final class MigrateMySqlRequestProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMySqlRequestProperties.class); + + /* + * Connection string to the remote MySQL database. + */ + @JsonProperty(value = "connectionString", required = true) + private String connectionString; + + /* + * The type of migration operation to be done + */ + @JsonProperty(value = "migrationType", required = true) + private MySqlMigrationType migrationType; + + /** + * Get the connectionString property: Connection string to the remote MySQL database. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString property: Connection string to the remote MySQL database. + * + * @param connectionString the connectionString value to set. + * @return the MigrateMySqlRequestProperties object itself. + */ + public MigrateMySqlRequestProperties withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get the migrationType property: The type of migration operation to be done. + * + * @return the migrationType value. + */ + public MySqlMigrationType migrationType() { + return this.migrationType; + } + + /** + * Set the migrationType property: The type of migration operation to be done. + * + * @param migrationType the migrationType value to set. + * @return the MigrateMySqlRequestProperties object itself. + */ + public MigrateMySqlRequestProperties withMigrationType(MySqlMigrationType migrationType) { + this.migrationType = migrationType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (connectionString() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property connectionString in model MigrateMySqlRequestProperties")); + } + if (migrationType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property migrationType in model MigrateMySqlRequestProperties")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlStatusInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlStatusInner.java new file mode 100644 index 0000000000000..df7b0acb04688 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlStatusInner.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.OperationStatus; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** MySQL migration status. */ +@Fluent +public final class MigrateMySqlStatusInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMySqlStatusInner.class); + + /* + * MigrateMySqlStatus resource specific properties + */ + @JsonProperty(value = "properties") + private MigrateMySqlStatusProperties innerProperties; + + /** + * Get the innerProperties property: MigrateMySqlStatus resource specific properties. + * + * @return the innerProperties value. + */ + private MigrateMySqlStatusProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public MigrateMySqlStatusInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the migrationOperationStatus property: Status of the migration task. + * + * @return the migrationOperationStatus value. + */ + public OperationStatus migrationOperationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().migrationOperationStatus(); + } + + /** + * Get the operationId property: Operation ID for the migration task. + * + * @return the operationId value. + */ + public String operationId() { + return this.innerProperties() == null ? null : this.innerProperties().operationId(); + } + + /** + * Get the localMySqlEnabled property: True if the web app has in app MySql enabled. + * + * @return the localMySqlEnabled value. + */ + public Boolean localMySqlEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().localMySqlEnabled(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlStatusProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlStatusProperties.java new file mode 100644 index 0000000000000..5bfa261833b00 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/MigrateMySqlStatusProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.OperationStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** MigrateMySqlStatus resource specific properties. */ +@Immutable +public final class MigrateMySqlStatusProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMySqlStatusProperties.class); + + /* + * Status of the migration task. + */ + @JsonProperty(value = "migrationOperationStatus", access = JsonProperty.Access.WRITE_ONLY) + private OperationStatus migrationOperationStatus; + + /* + * Operation ID for the migration task. + */ + @JsonProperty(value = "operationId", access = JsonProperty.Access.WRITE_ONLY) + private String operationId; + + /* + * True if the web app has in app MySql enabled + */ + @JsonProperty(value = "localMySqlEnabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean localMySqlEnabled; + + /** + * Get the migrationOperationStatus property: Status of the migration task. + * + * @return the migrationOperationStatus value. + */ + public OperationStatus migrationOperationStatus() { + return this.migrationOperationStatus; + } + + /** + * Get the operationId property: Operation ID for the migration task. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Get the localMySqlEnabled property: True if the web app has in app MySql enabled. + * + * @return the localMySqlEnabled value. + */ + public Boolean localMySqlEnabled() { + return this.localMySqlEnabled; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NameIdentifierInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NameIdentifierInner.java new file mode 100644 index 0000000000000..767d494bc99df --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NameIdentifierInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Identifies an object. */ +@Fluent +public final class NameIdentifierInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NameIdentifierInner.class); + + /* + * Name of the object. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get the name property: Name of the object. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the object. + * + * @param name the name value to set. + * @return the NameIdentifierInner object itself. + */ + public NameIdentifierInner withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkFeaturesInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkFeaturesInner.java new file mode 100644 index 0000000000000..1dca56746a851 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkFeaturesInner.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Full view of network features for an app (presently VNET integration and Hybrid Connections). */ +@Fluent +public final class NetworkFeaturesInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFeaturesInner.class); + + /* + * NetworkFeatures resource specific properties + */ + @JsonProperty(value = "properties") + private NetworkFeaturesProperties innerProperties; + + /** + * Get the innerProperties property: NetworkFeatures resource specific properties. + * + * @return the innerProperties value. + */ + private NetworkFeaturesProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public NetworkFeaturesInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the virtualNetworkName property: The Virtual Network name. + * + * @return the virtualNetworkName value. + */ + public String virtualNetworkName() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkName(); + } + + /** + * Get the virtualNetworkConnection property: The Virtual Network summary view. + * + * @return the virtualNetworkConnection value. + */ + public VnetInfo virtualNetworkConnection() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkConnection(); + } + + /** + * Get the hybridConnections property: The Hybrid Connections summary view. + * + * @return the hybridConnections value. + */ + public List hybridConnections() { + return this.innerProperties() == null ? null : this.innerProperties().hybridConnections(); + } + + /** + * Get the hybridConnectionsV2 property: The Hybrid Connection V2 (Service Bus) view. + * + * @return the hybridConnectionsV2 value. + */ + public List hybridConnectionsV2() { + return this.innerProperties() == null ? null : this.innerProperties().hybridConnectionsV2(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkFeaturesProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkFeaturesProperties.java new file mode 100644 index 0000000000000..ff5f09307e7e7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkFeaturesProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** NetworkFeatures resource specific properties. */ +@Immutable +public final class NetworkFeaturesProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkFeaturesProperties.class); + + /* + * The Virtual Network name. + */ + @JsonProperty(value = "virtualNetworkName", access = JsonProperty.Access.WRITE_ONLY) + private String virtualNetworkName; + + /* + * The Virtual Network summary view. + */ + @JsonProperty(value = "virtualNetworkConnection", access = JsonProperty.Access.WRITE_ONLY) + private VnetInfo virtualNetworkConnection; + + /* + * The Hybrid Connections summary view. + */ + @JsonProperty(value = "hybridConnections", access = JsonProperty.Access.WRITE_ONLY) + private List hybridConnections; + + /* + * The Hybrid Connection V2 (Service Bus) view. + */ + @JsonProperty(value = "hybridConnectionsV2", access = JsonProperty.Access.WRITE_ONLY) + private List hybridConnectionsV2; + + /** + * Get the virtualNetworkName property: The Virtual Network name. + * + * @return the virtualNetworkName value. + */ + public String virtualNetworkName() { + return this.virtualNetworkName; + } + + /** + * Get the virtualNetworkConnection property: The Virtual Network summary view. + * + * @return the virtualNetworkConnection value. + */ + public VnetInfo virtualNetworkConnection() { + return this.virtualNetworkConnection; + } + + /** + * Get the hybridConnections property: The Hybrid Connections summary view. + * + * @return the hybridConnections value. + */ + public List hybridConnections() { + return this.hybridConnections; + } + + /** + * Get the hybridConnectionsV2 property: The Hybrid Connection V2 (Service Bus) view. + * + * @return the hybridConnectionsV2 value. + */ + public List hybridConnectionsV2() { + return this.hybridConnectionsV2; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualNetworkConnection() != null) { + virtualNetworkConnection().validate(); + } + if (hybridConnections() != null) { + hybridConnections().forEach(e -> e.validate()); + } + if (hybridConnectionsV2() != null) { + hybridConnectionsV2().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkTraceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkTraceInner.java new file mode 100644 index 0000000000000..63399f941f15c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/NetworkTraceInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Network trace. */ +@Fluent +public final class NetworkTraceInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NetworkTraceInner.class); + + /* + * Local file path for the captured network trace file. + */ + @JsonProperty(value = "path") + private String path; + + /* + * Current status of the network trace operation, same as Operation.Status + * (InProgress/Succeeded/Failed). + */ + @JsonProperty(value = "status") + private String status; + + /* + * Detailed message of a network trace operation, e.g. error message in + * case of failure. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the path property: Local file path for the captured network trace file. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: Local file path for the captured network trace file. + * + * @param path the path value to set. + * @return the NetworkTraceInner object itself. + */ + public NetworkTraceInner withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the status property: Current status of the network trace operation, same as Operation.Status + * (InProgress/Succeeded/Failed). + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Current status of the network trace operation, same as Operation.Status + * (InProgress/Succeeded/Failed). + * + * @param status the status value to set. + * @return the NetworkTraceInner object itself. + */ + public NetworkTraceInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the message property: Detailed message of a network trace operation, e.g. error message in case of failure. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Detailed message of a network trace operation, e.g. error message in case of failure. + * + * @param message the message value to set. + * @return the NetworkTraceInner object itself. + */ + public NetworkTraceInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/OperationInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/OperationInner.java new file mode 100644 index 0000000000000..2d8bb1ee1fbbd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/OperationInner.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ErrorEntity; +import com.azure.resourcemanager.appservice.generated.models.OperationStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** An operation on a resource. */ +@Fluent +public final class OperationInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); + + /* + * Operation ID. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Operation name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The current status of the operation. + */ + @JsonProperty(value = "status") + private OperationStatus status; + + /* + * Any errors associate with the operation. + */ + @JsonProperty(value = "errors") + private List errors; + + /* + * Time when operation has started. + */ + @JsonProperty(value = "createdTime") + private OffsetDateTime createdTime; + + /* + * Time when operation has been updated. + */ + @JsonProperty(value = "modifiedTime") + private OffsetDateTime modifiedTime; + + /* + * Time when operation will expire. + */ + @JsonProperty(value = "expirationTime") + private OffsetDateTime expirationTime; + + /* + * Applicable only for stamp operation ids. + */ + @JsonProperty(value = "geoMasterOperationId") + private UUID geoMasterOperationId; + + /** + * Get the id property: Operation ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Operation ID. + * + * @param id the id value to set. + * @return the OperationInner object itself. + */ + public OperationInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Operation name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Operation name. + * + * @param name the name value to set. + * @return the OperationInner object itself. + */ + public OperationInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: The current status of the operation. + * + * @return the status value. + */ + public OperationStatus status() { + return this.status; + } + + /** + * Set the status property: The current status of the operation. + * + * @param status the status value to set. + * @return the OperationInner object itself. + */ + public OperationInner withStatus(OperationStatus status) { + this.status = status; + return this; + } + + /** + * Get the errors property: Any errors associate with the operation. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Set the errors property: Any errors associate with the operation. + * + * @param errors the errors value to set. + * @return the OperationInner object itself. + */ + public OperationInner withErrors(List errors) { + this.errors = errors; + return this; + } + + /** + * Get the createdTime property: Time when operation has started. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.createdTime; + } + + /** + * Set the createdTime property: Time when operation has started. + * + * @param createdTime the createdTime value to set. + * @return the OperationInner object itself. + */ + public OperationInner withCreatedTime(OffsetDateTime createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Get the modifiedTime property: Time when operation has been updated. + * + * @return the modifiedTime value. + */ + public OffsetDateTime modifiedTime() { + return this.modifiedTime; + } + + /** + * Set the modifiedTime property: Time when operation has been updated. + * + * @param modifiedTime the modifiedTime value to set. + * @return the OperationInner object itself. + */ + public OperationInner withModifiedTime(OffsetDateTime modifiedTime) { + this.modifiedTime = modifiedTime; + return this; + } + + /** + * Get the expirationTime property: Time when operation will expire. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.expirationTime; + } + + /** + * Set the expirationTime property: Time when operation will expire. + * + * @param expirationTime the expirationTime value to set. + * @return the OperationInner object itself. + */ + public OperationInner withExpirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + /** + * Get the geoMasterOperationId property: Applicable only for stamp operation ids. + * + * @return the geoMasterOperationId value. + */ + public UUID geoMasterOperationId() { + return this.geoMasterOperationId; + } + + /** + * Set the geoMasterOperationId property: Applicable only for stamp operation ids. + * + * @param geoMasterOperationId the geoMasterOperationId value to set. + * @return the OperationInner object itself. + */ + public OperationInner withGeoMasterOperationId(UUID geoMasterOperationId) { + this.geoMasterOperationId = geoMasterOperationId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (errors() != null) { + errors().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/OutboundEnvironmentEndpointInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/OutboundEnvironmentEndpointInner.java new file mode 100644 index 0000000000000..29138ecc24f82 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/OutboundEnvironmentEndpointInner.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.EndpointDependency; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Endpoints accessed for a common purpose that the App Service Environment requires outbound network access to. */ +@Fluent +public final class OutboundEnvironmentEndpointInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OutboundEnvironmentEndpointInner.class); + + /* + * The type of service accessed by the App Service Environment, e.g., Azure + * Storage, Azure SQL Database, and Azure Active Directory. + */ + @JsonProperty(value = "category") + private String category; + + /* + * The endpoints that the App Service Environment reaches the service at. + */ + @JsonProperty(value = "endpoints") + private List endpoints; + + /** + * Get the category property: The type of service accessed by the App Service Environment, e.g., Azure Storage, + * Azure SQL Database, and Azure Active Directory. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: The type of service accessed by the App Service Environment, e.g., Azure Storage, + * Azure SQL Database, and Azure Active Directory. + * + * @param category the category value to set. + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the endpoints property: The endpoints that the App Service Environment reaches the service at. + * + * @return the endpoints value. + */ + public List endpoints() { + return this.endpoints; + } + + /** + * Set the endpoints property: The endpoints that the App Service Environment reaches the service at. + * + * @param endpoints the endpoints value to set. + * @return the OutboundEnvironmentEndpointInner object itself. + */ + public OutboundEnvironmentEndpointInner withEndpoints(List endpoints) { + this.endpoints = endpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpoints() != null) { + endpoints().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PerfMonResponseInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PerfMonResponseInner.java new file mode 100644 index 0000000000000..054f98e43a982 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PerfMonResponseInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.PerfMonSet; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Performance monitor API response. */ +@Fluent +public final class PerfMonResponseInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PerfMonResponseInner.class); + + /* + * The response code. + */ + @JsonProperty(value = "code") + private String code; + + /* + * The message. + */ + @JsonProperty(value = "message") + private String message; + + /* + * The performance monitor counters. + */ + @JsonProperty(value = "data") + private PerfMonSet data; + + /** + * Get the code property: The response code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: The response code. + * + * @param code the code value to set. + * @return the PerfMonResponseInner object itself. + */ + public PerfMonResponseInner withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: The message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The message. + * + * @param message the message value to set. + * @return the PerfMonResponseInner object itself. + */ + public PerfMonResponseInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the data property: The performance monitor counters. + * + * @return the data value. + */ + public PerfMonSet data() { + return this.data; + } + + /** + * Set the data property: The performance monitor counters. + * + * @param data the data value to set. + * @return the PerfMonResponseInner object itself. + */ + public PerfMonResponseInner withData(PerfMonSet data) { + this.data = data; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (data() != null) { + data().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnInner.java new file mode 100644 index 0000000000000..2a5890bbc8944 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Premier add-on. */ +@Fluent +public final class PremierAddOnInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PremierAddOnInner.class); + + /* + * PremierAddOn resource specific properties + */ + @JsonProperty(value = "properties") + private PremierAddOnProperties innerProperties; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: PremierAddOn resource specific properties. + * + * @return the innerProperties value. + */ + private PremierAddOnProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public PremierAddOnInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public PremierAddOnInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the sku property: Premier add on SKU. + * + * @return the sku value. + */ + public String sku() { + return this.innerProperties() == null ? null : this.innerProperties().sku(); + } + + /** + * Set the sku property: Premier add on SKU. + * + * @param sku the sku value to set. + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withSku(String sku) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnProperties(); + } + this.innerProperties().withSku(sku); + return this; + } + + /** + * Get the product property: Premier add on Product. + * + * @return the product value. + */ + public String product() { + return this.innerProperties() == null ? null : this.innerProperties().product(); + } + + /** + * Set the product property: Premier add on Product. + * + * @param product the product value to set. + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withProduct(String product) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnProperties(); + } + this.innerProperties().withProduct(product); + return this; + } + + /** + * Get the vendor property: Premier add on Vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.innerProperties() == null ? null : this.innerProperties().vendor(); + } + + /** + * Set the vendor property: Premier add on Vendor. + * + * @param vendor the vendor value to set. + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withVendor(String vendor) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnProperties(); + } + this.innerProperties().withVendor(vendor); + return this; + } + + /** + * Get the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @return the marketplacePublisher value. + */ + public String marketplacePublisher() { + return this.innerProperties() == null ? null : this.innerProperties().marketplacePublisher(); + } + + /** + * Set the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set. + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withMarketplacePublisher(String marketplacePublisher) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnProperties(); + } + this.innerProperties().withMarketplacePublisher(marketplacePublisher); + return this; + } + + /** + * Get the marketplaceOffer property: Premier add on Marketplace offer. + * + * @return the marketplaceOffer value. + */ + public String marketplaceOffer() { + return this.innerProperties() == null ? null : this.innerProperties().marketplaceOffer(); + } + + /** + * Set the marketplaceOffer property: Premier add on Marketplace offer. + * + * @param marketplaceOffer the marketplaceOffer value to set. + * @return the PremierAddOnInner object itself. + */ + public PremierAddOnInner withMarketplaceOffer(String marketplaceOffer) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnProperties(); + } + this.innerProperties().withMarketplaceOffer(marketplaceOffer); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnOfferInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnOfferInner.java new file mode 100644 index 0000000000000..9da2607b8f2ea --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnOfferInner.java @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlanRestrictions; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Premier add-on offer. */ +@Fluent +public final class PremierAddOnOfferInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PremierAddOnOfferInner.class); + + /* + * PremierAddOnOffer resource specific properties + */ + @JsonProperty(value = "properties") + private PremierAddOnOfferProperties innerProperties; + + /** + * Get the innerProperties property: PremierAddOnOffer resource specific properties. + * + * @return the innerProperties value. + */ + private PremierAddOnOfferProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public PremierAddOnOfferInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the sku property: Premier add on SKU. + * + * @return the sku value. + */ + public String sku() { + return this.innerProperties() == null ? null : this.innerProperties().sku(); + } + + /** + * Set the sku property: Premier add on SKU. + * + * @param sku the sku value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withSku(String sku) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withSku(sku); + return this; + } + + /** + * Get the product property: Premier add on offer Product. + * + * @return the product value. + */ + public String product() { + return this.innerProperties() == null ? null : this.innerProperties().product(); + } + + /** + * Set the product property: Premier add on offer Product. + * + * @param product the product value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withProduct(String product) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withProduct(product); + return this; + } + + /** + * Get the vendor property: Premier add on offer Vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.innerProperties() == null ? null : this.innerProperties().vendor(); + } + + /** + * Set the vendor property: Premier add on offer Vendor. + * + * @param vendor the vendor value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withVendor(String vendor) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withVendor(vendor); + return this; + } + + /** + * Get the promoCodeRequired property: <code>true</code> if promotion code is required; otherwise, + * <code>false</code>. + * + * @return the promoCodeRequired value. + */ + public Boolean promoCodeRequired() { + return this.innerProperties() == null ? null : this.innerProperties().promoCodeRequired(); + } + + /** + * Set the promoCodeRequired property: <code>true</code> if promotion code is required; otherwise, + * <code>false</code>. + * + * @param promoCodeRequired the promoCodeRequired value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withPromoCodeRequired(Boolean promoCodeRequired) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withPromoCodeRequired(promoCodeRequired); + return this; + } + + /** + * Get the quota property: Premier add on offer Quota. + * + * @return the quota value. + */ + public Integer quota() { + return this.innerProperties() == null ? null : this.innerProperties().quota(); + } + + /** + * Set the quota property: Premier add on offer Quota. + * + * @param quota the quota value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withQuota(Integer quota) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withQuota(quota); + return this; + } + + /** + * Get the webHostingPlanRestrictions property: App Service plans this offer is restricted to. + * + * @return the webHostingPlanRestrictions value. + */ + public AppServicePlanRestrictions webHostingPlanRestrictions() { + return this.innerProperties() == null ? null : this.innerProperties().webHostingPlanRestrictions(); + } + + /** + * Set the webHostingPlanRestrictions property: App Service plans this offer is restricted to. + * + * @param webHostingPlanRestrictions the webHostingPlanRestrictions value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withWebHostingPlanRestrictions( + AppServicePlanRestrictions webHostingPlanRestrictions) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withWebHostingPlanRestrictions(webHostingPlanRestrictions); + return this; + } + + /** + * Get the privacyPolicyUrl property: Privacy policy URL. + * + * @return the privacyPolicyUrl value. + */ + public String privacyPolicyUrl() { + return this.innerProperties() == null ? null : this.innerProperties().privacyPolicyUrl(); + } + + /** + * Set the privacyPolicyUrl property: Privacy policy URL. + * + * @param privacyPolicyUrl the privacyPolicyUrl value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withPrivacyPolicyUrl(String privacyPolicyUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withPrivacyPolicyUrl(privacyPolicyUrl); + return this; + } + + /** + * Get the legalTermsUrl property: Legal terms URL. + * + * @return the legalTermsUrl value. + */ + public String legalTermsUrl() { + return this.innerProperties() == null ? null : this.innerProperties().legalTermsUrl(); + } + + /** + * Set the legalTermsUrl property: Legal terms URL. + * + * @param legalTermsUrl the legalTermsUrl value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withLegalTermsUrl(String legalTermsUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withLegalTermsUrl(legalTermsUrl); + return this; + } + + /** + * Get the marketplacePublisher property: Marketplace publisher. + * + * @return the marketplacePublisher value. + */ + public String marketplacePublisher() { + return this.innerProperties() == null ? null : this.innerProperties().marketplacePublisher(); + } + + /** + * Set the marketplacePublisher property: Marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withMarketplacePublisher(String marketplacePublisher) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withMarketplacePublisher(marketplacePublisher); + return this; + } + + /** + * Get the marketplaceOffer property: Marketplace offer. + * + * @return the marketplaceOffer value. + */ + public String marketplaceOffer() { + return this.innerProperties() == null ? null : this.innerProperties().marketplaceOffer(); + } + + /** + * Set the marketplaceOffer property: Marketplace offer. + * + * @param marketplaceOffer the marketplaceOffer value to set. + * @return the PremierAddOnOfferInner object itself. + */ + public PremierAddOnOfferInner withMarketplaceOffer(String marketplaceOffer) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnOfferProperties(); + } + this.innerProperties().withMarketplaceOffer(marketplaceOffer); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnOfferProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnOfferProperties.java new file mode 100644 index 0000000000000..8660d07246153 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnOfferProperties.java @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlanRestrictions; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** PremierAddOnOffer resource specific properties. */ +@Fluent +public final class PremierAddOnOfferProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PremierAddOnOfferProperties.class); + + /* + * Premier add on SKU. + */ + @JsonProperty(value = "sku") + private String sku; + + /* + * Premier add on offer Product. + */ + @JsonProperty(value = "product") + private String product; + + /* + * Premier add on offer Vendor. + */ + @JsonProperty(value = "vendor") + private String vendor; + + /* + * true if promotion code is required; otherwise, + * false. + */ + @JsonProperty(value = "promoCodeRequired") + private Boolean promoCodeRequired; + + /* + * Premier add on offer Quota. + */ + @JsonProperty(value = "quota") + private Integer quota; + + /* + * App Service plans this offer is restricted to. + */ + @JsonProperty(value = "webHostingPlanRestrictions") + private AppServicePlanRestrictions webHostingPlanRestrictions; + + /* + * Privacy policy URL. + */ + @JsonProperty(value = "privacyPolicyUrl") + private String privacyPolicyUrl; + + /* + * Legal terms URL. + */ + @JsonProperty(value = "legalTermsUrl") + private String legalTermsUrl; + + /* + * Marketplace publisher. + */ + @JsonProperty(value = "marketplacePublisher") + private String marketplacePublisher; + + /* + * Marketplace offer. + */ + @JsonProperty(value = "marketplaceOffer") + private String marketplaceOffer; + + /** + * Get the sku property: Premier add on SKU. + * + * @return the sku value. + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku property: Premier add on SKU. + * + * @param sku the sku value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get the product property: Premier add on offer Product. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: Premier add on offer Product. + * + * @param product the product value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the vendor property: Premier add on offer Vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor property: Premier add on offer Vendor. + * + * @param vendor the vendor value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the promoCodeRequired property: <code>true</code> if promotion code is required; otherwise, + * <code>false</code>. + * + * @return the promoCodeRequired value. + */ + public Boolean promoCodeRequired() { + return this.promoCodeRequired; + } + + /** + * Set the promoCodeRequired property: <code>true</code> if promotion code is required; otherwise, + * <code>false</code>. + * + * @param promoCodeRequired the promoCodeRequired value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withPromoCodeRequired(Boolean promoCodeRequired) { + this.promoCodeRequired = promoCodeRequired; + return this; + } + + /** + * Get the quota property: Premier add on offer Quota. + * + * @return the quota value. + */ + public Integer quota() { + return this.quota; + } + + /** + * Set the quota property: Premier add on offer Quota. + * + * @param quota the quota value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withQuota(Integer quota) { + this.quota = quota; + return this; + } + + /** + * Get the webHostingPlanRestrictions property: App Service plans this offer is restricted to. + * + * @return the webHostingPlanRestrictions value. + */ + public AppServicePlanRestrictions webHostingPlanRestrictions() { + return this.webHostingPlanRestrictions; + } + + /** + * Set the webHostingPlanRestrictions property: App Service plans this offer is restricted to. + * + * @param webHostingPlanRestrictions the webHostingPlanRestrictions value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withWebHostingPlanRestrictions( + AppServicePlanRestrictions webHostingPlanRestrictions) { + this.webHostingPlanRestrictions = webHostingPlanRestrictions; + return this; + } + + /** + * Get the privacyPolicyUrl property: Privacy policy URL. + * + * @return the privacyPolicyUrl value. + */ + public String privacyPolicyUrl() { + return this.privacyPolicyUrl; + } + + /** + * Set the privacyPolicyUrl property: Privacy policy URL. + * + * @param privacyPolicyUrl the privacyPolicyUrl value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withPrivacyPolicyUrl(String privacyPolicyUrl) { + this.privacyPolicyUrl = privacyPolicyUrl; + return this; + } + + /** + * Get the legalTermsUrl property: Legal terms URL. + * + * @return the legalTermsUrl value. + */ + public String legalTermsUrl() { + return this.legalTermsUrl; + } + + /** + * Set the legalTermsUrl property: Legal terms URL. + * + * @param legalTermsUrl the legalTermsUrl value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withLegalTermsUrl(String legalTermsUrl) { + this.legalTermsUrl = legalTermsUrl; + return this; + } + + /** + * Get the marketplacePublisher property: Marketplace publisher. + * + * @return the marketplacePublisher value. + */ + public String marketplacePublisher() { + return this.marketplacePublisher; + } + + /** + * Set the marketplacePublisher property: Marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withMarketplacePublisher(String marketplacePublisher) { + this.marketplacePublisher = marketplacePublisher; + return this; + } + + /** + * Get the marketplaceOffer property: Marketplace offer. + * + * @return the marketplaceOffer value. + */ + public String marketplaceOffer() { + return this.marketplaceOffer; + } + + /** + * Set the marketplaceOffer property: Marketplace offer. + * + * @param marketplaceOffer the marketplaceOffer value to set. + * @return the PremierAddOnOfferProperties object itself. + */ + public PremierAddOnOfferProperties withMarketplaceOffer(String marketplaceOffer) { + this.marketplaceOffer = marketplaceOffer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnPatchResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnPatchResourceProperties.java new file mode 100644 index 0000000000000..027afad44ef5b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnPatchResourceProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** PremierAddOnPatchResource resource specific properties. */ +@Fluent +public final class PremierAddOnPatchResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PremierAddOnPatchResourceProperties.class); + + /* + * Premier add on SKU. + */ + @JsonProperty(value = "sku") + private String sku; + + /* + * Premier add on Product. + */ + @JsonProperty(value = "product") + private String product; + + /* + * Premier add on Vendor. + */ + @JsonProperty(value = "vendor") + private String vendor; + + /* + * Premier add on Marketplace publisher. + */ + @JsonProperty(value = "marketplacePublisher") + private String marketplacePublisher; + + /* + * Premier add on Marketplace offer. + */ + @JsonProperty(value = "marketplaceOffer") + private String marketplaceOffer; + + /** + * Get the sku property: Premier add on SKU. + * + * @return the sku value. + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku property: Premier add on SKU. + * + * @param sku the sku value to set. + * @return the PremierAddOnPatchResourceProperties object itself. + */ + public PremierAddOnPatchResourceProperties withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get the product property: Premier add on Product. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: Premier add on Product. + * + * @param product the product value to set. + * @return the PremierAddOnPatchResourceProperties object itself. + */ + public PremierAddOnPatchResourceProperties withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the vendor property: Premier add on Vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor property: Premier add on Vendor. + * + * @param vendor the vendor value to set. + * @return the PremierAddOnPatchResourceProperties object itself. + */ + public PremierAddOnPatchResourceProperties withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @return the marketplacePublisher value. + */ + public String marketplacePublisher() { + return this.marketplacePublisher; + } + + /** + * Set the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set. + * @return the PremierAddOnPatchResourceProperties object itself. + */ + public PremierAddOnPatchResourceProperties withMarketplacePublisher(String marketplacePublisher) { + this.marketplacePublisher = marketplacePublisher; + return this; + } + + /** + * Get the marketplaceOffer property: Premier add on Marketplace offer. + * + * @return the marketplaceOffer value. + */ + public String marketplaceOffer() { + return this.marketplaceOffer; + } + + /** + * Set the marketplaceOffer property: Premier add on Marketplace offer. + * + * @param marketplaceOffer the marketplaceOffer value to set. + * @return the PremierAddOnPatchResourceProperties object itself. + */ + public PremierAddOnPatchResourceProperties withMarketplaceOffer(String marketplaceOffer) { + this.marketplaceOffer = marketplaceOffer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnProperties.java new file mode 100644 index 0000000000000..8404a7a104271 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** PremierAddOn resource specific properties. */ +@Fluent +public final class PremierAddOnProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PremierAddOnProperties.class); + + /* + * Premier add on SKU. + */ + @JsonProperty(value = "sku") + private String sku; + + /* + * Premier add on Product. + */ + @JsonProperty(value = "product") + private String product; + + /* + * Premier add on Vendor. + */ + @JsonProperty(value = "vendor") + private String vendor; + + /* + * Premier add on Marketplace publisher. + */ + @JsonProperty(value = "marketplacePublisher") + private String marketplacePublisher; + + /* + * Premier add on Marketplace offer. + */ + @JsonProperty(value = "marketplaceOffer") + private String marketplaceOffer; + + /** + * Get the sku property: Premier add on SKU. + * + * @return the sku value. + */ + public String sku() { + return this.sku; + } + + /** + * Set the sku property: Premier add on SKU. + * + * @param sku the sku value to set. + * @return the PremierAddOnProperties object itself. + */ + public PremierAddOnProperties withSku(String sku) { + this.sku = sku; + return this; + } + + /** + * Get the product property: Premier add on Product. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: Premier add on Product. + * + * @param product the product value to set. + * @return the PremierAddOnProperties object itself. + */ + public PremierAddOnProperties withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the vendor property: Premier add on Vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.vendor; + } + + /** + * Set the vendor property: Premier add on Vendor. + * + * @param vendor the vendor value to set. + * @return the PremierAddOnProperties object itself. + */ + public PremierAddOnProperties withVendor(String vendor) { + this.vendor = vendor; + return this; + } + + /** + * Get the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @return the marketplacePublisher value. + */ + public String marketplacePublisher() { + return this.marketplacePublisher; + } + + /** + * Set the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set. + * @return the PremierAddOnProperties object itself. + */ + public PremierAddOnProperties withMarketplacePublisher(String marketplacePublisher) { + this.marketplacePublisher = marketplacePublisher; + return this; + } + + /** + * Get the marketplaceOffer property: Premier add on Marketplace offer. + * + * @return the marketplaceOffer value. + */ + public String marketplaceOffer() { + return this.marketplaceOffer; + } + + /** + * Set the marketplaceOffer property: Premier add on Marketplace offer. + * + * @param marketplaceOffer the marketplaceOffer value to set. + * @return the PremierAddOnProperties object itself. + */ + public PremierAddOnProperties withMarketplaceOffer(String marketplaceOffer) { + this.marketplaceOffer = marketplaceOffer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateAccessInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateAccessInner.java new file mode 100644 index 0000000000000..1409617246f0a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateAccessInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.PrivateAccessVirtualNetwork; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Description of the parameters of Private Access for a Web Site. */ +@Fluent +public final class PrivateAccessInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateAccessInner.class); + + /* + * PrivateAccess resource specific properties + */ + @JsonProperty(value = "properties") + private PrivateAccessProperties innerProperties; + + /** + * Get the innerProperties property: PrivateAccess resource specific properties. + * + * @return the innerProperties value. + */ + private PrivateAccessProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public PrivateAccessInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the enabled property: Whether private access is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: Whether private access is enabled or not. + * + * @param enabled the enabled value to set. + * @return the PrivateAccessInner object itself. + */ + public PrivateAccessInner withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateAccessProperties(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the virtualNetworks property: The Virtual Networks (and subnets) allowed to access the site privately. + * + * @return the virtualNetworks value. + */ + public List virtualNetworks() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworks(); + } + + /** + * Set the virtualNetworks property: The Virtual Networks (and subnets) allowed to access the site privately. + * + * @param virtualNetworks the virtualNetworks value to set. + * @return the PrivateAccessInner object itself. + */ + public PrivateAccessInner withVirtualNetworks(List virtualNetworks) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateAccessProperties(); + } + this.innerProperties().withVirtualNetworks(virtualNetworks); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateAccessProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateAccessProperties.java new file mode 100644 index 0000000000000..e648695479ec0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateAccessProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.PrivateAccessVirtualNetwork; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** PrivateAccess resource specific properties. */ +@Fluent +public final class PrivateAccessProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateAccessProperties.class); + + /* + * Whether private access is enabled or not. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The Virtual Networks (and subnets) allowed to access the site privately. + */ + @JsonProperty(value = "virtualNetworks") + private List virtualNetworks; + + /** + * Get the enabled property: Whether private access is enabled or not. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Whether private access is enabled or not. + * + * @param enabled the enabled value to set. + * @return the PrivateAccessProperties object itself. + */ + public PrivateAccessProperties withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the virtualNetworks property: The Virtual Networks (and subnets) allowed to access the site privately. + * + * @return the virtualNetworks value. + */ + public List virtualNetworks() { + return this.virtualNetworks; + } + + /** + * Set the virtualNetworks property: The Virtual Networks (and subnets) allowed to access the site privately. + * + * @param virtualNetworks the virtualNetworks value to set. + * @return the PrivateAccessProperties object itself. + */ + public PrivateAccessProperties withVirtualNetworks(List virtualNetworks) { + this.virtualNetworks = virtualNetworks; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualNetworks() != null) { + virtualNetworks().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateLinkConnectionApprovalRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateLinkConnectionApprovalRequest.java new file mode 100644 index 0000000000000..da85fdc4a680c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateLinkConnectionApprovalRequest.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A request to approve or reject a private endpoint connection. */ +@Fluent +public final class PrivateLinkConnectionApprovalRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkConnectionApprovalRequest.class); + + /* + * The state of a private link connection + */ + @JsonProperty(value = "privateLinkServiceConnectionState") + private PrivateLinkConnectionState privateLinkServiceConnectionState; + + /** + * Get the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateLinkConnectionApprovalRequest object itself. + */ + public PrivateLinkConnectionApprovalRequest withPrivateLinkServiceConnectionState( + PrivateLinkConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateLinkResourcesWrapperInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateLinkResourcesWrapperInner.java new file mode 100644 index 0000000000000..992802d070f4e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PrivateLinkResourcesWrapperInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Wrapper for a collection of private link resources. */ +@Fluent +public final class PrivateLinkResourcesWrapperInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesWrapperInner.class); + + /* + * The value property. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * Get the value property: The value property. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The value property. + * + * @param value the value value to set. + * @return the PrivateLinkResourcesWrapperInner object itself. + */ + public PrivateLinkResourcesWrapperInner 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 PrivateLinkResourcesWrapperInner")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessInfoInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessInfoInner.java new file mode 100644 index 0000000000000..87062e7a6f2b1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessInfoInner.java @@ -0,0 +1,869 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** Process Information. */ +@Fluent +public final class ProcessInfoInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessInfoInner.class); + + /* + * ProcessInfo resource specific properties + */ + @JsonProperty(value = "properties") + private ProcessInfoProperties innerProperties; + + /** + * Get the innerProperties property: ProcessInfo resource specific properties. + * + * @return the innerProperties value. + */ + private ProcessInfoProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ProcessInfoInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the identifier property: ARM Identifier for deployment. + * + * @return the identifier value. + */ + public Integer identifier() { + return this.innerProperties() == null ? null : this.innerProperties().identifier(); + } + + /** + * Get the deploymentName property: Deployment name. + * + * @return the deploymentName value. + */ + public String deploymentName() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentName(); + } + + /** + * Set the deploymentName property: Deployment name. + * + * @param deploymentName the deploymentName value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withDeploymentName(String deploymentName) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withDeploymentName(deploymentName); + return this; + } + + /** + * Get the href property: HRef URI. + * + * @return the href value. + */ + public String href() { + return this.innerProperties() == null ? null : this.innerProperties().href(); + } + + /** + * Set the href property: HRef URI. + * + * @param href the href value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withHref(String href) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withHref(href); + return this; + } + + /** + * Get the minidump property: Minidump URI. + * + * @return the minidump value. + */ + public String minidump() { + return this.innerProperties() == null ? null : this.innerProperties().minidump(); + } + + /** + * Set the minidump property: Minidump URI. + * + * @param minidump the minidump value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withMinidump(String minidump) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withMinidump(minidump); + return this; + } + + /** + * Get the isProfileRunning property: Is profile running?. + * + * @return the isProfileRunning value. + */ + public Boolean isProfileRunning() { + return this.innerProperties() == null ? null : this.innerProperties().isProfileRunning(); + } + + /** + * Set the isProfileRunning property: Is profile running?. + * + * @param isProfileRunning the isProfileRunning value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsProfileRunning(Boolean isProfileRunning) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withIsProfileRunning(isProfileRunning); + return this; + } + + /** + * Get the isIisProfileRunning property: Is the IIS Profile running?. + * + * @return the isIisProfileRunning value. + */ + public Boolean isIisProfileRunning() { + return this.innerProperties() == null ? null : this.innerProperties().isIisProfileRunning(); + } + + /** + * Set the isIisProfileRunning property: Is the IIS Profile running?. + * + * @param isIisProfileRunning the isIisProfileRunning value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsIisProfileRunning(Boolean isIisProfileRunning) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withIsIisProfileRunning(isIisProfileRunning); + return this; + } + + /** + * Get the iisProfileTimeoutInSeconds property: IIS Profile timeout (seconds). + * + * @return the iisProfileTimeoutInSeconds value. + */ + public Double iisProfileTimeoutInSeconds() { + return this.innerProperties() == null ? null : this.innerProperties().iisProfileTimeoutInSeconds(); + } + + /** + * Set the iisProfileTimeoutInSeconds property: IIS Profile timeout (seconds). + * + * @param iisProfileTimeoutInSeconds the iisProfileTimeoutInSeconds value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIisProfileTimeoutInSeconds(Double iisProfileTimeoutInSeconds) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withIisProfileTimeoutInSeconds(iisProfileTimeoutInSeconds); + return this; + } + + /** + * Get the parent property: Parent process. + * + * @return the parent value. + */ + public String parent() { + return this.innerProperties() == null ? null : this.innerProperties().parent(); + } + + /** + * Set the parent property: Parent process. + * + * @param parent the parent value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withParent(String parent) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withParent(parent); + return this; + } + + /** + * Get the children property: Child process list. + * + * @return the children value. + */ + public List children() { + return this.innerProperties() == null ? null : this.innerProperties().children(); + } + + /** + * Set the children property: Child process list. + * + * @param children the children value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withChildren(List children) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withChildren(children); + return this; + } + + /** + * Get the threads property: Thread list. + * + * @return the threads value. + */ + public List threads() { + return this.innerProperties() == null ? null : this.innerProperties().threads(); + } + + /** + * Set the threads property: Thread list. + * + * @param threads the threads value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withThreads(List threads) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withThreads(threads); + return this; + } + + /** + * Get the openFileHandles property: List of open files. + * + * @return the openFileHandles value. + */ + public List openFileHandles() { + return this.innerProperties() == null ? null : this.innerProperties().openFileHandles(); + } + + /** + * Set the openFileHandles property: List of open files. + * + * @param openFileHandles the openFileHandles value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withOpenFileHandles(List openFileHandles) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withOpenFileHandles(openFileHandles); + return this; + } + + /** + * Get the modules property: List of modules. + * + * @return the modules value. + */ + public List modules() { + return this.innerProperties() == null ? null : this.innerProperties().modules(); + } + + /** + * Set the modules property: List of modules. + * + * @param modules the modules value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withModules(List modules) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withModules(modules); + return this; + } + + /** + * Get the fileName property: File name of this process. + * + * @return the fileName value. + */ + public String fileName() { + return this.innerProperties() == null ? null : this.innerProperties().fileName(); + } + + /** + * Set the fileName property: File name of this process. + * + * @param fileName the fileName value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withFileName(String fileName) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withFileName(fileName); + return this; + } + + /** + * Get the commandLine property: Command line. + * + * @return the commandLine value. + */ + public String commandLine() { + return this.innerProperties() == null ? null : this.innerProperties().commandLine(); + } + + /** + * Set the commandLine property: Command line. + * + * @param commandLine the commandLine value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withCommandLine(String commandLine) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withCommandLine(commandLine); + return this; + } + + /** + * Get the username property: User name. + * + * @return the username value. + */ + public String username() { + return this.innerProperties() == null ? null : this.innerProperties().username(); + } + + /** + * Set the username property: User name. + * + * @param username the username value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withUsername(String username) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withUsername(username); + return this; + } + + /** + * Get the handleCount property: Handle count. + * + * @return the handleCount value. + */ + public Integer handleCount() { + return this.innerProperties() == null ? null : this.innerProperties().handleCount(); + } + + /** + * Set the handleCount property: Handle count. + * + * @param handleCount the handleCount value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withHandleCount(Integer handleCount) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withHandleCount(handleCount); + return this; + } + + /** + * Get the moduleCount property: Module count. + * + * @return the moduleCount value. + */ + public Integer moduleCount() { + return this.innerProperties() == null ? null : this.innerProperties().moduleCount(); + } + + /** + * Set the moduleCount property: Module count. + * + * @param moduleCount the moduleCount value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withModuleCount(Integer moduleCount) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withModuleCount(moduleCount); + return this; + } + + /** + * Get the threadCount property: Thread count. + * + * @return the threadCount value. + */ + public Integer threadCount() { + return this.innerProperties() == null ? null : this.innerProperties().threadCount(); + } + + /** + * Set the threadCount property: Thread count. + * + * @param threadCount the threadCount value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withThreadCount(Integer threadCount) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withThreadCount(threadCount); + return this; + } + + /** + * Get the startTime property: Start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.innerProperties() == null ? null : this.innerProperties().startTime(); + } + + /** + * Set the startTime property: Start time. + * + * @param startTime the startTime value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withStartTime(OffsetDateTime startTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withStartTime(startTime); + return this; + } + + /** + * Get the totalCpuTime property: Total CPU time. + * + * @return the totalCpuTime value. + */ + public String totalCpuTime() { + return this.innerProperties() == null ? null : this.innerProperties().totalCpuTime(); + } + + /** + * Set the totalCpuTime property: Total CPU time. + * + * @param totalCpuTime the totalCpuTime value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withTotalCpuTime(String totalCpuTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withTotalCpuTime(totalCpuTime); + return this; + } + + /** + * Get the userCpuTime property: User CPU time. + * + * @return the userCpuTime value. + */ + public String userCpuTime() { + return this.innerProperties() == null ? null : this.innerProperties().userCpuTime(); + } + + /** + * Set the userCpuTime property: User CPU time. + * + * @param userCpuTime the userCpuTime value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withUserCpuTime(String userCpuTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withUserCpuTime(userCpuTime); + return this; + } + + /** + * Get the privilegedCpuTime property: Privileged CPU time. + * + * @return the privilegedCpuTime value. + */ + public String privilegedCpuTime() { + return this.innerProperties() == null ? null : this.innerProperties().privilegedCpuTime(); + } + + /** + * Set the privilegedCpuTime property: Privileged CPU time. + * + * @param privilegedCpuTime the privilegedCpuTime value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPrivilegedCpuTime(String privilegedCpuTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withPrivilegedCpuTime(privilegedCpuTime); + return this; + } + + /** + * Get the workingSet property: Working set. + * + * @return the workingSet value. + */ + public Long workingSet() { + return this.innerProperties() == null ? null : this.innerProperties().workingSet(); + } + + /** + * Set the workingSet property: Working set. + * + * @param workingSet the workingSet value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withWorkingSet(Long workingSet) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withWorkingSet(workingSet); + return this; + } + + /** + * Get the peakWorkingSet property: Peak working set. + * + * @return the peakWorkingSet value. + */ + public Long peakWorkingSet() { + return this.innerProperties() == null ? null : this.innerProperties().peakWorkingSet(); + } + + /** + * Set the peakWorkingSet property: Peak working set. + * + * @param peakWorkingSet the peakWorkingSet value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakWorkingSet(Long peakWorkingSet) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withPeakWorkingSet(peakWorkingSet); + return this; + } + + /** + * Get the privateMemory property: Private memory size. + * + * @return the privateMemory value. + */ + public Long privateMemory() { + return this.innerProperties() == null ? null : this.innerProperties().privateMemory(); + } + + /** + * Set the privateMemory property: Private memory size. + * + * @param privateMemory the privateMemory value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPrivateMemory(Long privateMemory) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withPrivateMemory(privateMemory); + return this; + } + + /** + * Get the virtualMemory property: Virtual memory size. + * + * @return the virtualMemory value. + */ + public Long virtualMemory() { + return this.innerProperties() == null ? null : this.innerProperties().virtualMemory(); + } + + /** + * Set the virtualMemory property: Virtual memory size. + * + * @param virtualMemory the virtualMemory value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withVirtualMemory(Long virtualMemory) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withVirtualMemory(virtualMemory); + return this; + } + + /** + * Get the peakVirtualMemory property: Peak virtual memory usage. + * + * @return the peakVirtualMemory value. + */ + public Long peakVirtualMemory() { + return this.innerProperties() == null ? null : this.innerProperties().peakVirtualMemory(); + } + + /** + * Set the peakVirtualMemory property: Peak virtual memory usage. + * + * @param peakVirtualMemory the peakVirtualMemory value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakVirtualMemory(Long peakVirtualMemory) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withPeakVirtualMemory(peakVirtualMemory); + return this; + } + + /** + * Get the pagedSystemMemory property: Paged system memory. + * + * @return the pagedSystemMemory value. + */ + public Long pagedSystemMemory() { + return this.innerProperties() == null ? null : this.innerProperties().pagedSystemMemory(); + } + + /** + * Set the pagedSystemMemory property: Paged system memory. + * + * @param pagedSystemMemory the pagedSystemMemory value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPagedSystemMemory(Long pagedSystemMemory) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withPagedSystemMemory(pagedSystemMemory); + return this; + } + + /** + * Get the nonPagedSystemMemory property: Non-paged system memory. + * + * @return the nonPagedSystemMemory value. + */ + public Long nonPagedSystemMemory() { + return this.innerProperties() == null ? null : this.innerProperties().nonPagedSystemMemory(); + } + + /** + * Set the nonPagedSystemMemory property: Non-paged system memory. + * + * @param nonPagedSystemMemory the nonPagedSystemMemory value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withNonPagedSystemMemory(Long nonPagedSystemMemory) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withNonPagedSystemMemory(nonPagedSystemMemory); + return this; + } + + /** + * Get the pagedMemory property: Paged memory. + * + * @return the pagedMemory value. + */ + public Long pagedMemory() { + return this.innerProperties() == null ? null : this.innerProperties().pagedMemory(); + } + + /** + * Set the pagedMemory property: Paged memory. + * + * @param pagedMemory the pagedMemory value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPagedMemory(Long pagedMemory) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withPagedMemory(pagedMemory); + return this; + } + + /** + * Get the peakPagedMemory property: Peak paged memory. + * + * @return the peakPagedMemory value. + */ + public Long peakPagedMemory() { + return this.innerProperties() == null ? null : this.innerProperties().peakPagedMemory(); + } + + /** + * Set the peakPagedMemory property: Peak paged memory. + * + * @param peakPagedMemory the peakPagedMemory value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withPeakPagedMemory(Long peakPagedMemory) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withPeakPagedMemory(peakPagedMemory); + return this; + } + + /** + * Get the timestamp property: Time stamp. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.innerProperties() == null ? null : this.innerProperties().timestamp(); + } + + /** + * Set the timestamp property: Time stamp. + * + * @param timestamp the timestamp value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withTimestamp(OffsetDateTime timestamp) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withTimestamp(timestamp); + return this; + } + + /** + * Get the environmentVariables property: List of environment variables. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.innerProperties() == null ? null : this.innerProperties().environmentVariables(); + } + + /** + * Set the environmentVariables property: List of environment variables. + * + * @param environmentVariables the environmentVariables value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withEnvironmentVariables(Map environmentVariables) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withEnvironmentVariables(environmentVariables); + return this; + } + + /** + * Get the isScmSite property: Is this the SCM site?. + * + * @return the isScmSite value. + */ + public Boolean isScmSite() { + return this.innerProperties() == null ? null : this.innerProperties().isScmSite(); + } + + /** + * Set the isScmSite property: Is this the SCM site?. + * + * @param isScmSite the isScmSite value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsScmSite(Boolean isScmSite) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withIsScmSite(isScmSite); + return this; + } + + /** + * Get the isWebjob property: Is this a Web Job?. + * + * @return the isWebjob value. + */ + public Boolean isWebjob() { + return this.innerProperties() == null ? null : this.innerProperties().isWebjob(); + } + + /** + * Set the isWebjob property: Is this a Web Job?. + * + * @param isWebjob the isWebjob value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withIsWebjob(Boolean isWebjob) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withIsWebjob(isWebjob); + return this; + } + + /** + * Get the description property: Description of process. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Description of process. + * + * @param description the description value to set. + * @return the ProcessInfoInner object itself. + */ + public ProcessInfoInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessInfoProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessInfoProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessInfoProperties.java new file mode 100644 index 0000000000000..7646df30dd8b6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessInfoProperties.java @@ -0,0 +1,960 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** ProcessInfo resource specific properties. */ +@Fluent +public final class ProcessInfoProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessInfoProperties.class); + + /* + * ARM Identifier for deployment. + */ + @JsonProperty(value = "identifier", access = JsonProperty.Access.WRITE_ONLY) + private Integer identifier; + + /* + * Deployment name. + */ + @JsonProperty(value = "deployment_name") + private String deploymentName; + + /* + * HRef URI. + */ + @JsonProperty(value = "href") + private String href; + + /* + * Minidump URI. + */ + @JsonProperty(value = "minidump") + private String minidump; + + /* + * Is profile running? + */ + @JsonProperty(value = "is_profile_running") + private Boolean isProfileRunning; + + /* + * Is the IIS Profile running? + */ + @JsonProperty(value = "is_iis_profile_running") + private Boolean isIisProfileRunning; + + /* + * IIS Profile timeout (seconds). + */ + @JsonProperty(value = "iis_profile_timeout_in_seconds") + private Double iisProfileTimeoutInSeconds; + + /* + * Parent process. + */ + @JsonProperty(value = "parent") + private String parent; + + /* + * Child process list. + */ + @JsonProperty(value = "children") + private List children; + + /* + * Thread list. + */ + @JsonProperty(value = "threads") + private List threads; + + /* + * List of open files. + */ + @JsonProperty(value = "open_file_handles") + private List openFileHandles; + + /* + * List of modules. + */ + @JsonProperty(value = "modules") + private List modules; + + /* + * File name of this process. + */ + @JsonProperty(value = "file_name") + private String fileName; + + /* + * Command line. + */ + @JsonProperty(value = "command_line") + private String commandLine; + + /* + * User name. + */ + @JsonProperty(value = "user_name") + private String username; + + /* + * Handle count. + */ + @JsonProperty(value = "handle_count") + private Integer handleCount; + + /* + * Module count. + */ + @JsonProperty(value = "module_count") + private Integer moduleCount; + + /* + * Thread count. + */ + @JsonProperty(value = "thread_count") + private Integer threadCount; + + /* + * Start time. + */ + @JsonProperty(value = "start_time") + private OffsetDateTime startTime; + + /* + * Total CPU time. + */ + @JsonProperty(value = "total_cpu_time") + private String totalCpuTime; + + /* + * User CPU time. + */ + @JsonProperty(value = "user_cpu_time") + private String userCpuTime; + + /* + * Privileged CPU time. + */ + @JsonProperty(value = "privileged_cpu_time") + private String privilegedCpuTime; + + /* + * Working set. + */ + @JsonProperty(value = "working_set") + private Long workingSet; + + /* + * Peak working set. + */ + @JsonProperty(value = "peak_working_set") + private Long peakWorkingSet; + + /* + * Private memory size. + */ + @JsonProperty(value = "private_memory") + private Long privateMemory; + + /* + * Virtual memory size. + */ + @JsonProperty(value = "virtual_memory") + private Long virtualMemory; + + /* + * Peak virtual memory usage. + */ + @JsonProperty(value = "peak_virtual_memory") + private Long peakVirtualMemory; + + /* + * Paged system memory. + */ + @JsonProperty(value = "paged_system_memory") + private Long pagedSystemMemory; + + /* + * Non-paged system memory. + */ + @JsonProperty(value = "non_paged_system_memory") + private Long nonPagedSystemMemory; + + /* + * Paged memory. + */ + @JsonProperty(value = "paged_memory") + private Long pagedMemory; + + /* + * Peak paged memory. + */ + @JsonProperty(value = "peak_paged_memory") + private Long peakPagedMemory; + + /* + * Time stamp. + */ + @JsonProperty(value = "time_stamp") + private OffsetDateTime timestamp; + + /* + * List of environment variables. + */ + @JsonProperty(value = "environment_variables") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map environmentVariables; + + /* + * Is this the SCM site? + */ + @JsonProperty(value = "is_scm_site") + private Boolean isScmSite; + + /* + * Is this a Web Job? + */ + @JsonProperty(value = "is_webjob") + private Boolean isWebjob; + + /* + * Description of process. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the identifier property: ARM Identifier for deployment. + * + * @return the identifier value. + */ + public Integer identifier() { + return this.identifier; + } + + /** + * Get the deploymentName property: Deployment name. + * + * @return the deploymentName value. + */ + public String deploymentName() { + return this.deploymentName; + } + + /** + * Set the deploymentName property: Deployment name. + * + * @param deploymentName the deploymentName value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withDeploymentName(String deploymentName) { + this.deploymentName = deploymentName; + return this; + } + + /** + * Get the href property: HRef URI. + * + * @return the href value. + */ + public String href() { + return this.href; + } + + /** + * Set the href property: HRef URI. + * + * @param href the href value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the minidump property: Minidump URI. + * + * @return the minidump value. + */ + public String minidump() { + return this.minidump; + } + + /** + * Set the minidump property: Minidump URI. + * + * @param minidump the minidump value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withMinidump(String minidump) { + this.minidump = minidump; + return this; + } + + /** + * Get the isProfileRunning property: Is profile running?. + * + * @return the isProfileRunning value. + */ + public Boolean isProfileRunning() { + return this.isProfileRunning; + } + + /** + * Set the isProfileRunning property: Is profile running?. + * + * @param isProfileRunning the isProfileRunning value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withIsProfileRunning(Boolean isProfileRunning) { + this.isProfileRunning = isProfileRunning; + return this; + } + + /** + * Get the isIisProfileRunning property: Is the IIS Profile running?. + * + * @return the isIisProfileRunning value. + */ + public Boolean isIisProfileRunning() { + return this.isIisProfileRunning; + } + + /** + * Set the isIisProfileRunning property: Is the IIS Profile running?. + * + * @param isIisProfileRunning the isIisProfileRunning value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withIsIisProfileRunning(Boolean isIisProfileRunning) { + this.isIisProfileRunning = isIisProfileRunning; + return this; + } + + /** + * Get the iisProfileTimeoutInSeconds property: IIS Profile timeout (seconds). + * + * @return the iisProfileTimeoutInSeconds value. + */ + public Double iisProfileTimeoutInSeconds() { + return this.iisProfileTimeoutInSeconds; + } + + /** + * Set the iisProfileTimeoutInSeconds property: IIS Profile timeout (seconds). + * + * @param iisProfileTimeoutInSeconds the iisProfileTimeoutInSeconds value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withIisProfileTimeoutInSeconds(Double iisProfileTimeoutInSeconds) { + this.iisProfileTimeoutInSeconds = iisProfileTimeoutInSeconds; + return this; + } + + /** + * Get the parent property: Parent process. + * + * @return the parent value. + */ + public String parent() { + return this.parent; + } + + /** + * Set the parent property: Parent process. + * + * @param parent the parent value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withParent(String parent) { + this.parent = parent; + return this; + } + + /** + * Get the children property: Child process list. + * + * @return the children value. + */ + public List children() { + return this.children; + } + + /** + * Set the children property: Child process list. + * + * @param children the children value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withChildren(List children) { + this.children = children; + return this; + } + + /** + * Get the threads property: Thread list. + * + * @return the threads value. + */ + public List threads() { + return this.threads; + } + + /** + * Set the threads property: Thread list. + * + * @param threads the threads value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withThreads(List threads) { + this.threads = threads; + return this; + } + + /** + * Get the openFileHandles property: List of open files. + * + * @return the openFileHandles value. + */ + public List openFileHandles() { + return this.openFileHandles; + } + + /** + * Set the openFileHandles property: List of open files. + * + * @param openFileHandles the openFileHandles value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withOpenFileHandles(List openFileHandles) { + this.openFileHandles = openFileHandles; + return this; + } + + /** + * Get the modules property: List of modules. + * + * @return the modules value. + */ + public List modules() { + return this.modules; + } + + /** + * Set the modules property: List of modules. + * + * @param modules the modules value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withModules(List modules) { + this.modules = modules; + return this; + } + + /** + * Get the fileName property: File name of this process. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * Set the fileName property: File name of this process. + * + * @param fileName the fileName value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get the commandLine property: Command line. + * + * @return the commandLine value. + */ + public String commandLine() { + return this.commandLine; + } + + /** + * Set the commandLine property: Command line. + * + * @param commandLine the commandLine value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withCommandLine(String commandLine) { + this.commandLine = commandLine; + return this; + } + + /** + * Get the username property: User name. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: User name. + * + * @param username the username value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the handleCount property: Handle count. + * + * @return the handleCount value. + */ + public Integer handleCount() { + return this.handleCount; + } + + /** + * Set the handleCount property: Handle count. + * + * @param handleCount the handleCount value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withHandleCount(Integer handleCount) { + this.handleCount = handleCount; + return this; + } + + /** + * Get the moduleCount property: Module count. + * + * @return the moduleCount value. + */ + public Integer moduleCount() { + return this.moduleCount; + } + + /** + * Set the moduleCount property: Module count. + * + * @param moduleCount the moduleCount value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withModuleCount(Integer moduleCount) { + this.moduleCount = moduleCount; + return this; + } + + /** + * Get the threadCount property: Thread count. + * + * @return the threadCount value. + */ + public Integer threadCount() { + return this.threadCount; + } + + /** + * Set the threadCount property: Thread count. + * + * @param threadCount the threadCount value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withThreadCount(Integer threadCount) { + this.threadCount = threadCount; + return this; + } + + /** + * Get the startTime property: Start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time. + * + * @param startTime the startTime value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the totalCpuTime property: Total CPU time. + * + * @return the totalCpuTime value. + */ + public String totalCpuTime() { + return this.totalCpuTime; + } + + /** + * Set the totalCpuTime property: Total CPU time. + * + * @param totalCpuTime the totalCpuTime value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withTotalCpuTime(String totalCpuTime) { + this.totalCpuTime = totalCpuTime; + return this; + } + + /** + * Get the userCpuTime property: User CPU time. + * + * @return the userCpuTime value. + */ + public String userCpuTime() { + return this.userCpuTime; + } + + /** + * Set the userCpuTime property: User CPU time. + * + * @param userCpuTime the userCpuTime value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withUserCpuTime(String userCpuTime) { + this.userCpuTime = userCpuTime; + return this; + } + + /** + * Get the privilegedCpuTime property: Privileged CPU time. + * + * @return the privilegedCpuTime value. + */ + public String privilegedCpuTime() { + return this.privilegedCpuTime; + } + + /** + * Set the privilegedCpuTime property: Privileged CPU time. + * + * @param privilegedCpuTime the privilegedCpuTime value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withPrivilegedCpuTime(String privilegedCpuTime) { + this.privilegedCpuTime = privilegedCpuTime; + return this; + } + + /** + * Get the workingSet property: Working set. + * + * @return the workingSet value. + */ + public Long workingSet() { + return this.workingSet; + } + + /** + * Set the workingSet property: Working set. + * + * @param workingSet the workingSet value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withWorkingSet(Long workingSet) { + this.workingSet = workingSet; + return this; + } + + /** + * Get the peakWorkingSet property: Peak working set. + * + * @return the peakWorkingSet value. + */ + public Long peakWorkingSet() { + return this.peakWorkingSet; + } + + /** + * Set the peakWorkingSet property: Peak working set. + * + * @param peakWorkingSet the peakWorkingSet value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withPeakWorkingSet(Long peakWorkingSet) { + this.peakWorkingSet = peakWorkingSet; + return this; + } + + /** + * Get the privateMemory property: Private memory size. + * + * @return the privateMemory value. + */ + public Long privateMemory() { + return this.privateMemory; + } + + /** + * Set the privateMemory property: Private memory size. + * + * @param privateMemory the privateMemory value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withPrivateMemory(Long privateMemory) { + this.privateMemory = privateMemory; + return this; + } + + /** + * Get the virtualMemory property: Virtual memory size. + * + * @return the virtualMemory value. + */ + public Long virtualMemory() { + return this.virtualMemory; + } + + /** + * Set the virtualMemory property: Virtual memory size. + * + * @param virtualMemory the virtualMemory value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withVirtualMemory(Long virtualMemory) { + this.virtualMemory = virtualMemory; + return this; + } + + /** + * Get the peakVirtualMemory property: Peak virtual memory usage. + * + * @return the peakVirtualMemory value. + */ + public Long peakVirtualMemory() { + return this.peakVirtualMemory; + } + + /** + * Set the peakVirtualMemory property: Peak virtual memory usage. + * + * @param peakVirtualMemory the peakVirtualMemory value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withPeakVirtualMemory(Long peakVirtualMemory) { + this.peakVirtualMemory = peakVirtualMemory; + return this; + } + + /** + * Get the pagedSystemMemory property: Paged system memory. + * + * @return the pagedSystemMemory value. + */ + public Long pagedSystemMemory() { + return this.pagedSystemMemory; + } + + /** + * Set the pagedSystemMemory property: Paged system memory. + * + * @param pagedSystemMemory the pagedSystemMemory value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withPagedSystemMemory(Long pagedSystemMemory) { + this.pagedSystemMemory = pagedSystemMemory; + return this; + } + + /** + * Get the nonPagedSystemMemory property: Non-paged system memory. + * + * @return the nonPagedSystemMemory value. + */ + public Long nonPagedSystemMemory() { + return this.nonPagedSystemMemory; + } + + /** + * Set the nonPagedSystemMemory property: Non-paged system memory. + * + * @param nonPagedSystemMemory the nonPagedSystemMemory value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withNonPagedSystemMemory(Long nonPagedSystemMemory) { + this.nonPagedSystemMemory = nonPagedSystemMemory; + return this; + } + + /** + * Get the pagedMemory property: Paged memory. + * + * @return the pagedMemory value. + */ + public Long pagedMemory() { + return this.pagedMemory; + } + + /** + * Set the pagedMemory property: Paged memory. + * + * @param pagedMemory the pagedMemory value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withPagedMemory(Long pagedMemory) { + this.pagedMemory = pagedMemory; + return this; + } + + /** + * Get the peakPagedMemory property: Peak paged memory. + * + * @return the peakPagedMemory value. + */ + public Long peakPagedMemory() { + return this.peakPagedMemory; + } + + /** + * Set the peakPagedMemory property: Peak paged memory. + * + * @param peakPagedMemory the peakPagedMemory value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withPeakPagedMemory(Long peakPagedMemory) { + this.peakPagedMemory = peakPagedMemory; + return this; + } + + /** + * Get the timestamp property: Time stamp. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: Time stamp. + * + * @param timestamp the timestamp value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the environmentVariables property: List of environment variables. + * + * @return the environmentVariables value. + */ + public Map environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: List of environment variables. + * + * @param environmentVariables the environmentVariables value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withEnvironmentVariables(Map environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the isScmSite property: Is this the SCM site?. + * + * @return the isScmSite value. + */ + public Boolean isScmSite() { + return this.isScmSite; + } + + /** + * Set the isScmSite property: Is this the SCM site?. + * + * @param isScmSite the isScmSite value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withIsScmSite(Boolean isScmSite) { + this.isScmSite = isScmSite; + return this; + } + + /** + * Get the isWebjob property: Is this a Web Job?. + * + * @return the isWebjob value. + */ + public Boolean isWebjob() { + return this.isWebjob; + } + + /** + * Set the isWebjob property: Is this a Web Job?. + * + * @param isWebjob the isWebjob value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withIsWebjob(Boolean isWebjob) { + this.isWebjob = isWebjob; + return this; + } + + /** + * Get the description property: Description of process. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of process. + * + * @param description the description value to set. + * @return the ProcessInfoProperties object itself. + */ + public ProcessInfoProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (threads() != null) { + threads().forEach(e -> e.validate()); + } + if (modules() != null) { + modules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessModuleInfoInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessModuleInfoInner.java new file mode 100644 index 0000000000000..aa7b2fb8b0f25 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessModuleInfoInner.java @@ -0,0 +1,305 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Process Module Information. */ +@Fluent +public final class ProcessModuleInfoInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessModuleInfoInner.class); + + /* + * ProcessModuleInfo resource specific properties + */ + @JsonProperty(value = "properties") + private ProcessModuleInfoProperties innerProperties; + + /** + * Get the innerProperties property: ProcessModuleInfo resource specific properties. + * + * @return the innerProperties value. + */ + private ProcessModuleInfoProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ProcessModuleInfoInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the baseAddress property: Base address. Used as module identifier in ARM resource URI. + * + * @return the baseAddress value. + */ + public String baseAddress() { + return this.innerProperties() == null ? null : this.innerProperties().baseAddress(); + } + + /** + * Set the baseAddress property: Base address. Used as module identifier in ARM resource URI. + * + * @param baseAddress the baseAddress value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withBaseAddress(String baseAddress) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withBaseAddress(baseAddress); + return this; + } + + /** + * Get the fileName property: File name. + * + * @return the fileName value. + */ + public String fileName() { + return this.innerProperties() == null ? null : this.innerProperties().fileName(); + } + + /** + * Set the fileName property: File name. + * + * @param fileName the fileName value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileName(String fileName) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withFileName(fileName); + return this; + } + + /** + * Get the href property: HRef URI. + * + * @return the href value. + */ + public String href() { + return this.innerProperties() == null ? null : this.innerProperties().href(); + } + + /** + * Set the href property: HRef URI. + * + * @param href the href value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withHref(String href) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withHref(href); + return this; + } + + /** + * Get the filePath property: File path. + * + * @return the filePath value. + */ + public String filePath() { + return this.innerProperties() == null ? null : this.innerProperties().filePath(); + } + + /** + * Set the filePath property: File path. + * + * @param filePath the filePath value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFilePath(String filePath) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withFilePath(filePath); + return this; + } + + /** + * Get the moduleMemorySize property: Module memory size. + * + * @return the moduleMemorySize value. + */ + public Integer moduleMemorySize() { + return this.innerProperties() == null ? null : this.innerProperties().moduleMemorySize(); + } + + /** + * Set the moduleMemorySize property: Module memory size. + * + * @param moduleMemorySize the moduleMemorySize value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withModuleMemorySize(Integer moduleMemorySize) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withModuleMemorySize(moduleMemorySize); + return this; + } + + /** + * Get the fileVersion property: File version. + * + * @return the fileVersion value. + */ + public String fileVersion() { + return this.innerProperties() == null ? null : this.innerProperties().fileVersion(); + } + + /** + * Set the fileVersion property: File version. + * + * @param fileVersion the fileVersion value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileVersion(String fileVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withFileVersion(fileVersion); + return this; + } + + /** + * Get the fileDescription property: File description. + * + * @return the fileDescription value. + */ + public String fileDescription() { + return this.innerProperties() == null ? null : this.innerProperties().fileDescription(); + } + + /** + * Set the fileDescription property: File description. + * + * @param fileDescription the fileDescription value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withFileDescription(String fileDescription) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withFileDescription(fileDescription); + return this; + } + + /** + * Get the product property: Product name. + * + * @return the product value. + */ + public String product() { + return this.innerProperties() == null ? null : this.innerProperties().product(); + } + + /** + * Set the product property: Product name. + * + * @param product the product value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withProduct(String product) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withProduct(product); + return this; + } + + /** + * Get the productVersion property: Product version. + * + * @return the productVersion value. + */ + public String productVersion() { + return this.innerProperties() == null ? null : this.innerProperties().productVersion(); + } + + /** + * Set the productVersion property: Product version. + * + * @param productVersion the productVersion value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withProductVersion(String productVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withProductVersion(productVersion); + return this; + } + + /** + * Get the isDebug property: Is debug?. + * + * @return the isDebug value. + */ + public Boolean isDebug() { + return this.innerProperties() == null ? null : this.innerProperties().isDebug(); + } + + /** + * Set the isDebug property: Is debug?. + * + * @param isDebug the isDebug value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withIsDebug(Boolean isDebug) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withIsDebug(isDebug); + return this; + } + + /** + * Get the language property: Module language (locale). + * + * @return the language value. + */ + public String language() { + return this.innerProperties() == null ? null : this.innerProperties().language(); + } + + /** + * Set the language property: Module language (locale). + * + * @param language the language value to set. + * @return the ProcessModuleInfoInner object itself. + */ + public ProcessModuleInfoInner withLanguage(String language) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessModuleInfoProperties(); + } + this.innerProperties().withLanguage(language); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessModuleInfoProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessModuleInfoProperties.java new file mode 100644 index 0000000000000..49cbd7ecaddb5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessModuleInfoProperties.java @@ -0,0 +1,310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ProcessModuleInfo resource specific properties. */ +@Fluent +public final class ProcessModuleInfoProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessModuleInfoProperties.class); + + /* + * Base address. Used as module identifier in ARM resource URI. + */ + @JsonProperty(value = "base_address") + private String baseAddress; + + /* + * File name. + */ + @JsonProperty(value = "file_name") + private String fileName; + + /* + * HRef URI. + */ + @JsonProperty(value = "href") + private String href; + + /* + * File path. + */ + @JsonProperty(value = "file_path") + private String filePath; + + /* + * Module memory size. + */ + @JsonProperty(value = "module_memory_size") + private Integer moduleMemorySize; + + /* + * File version. + */ + @JsonProperty(value = "file_version") + private String fileVersion; + + /* + * File description. + */ + @JsonProperty(value = "file_description") + private String fileDescription; + + /* + * Product name. + */ + @JsonProperty(value = "product") + private String product; + + /* + * Product version. + */ + @JsonProperty(value = "product_version") + private String productVersion; + + /* + * Is debug? + */ + @JsonProperty(value = "is_debug") + private Boolean isDebug; + + /* + * Module language (locale). + */ + @JsonProperty(value = "language") + private String language; + + /** + * Get the baseAddress property: Base address. Used as module identifier in ARM resource URI. + * + * @return the baseAddress value. + */ + public String baseAddress() { + return this.baseAddress; + } + + /** + * Set the baseAddress property: Base address. Used as module identifier in ARM resource URI. + * + * @param baseAddress the baseAddress value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withBaseAddress(String baseAddress) { + this.baseAddress = baseAddress; + return this; + } + + /** + * Get the fileName property: File name. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * Set the fileName property: File name. + * + * @param fileName the fileName value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get the href property: HRef URI. + * + * @return the href value. + */ + public String href() { + return this.href; + } + + /** + * Set the href property: HRef URI. + * + * @param href the href value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the filePath property: File path. + * + * @return the filePath value. + */ + public String filePath() { + return this.filePath; + } + + /** + * Set the filePath property: File path. + * + * @param filePath the filePath value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withFilePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * Get the moduleMemorySize property: Module memory size. + * + * @return the moduleMemorySize value. + */ + public Integer moduleMemorySize() { + return this.moduleMemorySize; + } + + /** + * Set the moduleMemorySize property: Module memory size. + * + * @param moduleMemorySize the moduleMemorySize value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withModuleMemorySize(Integer moduleMemorySize) { + this.moduleMemorySize = moduleMemorySize; + return this; + } + + /** + * Get the fileVersion property: File version. + * + * @return the fileVersion value. + */ + public String fileVersion() { + return this.fileVersion; + } + + /** + * Set the fileVersion property: File version. + * + * @param fileVersion the fileVersion value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withFileVersion(String fileVersion) { + this.fileVersion = fileVersion; + return this; + } + + /** + * Get the fileDescription property: File description. + * + * @return the fileDescription value. + */ + public String fileDescription() { + return this.fileDescription; + } + + /** + * Set the fileDescription property: File description. + * + * @param fileDescription the fileDescription value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withFileDescription(String fileDescription) { + this.fileDescription = fileDescription; + return this; + } + + /** + * Get the product property: Product name. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: Product name. + * + * @param product the product value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the productVersion property: Product version. + * + * @return the productVersion value. + */ + public String productVersion() { + return this.productVersion; + } + + /** + * Set the productVersion property: Product version. + * + * @param productVersion the productVersion value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withProductVersion(String productVersion) { + this.productVersion = productVersion; + return this; + } + + /** + * Get the isDebug property: Is debug?. + * + * @return the isDebug value. + */ + public Boolean isDebug() { + return this.isDebug; + } + + /** + * Set the isDebug property: Is debug?. + * + * @param isDebug the isDebug value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withIsDebug(Boolean isDebug) { + this.isDebug = isDebug; + return this; + } + + /** + * Get the language property: Module language (locale). + * + * @return the language value. + */ + public String language() { + return this.language; + } + + /** + * Set the language property: Module language (locale). + * + * @param language the language value to set. + * @return the ProcessModuleInfoProperties object itself. + */ + public ProcessModuleInfoProperties withLanguage(String language) { + this.language = language; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessThreadInfoInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessThreadInfoInner.java new file mode 100644 index 0000000000000..74ed0b8015c1e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessThreadInfoInner.java @@ -0,0 +1,315 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Process Thread Information. */ +@Fluent +public final class ProcessThreadInfoInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessThreadInfoInner.class); + + /* + * ProcessThreadInfo resource specific properties + */ + @JsonProperty(value = "properties") + private ProcessThreadInfoProperties innerProperties; + + /** + * Get the innerProperties property: ProcessThreadInfo resource specific properties. + * + * @return the innerProperties value. + */ + private ProcessThreadInfoProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ProcessThreadInfoInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the identifier property: Site extension ID. + * + * @return the identifier value. + */ + public Integer identifier() { + return this.innerProperties() == null ? null : this.innerProperties().identifier(); + } + + /** + * Get the href property: HRef URI. + * + * @return the href value. + */ + public String href() { + return this.innerProperties() == null ? null : this.innerProperties().href(); + } + + /** + * Set the href property: HRef URI. + * + * @param href the href value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withHref(String href) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withHref(href); + return this; + } + + /** + * Get the process property: Process URI. + * + * @return the process value. + */ + public String process() { + return this.innerProperties() == null ? null : this.innerProperties().process(); + } + + /** + * Set the process property: Process URI. + * + * @param process the process value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withProcess(String process) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withProcess(process); + return this; + } + + /** + * Get the startAddress property: Start address. + * + * @return the startAddress value. + */ + public String startAddress() { + return this.innerProperties() == null ? null : this.innerProperties().startAddress(); + } + + /** + * Set the startAddress property: Start address. + * + * @param startAddress the startAddress value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withStartAddress(String startAddress) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withStartAddress(startAddress); + return this; + } + + /** + * Get the currentPriority property: Current thread priority. + * + * @return the currentPriority value. + */ + public Integer currentPriority() { + return this.innerProperties() == null ? null : this.innerProperties().currentPriority(); + } + + /** + * Set the currentPriority property: Current thread priority. + * + * @param currentPriority the currentPriority value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withCurrentPriority(Integer currentPriority) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withCurrentPriority(currentPriority); + return this; + } + + /** + * Get the priorityLevel property: Thread priority level. + * + * @return the priorityLevel value. + */ + public String priorityLevel() { + return this.innerProperties() == null ? null : this.innerProperties().priorityLevel(); + } + + /** + * Set the priorityLevel property: Thread priority level. + * + * @param priorityLevel the priorityLevel value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withPriorityLevel(String priorityLevel) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withPriorityLevel(priorityLevel); + return this; + } + + /** + * Get the basePriority property: Base priority. + * + * @return the basePriority value. + */ + public Integer basePriority() { + return this.innerProperties() == null ? null : this.innerProperties().basePriority(); + } + + /** + * Set the basePriority property: Base priority. + * + * @param basePriority the basePriority value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withBasePriority(Integer basePriority) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withBasePriority(basePriority); + return this; + } + + /** + * Get the startTime property: Start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.innerProperties() == null ? null : this.innerProperties().startTime(); + } + + /** + * Set the startTime property: Start time. + * + * @param startTime the startTime value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withStartTime(OffsetDateTime startTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withStartTime(startTime); + return this; + } + + /** + * Get the totalProcessorTime property: Total processor time. + * + * @return the totalProcessorTime value. + */ + public String totalProcessorTime() { + return this.innerProperties() == null ? null : this.innerProperties().totalProcessorTime(); + } + + /** + * Set the totalProcessorTime property: Total processor time. + * + * @param totalProcessorTime the totalProcessorTime value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withTotalProcessorTime(String totalProcessorTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withTotalProcessorTime(totalProcessorTime); + return this; + } + + /** + * Get the userProcessorTime property: User processor time. + * + * @return the userProcessorTime value. + */ + public String userProcessorTime() { + return this.innerProperties() == null ? null : this.innerProperties().userProcessorTime(); + } + + /** + * Set the userProcessorTime property: User processor time. + * + * @param userProcessorTime the userProcessorTime value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withUserProcessorTime(String userProcessorTime) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withUserProcessorTime(userProcessorTime); + return this; + } + + /** + * Get the state property: Thread state. + * + * @return the state value. + */ + public String state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Set the state property: Thread state. + * + * @param state the state value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withState(String state) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withState(state); + return this; + } + + /** + * Get the waitReason property: Wait reason. + * + * @return the waitReason value. + */ + public String waitReason() { + return this.innerProperties() == null ? null : this.innerProperties().waitReason(); + } + + /** + * Set the waitReason property: Wait reason. + * + * @param waitReason the waitReason value to set. + * @return the ProcessThreadInfoInner object itself. + */ + public ProcessThreadInfoInner withWaitReason(String waitReason) { + if (this.innerProperties() == null) { + this.innerProperties = new ProcessThreadInfoProperties(); + } + this.innerProperties().withWaitReason(waitReason); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessThreadInfoProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessThreadInfoProperties.java new file mode 100644 index 0000000000000..6f37b0b0e2eba --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ProcessThreadInfoProperties.java @@ -0,0 +1,326 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** ProcessThreadInfo resource specific properties. */ +@Fluent +public final class ProcessThreadInfoProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessThreadInfoProperties.class); + + /* + * Site extension ID. + */ + @JsonProperty(value = "identifier", access = JsonProperty.Access.WRITE_ONLY) + private Integer identifier; + + /* + * HRef URI. + */ + @JsonProperty(value = "href") + private String href; + + /* + * Process URI. + */ + @JsonProperty(value = "process") + private String process; + + /* + * Start address. + */ + @JsonProperty(value = "start_address") + private String startAddress; + + /* + * Current thread priority. + */ + @JsonProperty(value = "current_priority") + private Integer currentPriority; + + /* + * Thread priority level. + */ + @JsonProperty(value = "priority_level") + private String priorityLevel; + + /* + * Base priority. + */ + @JsonProperty(value = "base_priority") + private Integer basePriority; + + /* + * Start time. + */ + @JsonProperty(value = "start_time") + private OffsetDateTime startTime; + + /* + * Total processor time. + */ + @JsonProperty(value = "total_processor_time") + private String totalProcessorTime; + + /* + * User processor time. + */ + @JsonProperty(value = "user_processor_time") + private String userProcessorTime; + + /* + * Thread state. + */ + @JsonProperty(value = "state") + private String state; + + /* + * Wait reason. + */ + @JsonProperty(value = "wait_reason") + private String waitReason; + + /** + * Get the identifier property: Site extension ID. + * + * @return the identifier value. + */ + public Integer identifier() { + return this.identifier; + } + + /** + * Get the href property: HRef URI. + * + * @return the href value. + */ + public String href() { + return this.href; + } + + /** + * Set the href property: HRef URI. + * + * @param href the href value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withHref(String href) { + this.href = href; + return this; + } + + /** + * Get the process property: Process URI. + * + * @return the process value. + */ + public String process() { + return this.process; + } + + /** + * Set the process property: Process URI. + * + * @param process the process value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withProcess(String process) { + this.process = process; + return this; + } + + /** + * Get the startAddress property: Start address. + * + * @return the startAddress value. + */ + public String startAddress() { + return this.startAddress; + } + + /** + * Set the startAddress property: Start address. + * + * @param startAddress the startAddress value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withStartAddress(String startAddress) { + this.startAddress = startAddress; + return this; + } + + /** + * Get the currentPriority property: Current thread priority. + * + * @return the currentPriority value. + */ + public Integer currentPriority() { + return this.currentPriority; + } + + /** + * Set the currentPriority property: Current thread priority. + * + * @param currentPriority the currentPriority value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withCurrentPriority(Integer currentPriority) { + this.currentPriority = currentPriority; + return this; + } + + /** + * Get the priorityLevel property: Thread priority level. + * + * @return the priorityLevel value. + */ + public String priorityLevel() { + return this.priorityLevel; + } + + /** + * Set the priorityLevel property: Thread priority level. + * + * @param priorityLevel the priorityLevel value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withPriorityLevel(String priorityLevel) { + this.priorityLevel = priorityLevel; + return this; + } + + /** + * Get the basePriority property: Base priority. + * + * @return the basePriority value. + */ + public Integer basePriority() { + return this.basePriority; + } + + /** + * Set the basePriority property: Base priority. + * + * @param basePriority the basePriority value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withBasePriority(Integer basePriority) { + this.basePriority = basePriority; + return this; + } + + /** + * Get the startTime property: Start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time. + * + * @param startTime the startTime value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the totalProcessorTime property: Total processor time. + * + * @return the totalProcessorTime value. + */ + public String totalProcessorTime() { + return this.totalProcessorTime; + } + + /** + * Set the totalProcessorTime property: Total processor time. + * + * @param totalProcessorTime the totalProcessorTime value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withTotalProcessorTime(String totalProcessorTime) { + this.totalProcessorTime = totalProcessorTime; + return this; + } + + /** + * Get the userProcessorTime property: User processor time. + * + * @return the userProcessorTime value. + */ + public String userProcessorTime() { + return this.userProcessorTime; + } + + /** + * Set the userProcessorTime property: User processor time. + * + * @param userProcessorTime the userProcessorTime value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withUserProcessorTime(String userProcessorTime) { + this.userProcessorTime = userProcessorTime; + return this; + } + + /** + * Get the state property: Thread state. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Set the state property: Thread state. + * + * @param state the state value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withState(String state) { + this.state = state; + return this; + } + + /** + * Get the waitReason property: Wait reason. + * + * @return the waitReason value. + */ + public String waitReason() { + return this.waitReason; + } + + /** + * Set the waitReason property: Wait reason. + * + * @param waitReason the waitReason value to set. + * @return the ProcessThreadInfoProperties object itself. + */ + public ProcessThreadInfoProperties withWaitReason(String waitReason) { + this.waitReason = waitReason; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PublicCertificateInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PublicCertificateInner.java new file mode 100644 index 0000000000000..f016b5638a828 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PublicCertificateInner.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.PublicCertificateLocation; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Public certificate object. */ +@Fluent +public final class PublicCertificateInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PublicCertificateInner.class); + + /* + * PublicCertificate resource specific properties + */ + @JsonProperty(value = "properties") + private PublicCertificateProperties innerProperties; + + /** + * Get the innerProperties property: PublicCertificate resource specific properties. + * + * @return the innerProperties value. + */ + private PublicCertificateProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public PublicCertificateInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the blob property: Public Certificate byte array. + * + * @return the blob value. + */ + public byte[] blob() { + return this.innerProperties() == null ? new byte[0] : this.innerProperties().blob(); + } + + /** + * Set the blob property: Public Certificate byte array. + * + * @param blob the blob value to set. + * @return the PublicCertificateInner object itself. + */ + public PublicCertificateInner withBlob(byte[] blob) { + if (this.innerProperties() == null) { + this.innerProperties = new PublicCertificateProperties(); + } + this.innerProperties().withBlob(blob); + return this; + } + + /** + * Get the publicCertificateLocation property: Public Certificate Location. + * + * @return the publicCertificateLocation value. + */ + public PublicCertificateLocation publicCertificateLocation() { + return this.innerProperties() == null ? null : this.innerProperties().publicCertificateLocation(); + } + + /** + * Set the publicCertificateLocation property: Public Certificate Location. + * + * @param publicCertificateLocation the publicCertificateLocation value to set. + * @return the PublicCertificateInner object itself. + */ + public PublicCertificateInner withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation) { + if (this.innerProperties() == null) { + this.innerProperties = new PublicCertificateProperties(); + } + this.innerProperties().withPublicCertificateLocation(publicCertificateLocation); + return this; + } + + /** + * Get the thumbprint property: Certificate Thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PublicCertificateProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PublicCertificateProperties.java new file mode 100644 index 0000000000000..475319ccb1128 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PublicCertificateProperties.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.PublicCertificateLocation; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** PublicCertificate resource specific properties. */ +@Fluent +public final class PublicCertificateProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PublicCertificateProperties.class); + + /* + * Public Certificate byte array + */ + @JsonProperty(value = "blob") + private byte[] blob; + + /* + * Public Certificate Location + */ + @JsonProperty(value = "publicCertificateLocation") + private PublicCertificateLocation publicCertificateLocation; + + /* + * Certificate Thumbprint + */ + @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; + + /** + * Get the blob property: Public Certificate byte array. + * + * @return the blob value. + */ + public byte[] blob() { + return CoreUtils.clone(this.blob); + } + + /** + * Set the blob property: Public Certificate byte array. + * + * @param blob the blob value to set. + * @return the PublicCertificateProperties object itself. + */ + public PublicCertificateProperties withBlob(byte[] blob) { + this.blob = CoreUtils.clone(blob); + return this; + } + + /** + * Get the publicCertificateLocation property: Public Certificate Location. + * + * @return the publicCertificateLocation value. + */ + public PublicCertificateLocation publicCertificateLocation() { + return this.publicCertificateLocation; + } + + /** + * Set the publicCertificateLocation property: Public Certificate Location. + * + * @param publicCertificateLocation the publicCertificateLocation value to set. + * @return the PublicCertificateProperties object itself. + */ + public PublicCertificateProperties withPublicCertificateLocation( + PublicCertificateLocation publicCertificateLocation) { + this.publicCertificateLocation = publicCertificateLocation; + return this; + } + + /** + * Get the thumbprint property: Certificate Thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PushSettingsInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PushSettingsInner.java new file mode 100644 index 0000000000000..ccd0c3d6060cb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PushSettingsInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Push settings for the App. */ +@Fluent +public final class PushSettingsInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PushSettingsInner.class); + + /* + * PushSettings resource specific properties + */ + @JsonProperty(value = "properties") + private PushSettingsProperties innerProperties; + + /** + * Get the innerProperties property: PushSettings resource specific properties. + * + * @return the innerProperties value. + */ + private PushSettingsProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public PushSettingsInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the isPushEnabled property: Gets or sets a flag indicating whether the Push endpoint is enabled. + * + * @return the isPushEnabled value. + */ + public Boolean isPushEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().isPushEnabled(); + } + + /** + * Set the isPushEnabled property: Gets or sets a flag indicating whether the Push endpoint is enabled. + * + * @param isPushEnabled the isPushEnabled value to set. + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withIsPushEnabled(Boolean isPushEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new PushSettingsProperties(); + } + this.innerProperties().withIsPushEnabled(isPushEnabled); + return this; + } + + /** + * Get the tagWhitelistJson property: Gets or sets a JSON string containing a list of tags that are whitelisted for + * use by the push registration endpoint. + * + * @return the tagWhitelistJson value. + */ + public String tagWhitelistJson() { + return this.innerProperties() == null ? null : this.innerProperties().tagWhitelistJson(); + } + + /** + * Set the tagWhitelistJson property: Gets or sets a JSON string containing a list of tags that are whitelisted for + * use by the push registration endpoint. + * + * @param tagWhitelistJson the tagWhitelistJson value to set. + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withTagWhitelistJson(String tagWhitelistJson) { + if (this.innerProperties() == null) { + this.innerProperties = new PushSettingsProperties(); + } + this.innerProperties().withTagWhitelistJson(tagWhitelistJson); + return this; + } + + /** + * Get the tagsRequiringAuth property: Gets or sets a JSON string containing a list of tags that require user + * authentication to be used in the push registration endpoint. Tags can consist of alphanumeric characters and the + * following: '_', '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler. + * + * @return the tagsRequiringAuth value. + */ + public String tagsRequiringAuth() { + return this.innerProperties() == null ? null : this.innerProperties().tagsRequiringAuth(); + } + + /** + * Set the tagsRequiringAuth property: Gets or sets a JSON string containing a list of tags that require user + * authentication to be used in the push registration endpoint. Tags can consist of alphanumeric characters and the + * following: '_', '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler. + * + * @param tagsRequiringAuth the tagsRequiringAuth value to set. + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withTagsRequiringAuth(String tagsRequiringAuth) { + if (this.innerProperties() == null) { + this.innerProperties = new PushSettingsProperties(); + } + this.innerProperties().withTagsRequiringAuth(tagsRequiringAuth); + return this; + } + + /** + * Get the dynamicTagsJson property: Gets or sets a JSON string containing a list of dynamic tags that will be + * evaluated from user claims in the push registration endpoint. + * + * @return the dynamicTagsJson value. + */ + public String dynamicTagsJson() { + return this.innerProperties() == null ? null : this.innerProperties().dynamicTagsJson(); + } + + /** + * Set the dynamicTagsJson property: Gets or sets a JSON string containing a list of dynamic tags that will be + * evaluated from user claims in the push registration endpoint. + * + * @param dynamicTagsJson the dynamicTagsJson value to set. + * @return the PushSettingsInner object itself. + */ + public PushSettingsInner withDynamicTagsJson(String dynamicTagsJson) { + if (this.innerProperties() == null) { + this.innerProperties = new PushSettingsProperties(); + } + this.innerProperties().withDynamicTagsJson(dynamicTagsJson); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PushSettingsProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PushSettingsProperties.java new file mode 100644 index 0000000000000..b24ced6c0c697 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PushSettingsProperties.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** PushSettings resource specific properties. */ +@Fluent +public final class PushSettingsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PushSettingsProperties.class); + + /* + * Gets or sets a flag indicating whether the Push endpoint is enabled. + */ + @JsonProperty(value = "isPushEnabled", required = true) + private boolean isPushEnabled; + + /* + * Gets or sets a JSON string containing a list of tags that are + * whitelisted for use by the push registration endpoint. + */ + @JsonProperty(value = "tagWhitelistJson") + private String tagWhitelistJson; + + /* + * Gets or sets a JSON string containing a list of tags that require user + * authentication to be used in the push registration endpoint. + * Tags can consist of alphanumeric characters and the following: + * '_', '@', '#', '.', ':', '-'. + * Validation should be performed at the PushRequestHandler. + */ + @JsonProperty(value = "tagsRequiringAuth") + private String tagsRequiringAuth; + + /* + * Gets or sets a JSON string containing a list of dynamic tags that will + * be evaluated from user claims in the push registration endpoint. + */ + @JsonProperty(value = "dynamicTagsJson") + private String dynamicTagsJson; + + /** + * Get the isPushEnabled property: Gets or sets a flag indicating whether the Push endpoint is enabled. + * + * @return the isPushEnabled value. + */ + public boolean isPushEnabled() { + return this.isPushEnabled; + } + + /** + * Set the isPushEnabled property: Gets or sets a flag indicating whether the Push endpoint is enabled. + * + * @param isPushEnabled the isPushEnabled value to set. + * @return the PushSettingsProperties object itself. + */ + public PushSettingsProperties withIsPushEnabled(boolean isPushEnabled) { + this.isPushEnabled = isPushEnabled; + return this; + } + + /** + * Get the tagWhitelistJson property: Gets or sets a JSON string containing a list of tags that are whitelisted for + * use by the push registration endpoint. + * + * @return the tagWhitelistJson value. + */ + public String tagWhitelistJson() { + return this.tagWhitelistJson; + } + + /** + * Set the tagWhitelistJson property: Gets or sets a JSON string containing a list of tags that are whitelisted for + * use by the push registration endpoint. + * + * @param tagWhitelistJson the tagWhitelistJson value to set. + * @return the PushSettingsProperties object itself. + */ + public PushSettingsProperties withTagWhitelistJson(String tagWhitelistJson) { + this.tagWhitelistJson = tagWhitelistJson; + return this; + } + + /** + * Get the tagsRequiringAuth property: Gets or sets a JSON string containing a list of tags that require user + * authentication to be used in the push registration endpoint. Tags can consist of alphanumeric characters and the + * following: '_', '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler. + * + * @return the tagsRequiringAuth value. + */ + public String tagsRequiringAuth() { + return this.tagsRequiringAuth; + } + + /** + * Set the tagsRequiringAuth property: Gets or sets a JSON string containing a list of tags that require user + * authentication to be used in the push registration endpoint. Tags can consist of alphanumeric characters and the + * following: '_', '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler. + * + * @param tagsRequiringAuth the tagsRequiringAuth value to set. + * @return the PushSettingsProperties object itself. + */ + public PushSettingsProperties withTagsRequiringAuth(String tagsRequiringAuth) { + this.tagsRequiringAuth = tagsRequiringAuth; + return this; + } + + /** + * Get the dynamicTagsJson property: Gets or sets a JSON string containing a list of dynamic tags that will be + * evaluated from user claims in the push registration endpoint. + * + * @return the dynamicTagsJson value. + */ + public String dynamicTagsJson() { + return this.dynamicTagsJson; + } + + /** + * Set the dynamicTagsJson property: Gets or sets a JSON string containing a list of dynamic tags that will be + * evaluated from user claims in the push registration endpoint. + * + * @param dynamicTagsJson the dynamicTagsJson value to set. + * @return the PushSettingsProperties object itself. + */ + public PushSettingsProperties withDynamicTagsJson(String dynamicTagsJson) { + this.dynamicTagsJson = dynamicTagsJson; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationInner.java new file mode 100644 index 0000000000000..46ab7b0f96c2d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationInner.java @@ -0,0 +1,581 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Channels; +import com.azure.resourcemanager.appservice.generated.models.NotificationLevel; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.ResourceScopeType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** Represents a recommendation result generated by the recommendation engine. */ +@Fluent +public final class RecommendationInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationInner.class); + + /* + * Recommendation resource specific properties + */ + @JsonProperty(value = "properties") + private RecommendationProperties innerProperties; + + /** + * Get the innerProperties property: Recommendation resource specific properties. + * + * @return the innerProperties value. + */ + private RecommendationProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public RecommendationInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the creationTime property: Timestamp when this instance was created. + * + * @return the creationTime value. + */ + public OffsetDateTime creationTime() { + return this.innerProperties() == null ? null : this.innerProperties().creationTime(); + } + + /** + * Set the creationTime property: Timestamp when this instance was created. + * + * @param creationTime the creationTime value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withCreationTime(OffsetDateTime creationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withCreationTime(creationTime); + return this; + } + + /** + * Get the recommendationId property: A GUID value that each recommendation object is associated with. + * + * @return the recommendationId value. + */ + public UUID recommendationId() { + return this.innerProperties() == null ? null : this.innerProperties().recommendationId(); + } + + /** + * Set the recommendationId property: A GUID value that each recommendation object is associated with. + * + * @param recommendationId the recommendationId value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRecommendationId(UUID recommendationId) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withRecommendationId(recommendationId); + return this; + } + + /** + * Get the resourceId property: Full ARM resource ID string that this recommendation object is associated with. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.innerProperties() == null ? null : this.innerProperties().resourceId(); + } + + /** + * Set the resourceId property: Full ARM resource ID string that this recommendation object is associated with. + * + * @param resourceId the resourceId value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withResourceId(String resourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withResourceId(resourceId); + return this; + } + + /** + * Get the resourceScope property: Name of a resource type this recommendation applies, e.g. Subscription, + * ServerFarm, Site. + * + * @return the resourceScope value. + */ + public ResourceScopeType resourceScope() { + return this.innerProperties() == null ? null : this.innerProperties().resourceScope(); + } + + /** + * Set the resourceScope property: Name of a resource type this recommendation applies, e.g. Subscription, + * ServerFarm, Site. + * + * @param resourceScope the resourceScope value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withResourceScope(ResourceScopeType resourceScope) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withResourceScope(resourceScope); + return this; + } + + /** + * Get the ruleName property: Unique name of the rule. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.innerProperties() == null ? null : this.innerProperties().ruleName(); + } + + /** + * Set the ruleName property: Unique name of the rule. + * + * @param ruleName the ruleName value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withRuleName(String ruleName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withRuleName(ruleName); + return this; + } + + /** + * Get the displayName property: UI friendly name of the rule (may not be unique). + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: UI friendly name of the rule (may not be unique). + * + * @param displayName the displayName value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the message property: Recommendation text. + * + * @return the message value. + */ + public String message() { + return this.innerProperties() == null ? null : this.innerProperties().message(); + } + + /** + * Set the message property: Recommendation text. + * + * @param message the message value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withMessage(String message) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withMessage(message); + return this; + } + + /** + * Get the level property: Level indicating how critical this recommendation can impact. + * + * @return the level value. + */ + public NotificationLevel level() { + return this.innerProperties() == null ? null : this.innerProperties().level(); + } + + /** + * Set the level property: Level indicating how critical this recommendation can impact. + * + * @param level the level value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withLevel(NotificationLevel level) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withLevel(level); + return this; + } + + /** + * Get the channels property: List of channels that this recommendation can apply. + * + * @return the channels value. + */ + public Channels channels() { + return this.innerProperties() == null ? null : this.innerProperties().channels(); + } + + /** + * Set the channels property: List of channels that this recommendation can apply. + * + * @param channels the channels value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withChannels(Channels channels) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withChannels(channels); + return this; + } + + /** + * Get the categoryTags property: The list of category tags that this recommendation belongs to. + * + * @return the categoryTags value. + */ + public List categoryTags() { + return this.innerProperties() == null ? null : this.innerProperties().categoryTags(); + } + + /** + * Get the actionName property: Name of action recommended by this object. + * + * @return the actionName value. + */ + public String actionName() { + return this.innerProperties() == null ? null : this.innerProperties().actionName(); + } + + /** + * Set the actionName property: Name of action recommended by this object. + * + * @param actionName the actionName value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withActionName(String actionName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withActionName(actionName); + return this; + } + + /** + * Get the enabled property: True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. + * + * @return the enabled value. + */ + public Integer enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. + * + * @param enabled the enabled value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withEnabled(Integer enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the states property: The list of states of this recommendation. If it's null then it should be considered + * "Active". + * + * @return the states value. + */ + public List states() { + return this.innerProperties() == null ? null : this.innerProperties().states(); + } + + /** + * Set the states property: The list of states of this recommendation. If it's null then it should be considered + * "Active". + * + * @param states the states value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withStates(List states) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withStates(states); + return this; + } + + /** + * Get the startTime property: The beginning time in UTC of a range that the recommendation refers to. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.innerProperties() == null ? null : this.innerProperties().startTime(); + } + + /** + * Set the startTime property: The beginning time in UTC of a range that the recommendation refers to. + * + * @param startTime the startTime value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withStartTime(OffsetDateTime startTime) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withStartTime(startTime); + return this; + } + + /** + * Get the endTime property: The end time in UTC of a range that the recommendation refers to. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.innerProperties() == null ? null : this.innerProperties().endTime(); + } + + /** + * Set the endTime property: The end time in UTC of a range that the recommendation refers to. + * + * @param endTime the endTime value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withEndTime(OffsetDateTime endTime) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withEndTime(endTime); + return this; + } + + /** + * Get the nextNotificationTime property: When to notify this recommendation next in UTC. Null means that this will + * never be notified anymore. + * + * @return the nextNotificationTime value. + */ + public OffsetDateTime nextNotificationTime() { + return this.innerProperties() == null ? null : this.innerProperties().nextNotificationTime(); + } + + /** + * Set the nextNotificationTime property: When to notify this recommendation next in UTC. Null means that this will + * never be notified anymore. + * + * @param nextNotificationTime the nextNotificationTime value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNextNotificationTime(OffsetDateTime nextNotificationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withNextNotificationTime(nextNotificationTime); + return this; + } + + /** + * Get the notificationExpirationTime property: Date and time in UTC when this notification expires. + * + * @return the notificationExpirationTime value. + */ + public OffsetDateTime notificationExpirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().notificationExpirationTime(); + } + + /** + * Set the notificationExpirationTime property: Date and time in UTC when this notification expires. + * + * @param notificationExpirationTime the notificationExpirationTime value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNotificationExpirationTime(OffsetDateTime notificationExpirationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withNotificationExpirationTime(notificationExpirationTime); + return this; + } + + /** + * Get the notifiedTime property: Last timestamp in UTC this instance was actually notified. Null means that this + * recommendation hasn't been notified yet. + * + * @return the notifiedTime value. + */ + public OffsetDateTime notifiedTime() { + return this.innerProperties() == null ? null : this.innerProperties().notifiedTime(); + } + + /** + * Set the notifiedTime property: Last timestamp in UTC this instance was actually notified. Null means that this + * recommendation hasn't been notified yet. + * + * @param notifiedTime the notifiedTime value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withNotifiedTime(OffsetDateTime notifiedTime) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withNotifiedTime(notifiedTime); + return this; + } + + /** + * Get the score property: A metric value measured by the rule. + * + * @return the score value. + */ + public Double score() { + return this.innerProperties() == null ? null : this.innerProperties().score(); + } + + /** + * Set the score property: A metric value measured by the rule. + * + * @param score the score value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withScore(Double score) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withScore(score); + return this; + } + + /** + * Get the isDynamic property: True if this is associated with a dynamically added rule. + * + * @return the isDynamic value. + */ + public Boolean isDynamic() { + return this.innerProperties() == null ? null : this.innerProperties().isDynamic(); + } + + /** + * Set the isDynamic property: True if this is associated with a dynamically added rule. + * + * @param isDynamic the isDynamic value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withIsDynamic(Boolean isDynamic) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withIsDynamic(isDynamic); + return this; + } + + /** + * Get the extensionName property: Extension name of the portal if exists. + * + * @return the extensionName value. + */ + public String extensionName() { + return this.innerProperties() == null ? null : this.innerProperties().extensionName(); + } + + /** + * Set the extensionName property: Extension name of the portal if exists. + * + * @param extensionName the extensionName value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withExtensionName(String extensionName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withExtensionName(extensionName); + return this; + } + + /** + * Get the bladeName property: Deep link to a blade on the portal. + * + * @return the bladeName value. + */ + public String bladeName() { + return this.innerProperties() == null ? null : this.innerProperties().bladeName(); + } + + /** + * Set the bladeName property: Deep link to a blade on the portal. + * + * @param bladeName the bladeName value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withBladeName(String bladeName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withBladeName(bladeName); + return this; + } + + /** + * Get the forwardLink property: Forward link to an external document associated with the rule. + * + * @return the forwardLink value. + */ + public String forwardLink() { + return this.innerProperties() == null ? null : this.innerProperties().forwardLink(); + } + + /** + * Set the forwardLink property: Forward link to an external document associated with the rule. + * + * @param forwardLink the forwardLink value to set. + * @return the RecommendationInner object itself. + */ + public RecommendationInner withForwardLink(String forwardLink) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationProperties(); + } + this.innerProperties().withForwardLink(forwardLink); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationProperties.java new file mode 100644 index 0000000000000..aa7ea0ab3c614 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationProperties.java @@ -0,0 +1,631 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Channels; +import com.azure.resourcemanager.appservice.generated.models.NotificationLevel; +import com.azure.resourcemanager.appservice.generated.models.ResourceScopeType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** Recommendation resource specific properties. */ +@Fluent +public final class RecommendationProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationProperties.class); + + /* + * Timestamp when this instance was created. + */ + @JsonProperty(value = "creationTime") + private OffsetDateTime creationTime; + + /* + * A GUID value that each recommendation object is associated with. + */ + @JsonProperty(value = "recommendationId") + private UUID recommendationId; + + /* + * Full ARM resource ID string that this recommendation object is + * associated with. + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * Name of a resource type this recommendation applies, e.g. Subscription, + * ServerFarm, Site. + */ + @JsonProperty(value = "resourceScope") + private ResourceScopeType resourceScope; + + /* + * Unique name of the rule. + */ + @JsonProperty(value = "ruleName") + private String ruleName; + + /* + * UI friendly name of the rule (may not be unique). + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Recommendation text. + */ + @JsonProperty(value = "message") + private String message; + + /* + * Level indicating how critical this recommendation can impact. + */ + @JsonProperty(value = "level") + private NotificationLevel level; + + /* + * List of channels that this recommendation can apply. + */ + @JsonProperty(value = "channels") + private Channels channels; + + /* + * The list of category tags that this recommendation belongs to. + */ + @JsonProperty(value = "categoryTags", access = JsonProperty.Access.WRITE_ONLY) + private List categoryTags; + + /* + * Name of action recommended by this object. + */ + @JsonProperty(value = "actionName") + private String actionName; + + /* + * True if this recommendation is still valid (i.e. "actionable"). False if + * it is invalid. + */ + @JsonProperty(value = "enabled") + private Integer enabled; + + /* + * The list of states of this recommendation. If it's null then it should + * be considered "Active". + */ + @JsonProperty(value = "states") + private List states; + + /* + * The beginning time in UTC of a range that the recommendation refers to. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * The end time in UTC of a range that the recommendation refers to. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * When to notify this recommendation next in UTC. Null means that this + * will never be notified anymore. + */ + @JsonProperty(value = "nextNotificationTime") + private OffsetDateTime nextNotificationTime; + + /* + * Date and time in UTC when this notification expires. + */ + @JsonProperty(value = "notificationExpirationTime") + private OffsetDateTime notificationExpirationTime; + + /* + * Last timestamp in UTC this instance was actually notified. Null means + * that this recommendation hasn't been notified yet. + */ + @JsonProperty(value = "notifiedTime") + private OffsetDateTime notifiedTime; + + /* + * A metric value measured by the rule. + */ + @JsonProperty(value = "score") + private Double score; + + /* + * True if this is associated with a dynamically added rule + */ + @JsonProperty(value = "isDynamic") + private Boolean isDynamic; + + /* + * Extension name of the portal if exists. + */ + @JsonProperty(value = "extensionName") + private String extensionName; + + /* + * Deep link to a blade on the portal. + */ + @JsonProperty(value = "bladeName") + private String bladeName; + + /* + * Forward link to an external document associated with the rule. + */ + @JsonProperty(value = "forwardLink") + private String forwardLink; + + /** + * Get the creationTime property: Timestamp when this instance was created. + * + * @return the creationTime value. + */ + public OffsetDateTime creationTime() { + return this.creationTime; + } + + /** + * Set the creationTime property: Timestamp when this instance was created. + * + * @param creationTime the creationTime value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withCreationTime(OffsetDateTime creationTime) { + this.creationTime = creationTime; + return this; + } + + /** + * Get the recommendationId property: A GUID value that each recommendation object is associated with. + * + * @return the recommendationId value. + */ + public UUID recommendationId() { + return this.recommendationId; + } + + /** + * Set the recommendationId property: A GUID value that each recommendation object is associated with. + * + * @param recommendationId the recommendationId value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withRecommendationId(UUID recommendationId) { + this.recommendationId = recommendationId; + return this; + } + + /** + * Get the resourceId property: Full ARM resource ID string that this recommendation object is associated with. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: Full ARM resource ID string that this recommendation object is associated with. + * + * @param resourceId the resourceId value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the resourceScope property: Name of a resource type this recommendation applies, e.g. Subscription, + * ServerFarm, Site. + * + * @return the resourceScope value. + */ + public ResourceScopeType resourceScope() { + return this.resourceScope; + } + + /** + * Set the resourceScope property: Name of a resource type this recommendation applies, e.g. Subscription, + * ServerFarm, Site. + * + * @param resourceScope the resourceScope value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withResourceScope(ResourceScopeType resourceScope) { + this.resourceScope = resourceScope; + return this; + } + + /** + * Get the ruleName property: Unique name of the rule. + * + * @return the ruleName value. + */ + public String ruleName() { + return this.ruleName; + } + + /** + * Set the ruleName property: Unique name of the rule. + * + * @param ruleName the ruleName value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withRuleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get the displayName property: UI friendly name of the rule (may not be unique). + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: UI friendly name of the rule (may not be unique). + * + * @param displayName the displayName value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the message property: Recommendation text. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Recommendation text. + * + * @param message the message value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the level property: Level indicating how critical this recommendation can impact. + * + * @return the level value. + */ + public NotificationLevel level() { + return this.level; + } + + /** + * Set the level property: Level indicating how critical this recommendation can impact. + * + * @param level the level value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withLevel(NotificationLevel level) { + this.level = level; + return this; + } + + /** + * Get the channels property: List of channels that this recommendation can apply. + * + * @return the channels value. + */ + public Channels channels() { + return this.channels; + } + + /** + * Set the channels property: List of channels that this recommendation can apply. + * + * @param channels the channels value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withChannels(Channels channels) { + this.channels = channels; + return this; + } + + /** + * Get the categoryTags property: The list of category tags that this recommendation belongs to. + * + * @return the categoryTags value. + */ + public List categoryTags() { + return this.categoryTags; + } + + /** + * Get the actionName property: Name of action recommended by this object. + * + * @return the actionName value. + */ + public String actionName() { + return this.actionName; + } + + /** + * Set the actionName property: Name of action recommended by this object. + * + * @param actionName the actionName value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withActionName(String actionName) { + this.actionName = actionName; + return this; + } + + /** + * Get the enabled property: True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. + * + * @return the enabled value. + */ + public Integer enabled() { + return this.enabled; + } + + /** + * Set the enabled property: True if this recommendation is still valid (i.e. "actionable"). False if it is invalid. + * + * @param enabled the enabled value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withEnabled(Integer enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the states property: The list of states of this recommendation. If it's null then it should be considered + * "Active". + * + * @return the states value. + */ + public List states() { + return this.states; + } + + /** + * Set the states property: The list of states of this recommendation. If it's null then it should be considered + * "Active". + * + * @param states the states value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withStates(List states) { + this.states = states; + return this; + } + + /** + * Get the startTime property: The beginning time in UTC of a range that the recommendation refers to. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: The beginning time in UTC of a range that the recommendation refers to. + * + * @param startTime the startTime value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: The end time in UTC of a range that the recommendation refers to. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: The end time in UTC of a range that the recommendation refers to. + * + * @param endTime the endTime value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the nextNotificationTime property: When to notify this recommendation next in UTC. Null means that this will + * never be notified anymore. + * + * @return the nextNotificationTime value. + */ + public OffsetDateTime nextNotificationTime() { + return this.nextNotificationTime; + } + + /** + * Set the nextNotificationTime property: When to notify this recommendation next in UTC. Null means that this will + * never be notified anymore. + * + * @param nextNotificationTime the nextNotificationTime value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withNextNotificationTime(OffsetDateTime nextNotificationTime) { + this.nextNotificationTime = nextNotificationTime; + return this; + } + + /** + * Get the notificationExpirationTime property: Date and time in UTC when this notification expires. + * + * @return the notificationExpirationTime value. + */ + public OffsetDateTime notificationExpirationTime() { + return this.notificationExpirationTime; + } + + /** + * Set the notificationExpirationTime property: Date and time in UTC when this notification expires. + * + * @param notificationExpirationTime the notificationExpirationTime value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withNotificationExpirationTime(OffsetDateTime notificationExpirationTime) { + this.notificationExpirationTime = notificationExpirationTime; + return this; + } + + /** + * Get the notifiedTime property: Last timestamp in UTC this instance was actually notified. Null means that this + * recommendation hasn't been notified yet. + * + * @return the notifiedTime value. + */ + public OffsetDateTime notifiedTime() { + return this.notifiedTime; + } + + /** + * Set the notifiedTime property: Last timestamp in UTC this instance was actually notified. Null means that this + * recommendation hasn't been notified yet. + * + * @param notifiedTime the notifiedTime value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withNotifiedTime(OffsetDateTime notifiedTime) { + this.notifiedTime = notifiedTime; + return this; + } + + /** + * Get the score property: A metric value measured by the rule. + * + * @return the score value. + */ + public Double score() { + return this.score; + } + + /** + * Set the score property: A metric value measured by the rule. + * + * @param score the score value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withScore(Double score) { + this.score = score; + return this; + } + + /** + * Get the isDynamic property: True if this is associated with a dynamically added rule. + * + * @return the isDynamic value. + */ + public Boolean isDynamic() { + return this.isDynamic; + } + + /** + * Set the isDynamic property: True if this is associated with a dynamically added rule. + * + * @param isDynamic the isDynamic value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withIsDynamic(Boolean isDynamic) { + this.isDynamic = isDynamic; + return this; + } + + /** + * Get the extensionName property: Extension name of the portal if exists. + * + * @return the extensionName value. + */ + public String extensionName() { + return this.extensionName; + } + + /** + * Set the extensionName property: Extension name of the portal if exists. + * + * @param extensionName the extensionName value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withExtensionName(String extensionName) { + this.extensionName = extensionName; + return this; + } + + /** + * Get the bladeName property: Deep link to a blade on the portal. + * + * @return the bladeName value. + */ + public String bladeName() { + return this.bladeName; + } + + /** + * Set the bladeName property: Deep link to a blade on the portal. + * + * @param bladeName the bladeName value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withBladeName(String bladeName) { + this.bladeName = bladeName; + return this; + } + + /** + * Get the forwardLink property: Forward link to an external document associated with the rule. + * + * @return the forwardLink value. + */ + public String forwardLink() { + return this.forwardLink; + } + + /** + * Set the forwardLink property: Forward link to an external document associated with the rule. + * + * @param forwardLink the forwardLink value to set. + * @return the RecommendationProperties object itself. + */ + public RecommendationProperties withForwardLink(String forwardLink) { + this.forwardLink = forwardLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationRuleInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationRuleInner.java new file mode 100644 index 0000000000000..a7890e3250c1d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationRuleInner.java @@ -0,0 +1,345 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Channels; +import com.azure.resourcemanager.appservice.generated.models.NotificationLevel; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.UUID; + +/** Represents a recommendation rule that the recommendation engine can perform. */ +@Fluent +public final class RecommendationRuleInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationRuleInner.class); + + /* + * RecommendationRule resource specific properties + */ + @JsonProperty(value = "properties") + private RecommendationRuleProperties innerProperties; + + /** + * Get the innerProperties property: RecommendationRule resource specific properties. + * + * @return the innerProperties value. + */ + private RecommendationRuleProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public RecommendationRuleInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the recommendationName property: Unique name of the rule. + * + * @return the recommendationName value. + */ + public String recommendationName() { + return this.innerProperties() == null ? null : this.innerProperties().recommendationName(); + } + + /** + * Set the recommendationName property: Unique name of the rule. + * + * @param recommendationName the recommendationName value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withRecommendationName(String recommendationName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withRecommendationName(recommendationName); + return this; + } + + /** + * Get the displayName property: UI friendly name of the rule. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Set the displayName property: UI friendly name of the rule. + * + * @param displayName the displayName value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withDisplayName(String displayName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withDisplayName(displayName); + return this; + } + + /** + * Get the message property: Localized name of the rule (Good for UI). + * + * @return the message value. + */ + public String message() { + return this.innerProperties() == null ? null : this.innerProperties().message(); + } + + /** + * Set the message property: Localized name of the rule (Good for UI). + * + * @param message the message value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withMessage(String message) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withMessage(message); + return this; + } + + /** + * Get the recommendationId property: Recommendation ID of an associated recommendation object tied to the rule, if + * exists. If such an object doesn't exist, it is set to null. + * + * @return the recommendationId value. + */ + public UUID recommendationId() { + return this.innerProperties() == null ? null : this.innerProperties().recommendationId(); + } + + /** + * Set the recommendationId property: Recommendation ID of an associated recommendation object tied to the rule, if + * exists. If such an object doesn't exist, it is set to null. + * + * @param recommendationId the recommendationId value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withRecommendationId(UUID recommendationId) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withRecommendationId(recommendationId); + return this; + } + + /** + * Get the description property: Localized detailed description of the rule. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Localized detailed description of the rule. + * + * @param description the description value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the actionName property: Name of action that is recommended by this rule in string. + * + * @return the actionName value. + */ + public String actionName() { + return this.innerProperties() == null ? null : this.innerProperties().actionName(); + } + + /** + * Set the actionName property: Name of action that is recommended by this rule in string. + * + * @param actionName the actionName value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withActionName(String actionName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withActionName(actionName); + return this; + } + + /** + * Get the level property: Level of impact indicating how critical this rule is. + * + * @return the level value. + */ + public NotificationLevel level() { + return this.innerProperties() == null ? null : this.innerProperties().level(); + } + + /** + * Set the level property: Level of impact indicating how critical this rule is. + * + * @param level the level value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withLevel(NotificationLevel level) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withLevel(level); + return this; + } + + /** + * Get the channels property: List of available channels that this rule applies. + * + * @return the channels value. + */ + public Channels channels() { + return this.innerProperties() == null ? null : this.innerProperties().channels(); + } + + /** + * Set the channels property: List of available channels that this rule applies. + * + * @param channels the channels value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withChannels(Channels channels) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withChannels(channels); + return this; + } + + /** + * Get the categoryTags property: The list of category tags that this recommendation rule belongs to. + * + * @return the categoryTags value. + */ + public List categoryTags() { + return this.innerProperties() == null ? null : this.innerProperties().categoryTags(); + } + + /** + * Get the isDynamic property: True if this is associated with a dynamically added rule. + * + * @return the isDynamic value. + */ + public Boolean isDynamic() { + return this.innerProperties() == null ? null : this.innerProperties().isDynamic(); + } + + /** + * Set the isDynamic property: True if this is associated with a dynamically added rule. + * + * @param isDynamic the isDynamic value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withIsDynamic(Boolean isDynamic) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withIsDynamic(isDynamic); + return this; + } + + /** + * Get the extensionName property: Extension name of the portal if exists. Applicable to dynamic rule only. + * + * @return the extensionName value. + */ + public String extensionName() { + return this.innerProperties() == null ? null : this.innerProperties().extensionName(); + } + + /** + * Set the extensionName property: Extension name of the portal if exists. Applicable to dynamic rule only. + * + * @param extensionName the extensionName value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withExtensionName(String extensionName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withExtensionName(extensionName); + return this; + } + + /** + * Get the bladeName property: Deep link to a blade on the portal. Applicable to dynamic rule only. + * + * @return the bladeName value. + */ + public String bladeName() { + return this.innerProperties() == null ? null : this.innerProperties().bladeName(); + } + + /** + * Set the bladeName property: Deep link to a blade on the portal. Applicable to dynamic rule only. + * + * @param bladeName the bladeName value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withBladeName(String bladeName) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withBladeName(bladeName); + return this; + } + + /** + * Get the forwardLink property: Forward link to an external document associated with the rule. Applicable to + * dynamic rule only. + * + * @return the forwardLink value. + */ + public String forwardLink() { + return this.innerProperties() == null ? null : this.innerProperties().forwardLink(); + } + + /** + * Set the forwardLink property: Forward link to an external document associated with the rule. Applicable to + * dynamic rule only. + * + * @param forwardLink the forwardLink value to set. + * @return the RecommendationRuleInner object itself. + */ + public RecommendationRuleInner withForwardLink(String forwardLink) { + if (this.innerProperties() == null) { + this.innerProperties = new RecommendationRuleProperties(); + } + this.innerProperties().withForwardLink(forwardLink); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationRuleProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationRuleProperties.java new file mode 100644 index 0000000000000..bf4ea186d31e9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RecommendationRuleProperties.java @@ -0,0 +1,362 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.Channels; +import com.azure.resourcemanager.appservice.generated.models.NotificationLevel; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.UUID; + +/** RecommendationRule resource specific properties. */ +@Fluent +public final class RecommendationRuleProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationRuleProperties.class); + + /* + * Unique name of the rule. + */ + @JsonProperty(value = "recommendationName") + private String recommendationName; + + /* + * UI friendly name of the rule. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Localized name of the rule (Good for UI). + */ + @JsonProperty(value = "message") + private String message; + + /* + * Recommendation ID of an associated recommendation object tied to the + * rule, if exists. + * If such an object doesn't exist, it is set to null. + */ + @JsonProperty(value = "recommendationId") + private UUID recommendationId; + + /* + * Localized detailed description of the rule. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Name of action that is recommended by this rule in string. + */ + @JsonProperty(value = "actionName") + private String actionName; + + /* + * Level of impact indicating how critical this rule is. + */ + @JsonProperty(value = "level") + private NotificationLevel level; + + /* + * List of available channels that this rule applies. + */ + @JsonProperty(value = "channels") + private Channels channels; + + /* + * The list of category tags that this recommendation rule belongs to. + */ + @JsonProperty(value = "categoryTags", access = JsonProperty.Access.WRITE_ONLY) + private List categoryTags; + + /* + * True if this is associated with a dynamically added rule + */ + @JsonProperty(value = "isDynamic") + private Boolean isDynamic; + + /* + * Extension name of the portal if exists. Applicable to dynamic rule only. + */ + @JsonProperty(value = "extensionName") + private String extensionName; + + /* + * Deep link to a blade on the portal. Applicable to dynamic rule only. + */ + @JsonProperty(value = "bladeName") + private String bladeName; + + /* + * Forward link to an external document associated with the rule. + * Applicable to dynamic rule only. + */ + @JsonProperty(value = "forwardLink") + private String forwardLink; + + /** + * Get the recommendationName property: Unique name of the rule. + * + * @return the recommendationName value. + */ + public String recommendationName() { + return this.recommendationName; + } + + /** + * Set the recommendationName property: Unique name of the rule. + * + * @param recommendationName the recommendationName value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withRecommendationName(String recommendationName) { + this.recommendationName = recommendationName; + return this; + } + + /** + * Get the displayName property: UI friendly name of the rule. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: UI friendly name of the rule. + * + * @param displayName the displayName value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the message property: Localized name of the rule (Good for UI). + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Localized name of the rule (Good for UI). + * + * @param message the message value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the recommendationId property: Recommendation ID of an associated recommendation object tied to the rule, if + * exists. If such an object doesn't exist, it is set to null. + * + * @return the recommendationId value. + */ + public UUID recommendationId() { + return this.recommendationId; + } + + /** + * Set the recommendationId property: Recommendation ID of an associated recommendation object tied to the rule, if + * exists. If such an object doesn't exist, it is set to null. + * + * @param recommendationId the recommendationId value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withRecommendationId(UUID recommendationId) { + this.recommendationId = recommendationId; + return this; + } + + /** + * Get the description property: Localized detailed description of the rule. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Localized detailed description of the rule. + * + * @param description the description value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionName property: Name of action that is recommended by this rule in string. + * + * @return the actionName value. + */ + public String actionName() { + return this.actionName; + } + + /** + * Set the actionName property: Name of action that is recommended by this rule in string. + * + * @param actionName the actionName value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withActionName(String actionName) { + this.actionName = actionName; + return this; + } + + /** + * Get the level property: Level of impact indicating how critical this rule is. + * + * @return the level value. + */ + public NotificationLevel level() { + return this.level; + } + + /** + * Set the level property: Level of impact indicating how critical this rule is. + * + * @param level the level value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withLevel(NotificationLevel level) { + this.level = level; + return this; + } + + /** + * Get the channels property: List of available channels that this rule applies. + * + * @return the channels value. + */ + public Channels channels() { + return this.channels; + } + + /** + * Set the channels property: List of available channels that this rule applies. + * + * @param channels the channels value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withChannels(Channels channels) { + this.channels = channels; + return this; + } + + /** + * Get the categoryTags property: The list of category tags that this recommendation rule belongs to. + * + * @return the categoryTags value. + */ + public List categoryTags() { + return this.categoryTags; + } + + /** + * Get the isDynamic property: True if this is associated with a dynamically added rule. + * + * @return the isDynamic value. + */ + public Boolean isDynamic() { + return this.isDynamic; + } + + /** + * Set the isDynamic property: True if this is associated with a dynamically added rule. + * + * @param isDynamic the isDynamic value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withIsDynamic(Boolean isDynamic) { + this.isDynamic = isDynamic; + return this; + } + + /** + * Get the extensionName property: Extension name of the portal if exists. Applicable to dynamic rule only. + * + * @return the extensionName value. + */ + public String extensionName() { + return this.extensionName; + } + + /** + * Set the extensionName property: Extension name of the portal if exists. Applicable to dynamic rule only. + * + * @param extensionName the extensionName value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withExtensionName(String extensionName) { + this.extensionName = extensionName; + return this; + } + + /** + * Get the bladeName property: Deep link to a blade on the portal. Applicable to dynamic rule only. + * + * @return the bladeName value. + */ + public String bladeName() { + return this.bladeName; + } + + /** + * Set the bladeName property: Deep link to a blade on the portal. Applicable to dynamic rule only. + * + * @param bladeName the bladeName value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withBladeName(String bladeName) { + this.bladeName = bladeName; + return this; + } + + /** + * Get the forwardLink property: Forward link to an external document associated with the rule. Applicable to + * dynamic rule only. + * + * @return the forwardLink value. + */ + public String forwardLink() { + return this.forwardLink; + } + + /** + * Set the forwardLink property: Forward link to an external document associated with the rule. Applicable to + * dynamic rule only. + * + * @param forwardLink the forwardLink value to set. + * @return the RecommendationRuleProperties object itself. + */ + public RecommendationRuleProperties withForwardLink(String forwardLink) { + this.forwardLink = forwardLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ReissueCertificateOrderRequestProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ReissueCertificateOrderRequestProperties.java new file mode 100644 index 0000000000000..e6717ef5ac093 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ReissueCertificateOrderRequestProperties.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ReissueCertificateOrderRequest resource specific properties. */ +@Fluent +public final class ReissueCertificateOrderRequestProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ReissueCertificateOrderRequestProperties.class); + + /* + * Certificate Key Size. + */ + @JsonProperty(value = "keySize") + private Integer keySize; + + /* + * Delay in hours to revoke existing certificate after the new certificate + * is issued. + */ + @JsonProperty(value = "delayExistingRevokeInHours") + private Integer delayExistingRevokeInHours; + + /* + * Csr to be used for re-key operation. + */ + @JsonProperty(value = "csr") + private String csr; + + /* + * Should we change the ASC type (from managed private key to external + * private key and vice versa). + */ + @JsonProperty(value = "isPrivateKeyExternal") + private Boolean isPrivateKeyExternal; + + /** + * Get the keySize property: Certificate Key Size. + * + * @return the keySize value. + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set the keySize property: Certificate Key Size. + * + * @param keySize the keySize value to set. + * @return the ReissueCertificateOrderRequestProperties object itself. + */ + public ReissueCertificateOrderRequestProperties withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get the delayExistingRevokeInHours property: Delay in hours to revoke existing certificate after the new + * certificate is issued. + * + * @return the delayExistingRevokeInHours value. + */ + public Integer delayExistingRevokeInHours() { + return this.delayExistingRevokeInHours; + } + + /** + * Set the delayExistingRevokeInHours property: Delay in hours to revoke existing certificate after the new + * certificate is issued. + * + * @param delayExistingRevokeInHours the delayExistingRevokeInHours value to set. + * @return the ReissueCertificateOrderRequestProperties object itself. + */ + public ReissueCertificateOrderRequestProperties withDelayExistingRevokeInHours(Integer delayExistingRevokeInHours) { + this.delayExistingRevokeInHours = delayExistingRevokeInHours; + return this; + } + + /** + * Get the csr property: Csr to be used for re-key operation. + * + * @return the csr value. + */ + public String csr() { + return this.csr; + } + + /** + * Set the csr property: Csr to be used for re-key operation. + * + * @param csr the csr value to set. + * @return the ReissueCertificateOrderRequestProperties object itself. + */ + public ReissueCertificateOrderRequestProperties withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get the isPrivateKeyExternal property: Should we change the ASC type (from managed private key to external + * private key and vice versa). + * + * @return the isPrivateKeyExternal value. + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Set the isPrivateKeyExternal property: Should we change the ASC type (from managed private key to external + * private key and vice versa). + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set. + * @return the ReissueCertificateOrderRequestProperties object itself. + */ + public ReissueCertificateOrderRequestProperties withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + this.isPrivateKeyExternal = isPrivateKeyExternal; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RelayServiceConnectionEntityInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RelayServiceConnectionEntityInner.java new file mode 100644 index 0000000000000..83d1f4d833018 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RelayServiceConnectionEntityInner.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Hybrid Connection for an App Service app. */ +@Fluent +public final class RelayServiceConnectionEntityInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RelayServiceConnectionEntityInner.class); + + /* + * RelayServiceConnectionEntity resource specific properties + */ + @JsonProperty(value = "properties") + private RelayServiceConnectionEntityProperties innerProperties; + + /** + * Get the innerProperties property: RelayServiceConnectionEntity resource specific properties. + * + * @return the innerProperties value. + */ + private RelayServiceConnectionEntityProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public RelayServiceConnectionEntityInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the entityName property: The entityName property. + * + * @return the entityName value. + */ + public String entityName() { + return this.innerProperties() == null ? null : this.innerProperties().entityName(); + } + + /** + * Set the entityName property: The entityName property. + * + * @param entityName the entityName value to set. + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withEntityName(String entityName) { + if (this.innerProperties() == null) { + this.innerProperties = new RelayServiceConnectionEntityProperties(); + } + this.innerProperties().withEntityName(entityName); + return this; + } + + /** + * Get the entityConnectionString property: The entityConnectionString property. + * + * @return the entityConnectionString value. + */ + public String entityConnectionString() { + return this.innerProperties() == null ? null : this.innerProperties().entityConnectionString(); + } + + /** + * Set the entityConnectionString property: The entityConnectionString property. + * + * @param entityConnectionString the entityConnectionString value to set. + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withEntityConnectionString(String entityConnectionString) { + if (this.innerProperties() == null) { + this.innerProperties = new RelayServiceConnectionEntityProperties(); + } + this.innerProperties().withEntityConnectionString(entityConnectionString); + return this; + } + + /** + * Get the resourceType property: The resourceType property. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.innerProperties() == null ? null : this.innerProperties().resourceType(); + } + + /** + * Set the resourceType property: The resourceType property. + * + * @param resourceType the resourceType value to set. + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withResourceType(String resourceType) { + if (this.innerProperties() == null) { + this.innerProperties = new RelayServiceConnectionEntityProperties(); + } + this.innerProperties().withResourceType(resourceType); + return this; + } + + /** + * Get the resourceConnectionString property: The resourceConnectionString property. + * + * @return the resourceConnectionString value. + */ + public String resourceConnectionString() { + return this.innerProperties() == null ? null : this.innerProperties().resourceConnectionString(); + } + + /** + * Set the resourceConnectionString property: The resourceConnectionString property. + * + * @param resourceConnectionString the resourceConnectionString value to set. + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withResourceConnectionString(String resourceConnectionString) { + if (this.innerProperties() == null) { + this.innerProperties = new RelayServiceConnectionEntityProperties(); + } + this.innerProperties().withResourceConnectionString(resourceConnectionString); + return this; + } + + /** + * Get the hostname property: The hostname property. + * + * @return the hostname value. + */ + public String hostname() { + return this.innerProperties() == null ? null : this.innerProperties().hostname(); + } + + /** + * Set the hostname property: The hostname property. + * + * @param hostname the hostname value to set. + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withHostname(String hostname) { + if (this.innerProperties() == null) { + this.innerProperties = new RelayServiceConnectionEntityProperties(); + } + this.innerProperties().withHostname(hostname); + return this; + } + + /** + * Get the port property: The port property. + * + * @return the port value. + */ + public Integer port() { + return this.innerProperties() == null ? null : this.innerProperties().port(); + } + + /** + * Set the port property: The port property. + * + * @param port the port value to set. + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withPort(Integer port) { + if (this.innerProperties() == null) { + this.innerProperties = new RelayServiceConnectionEntityProperties(); + } + this.innerProperties().withPort(port); + return this; + } + + /** + * Get the biztalkUri property: The biztalkUri property. + * + * @return the biztalkUri value. + */ + public String biztalkUri() { + return this.innerProperties() == null ? null : this.innerProperties().biztalkUri(); + } + + /** + * Set the biztalkUri property: The biztalkUri property. + * + * @param biztalkUri the biztalkUri value to set. + * @return the RelayServiceConnectionEntityInner object itself. + */ + public RelayServiceConnectionEntityInner withBiztalkUri(String biztalkUri) { + if (this.innerProperties() == null) { + this.innerProperties = new RelayServiceConnectionEntityProperties(); + } + this.innerProperties().withBiztalkUri(biztalkUri); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RelayServiceConnectionEntityProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RelayServiceConnectionEntityProperties.java new file mode 100644 index 0000000000000..ba0ddfb83c07e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RelayServiceConnectionEntityProperties.java @@ -0,0 +1,206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** RelayServiceConnectionEntity resource specific properties. */ +@Fluent +public final class RelayServiceConnectionEntityProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RelayServiceConnectionEntityProperties.class); + + /* + * The entityName property. + */ + @JsonProperty(value = "entityName") + private String entityName; + + /* + * The entityConnectionString property. + */ + @JsonProperty(value = "entityConnectionString") + private String entityConnectionString; + + /* + * The resourceType property. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /* + * The resourceConnectionString property. + */ + @JsonProperty(value = "resourceConnectionString") + private String resourceConnectionString; + + /* + * The hostname property. + */ + @JsonProperty(value = "hostname") + private String hostname; + + /* + * The port property. + */ + @JsonProperty(value = "port") + private Integer port; + + /* + * The biztalkUri property. + */ + @JsonProperty(value = "biztalkUri") + private String biztalkUri; + + /** + * Get the entityName property: The entityName property. + * + * @return the entityName value. + */ + public String entityName() { + return this.entityName; + } + + /** + * Set the entityName property: The entityName property. + * + * @param entityName the entityName value to set. + * @return the RelayServiceConnectionEntityProperties object itself. + */ + public RelayServiceConnectionEntityProperties withEntityName(String entityName) { + this.entityName = entityName; + return this; + } + + /** + * Get the entityConnectionString property: The entityConnectionString property. + * + * @return the entityConnectionString value. + */ + public String entityConnectionString() { + return this.entityConnectionString; + } + + /** + * Set the entityConnectionString property: The entityConnectionString property. + * + * @param entityConnectionString the entityConnectionString value to set. + * @return the RelayServiceConnectionEntityProperties object itself. + */ + public RelayServiceConnectionEntityProperties withEntityConnectionString(String entityConnectionString) { + this.entityConnectionString = entityConnectionString; + return this; + } + + /** + * Get the resourceType property: The resourceType property. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: The resourceType property. + * + * @param resourceType the resourceType value to set. + * @return the RelayServiceConnectionEntityProperties object itself. + */ + public RelayServiceConnectionEntityProperties withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the resourceConnectionString property: The resourceConnectionString property. + * + * @return the resourceConnectionString value. + */ + public String resourceConnectionString() { + return this.resourceConnectionString; + } + + /** + * Set the resourceConnectionString property: The resourceConnectionString property. + * + * @param resourceConnectionString the resourceConnectionString value to set. + * @return the RelayServiceConnectionEntityProperties object itself. + */ + public RelayServiceConnectionEntityProperties withResourceConnectionString(String resourceConnectionString) { + this.resourceConnectionString = resourceConnectionString; + return this; + } + + /** + * Get the hostname property: The hostname property. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: The hostname property. + * + * @param hostname the hostname value to set. + * @return the RelayServiceConnectionEntityProperties object itself. + */ + public RelayServiceConnectionEntityProperties withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the port property: The port property. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: The port property. + * + * @param port the port value to set. + * @return the RelayServiceConnectionEntityProperties object itself. + */ + public RelayServiceConnectionEntityProperties withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the biztalkUri property: The biztalkUri property. + * + * @return the biztalkUri value. + */ + public String biztalkUri() { + return this.biztalkUri; + } + + /** + * Set the biztalkUri property: The biztalkUri property. + * + * @param biztalkUri the biztalkUri value to set. + * @return the RelayServiceConnectionEntityProperties object itself. + */ + public RelayServiceConnectionEntityProperties withBiztalkUri(String biztalkUri) { + this.biztalkUri = biztalkUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionArmResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionArmResourceInner.java new file mode 100644 index 0000000000000..1b8bdefde15bc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionArmResourceInner.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ArmIdWrapper; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Remote Private Endpoint Connection ARM resource. */ +@Fluent +public final class RemotePrivateEndpointConnectionArmResourceInner extends ProxyOnlyResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(RemotePrivateEndpointConnectionArmResourceInner.class); + + /* + * RemotePrivateEndpointConnectionARMResource resource specific properties + */ + @JsonProperty(value = "properties") + private RemotePrivateEndpointConnectionArmResourceProperties innerProperties; + + /** + * Get the innerProperties property: RemotePrivateEndpointConnectionARMResource resource specific properties. + * + * @return the innerProperties value. + */ + private RemotePrivateEndpointConnectionArmResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public RemotePrivateEndpointConnectionArmResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the provisioningState property: The provisioningState property. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @return the privateEndpoint value. + */ + public ArmIdWrapper privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the RemotePrivateEndpointConnectionArmResourceInner object itself. + */ + public RemotePrivateEndpointConnectionArmResourceInner withPrivateEndpoint(ArmIdWrapper privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new RemotePrivateEndpointConnectionArmResourceProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the RemotePrivateEndpointConnectionArmResourceInner object itself. + */ + public RemotePrivateEndpointConnectionArmResourceInner withPrivateLinkServiceConnectionState( + PrivateLinkConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new RemotePrivateEndpointConnectionArmResourceProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Get the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @return the ipAddresses value. + */ + public List ipAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().ipAddresses(); + } + + /** + * Set the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @param ipAddresses the ipAddresses value to set. + * @return the RemotePrivateEndpointConnectionArmResourceInner object itself. + */ + public RemotePrivateEndpointConnectionArmResourceInner withIpAddresses(List ipAddresses) { + if (this.innerProperties() == null) { + this.innerProperties = new RemotePrivateEndpointConnectionArmResourceProperties(); + } + this.innerProperties().withIpAddresses(ipAddresses); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionArmResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionArmResourceProperties.java new file mode 100644 index 0000000000000..c4a5538b21365 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionArmResourceProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ArmIdWrapper; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** RemotePrivateEndpointConnectionARMResource resource specific properties. */ +@Fluent +public final class RemotePrivateEndpointConnectionArmResourceProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(RemotePrivateEndpointConnectionArmResourceProperties.class); + + /* + * The provisioningState property. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * PrivateEndpoint of a remote private endpoint connection + */ + @JsonProperty(value = "privateEndpoint") + private ArmIdWrapper privateEndpoint; + + /* + * The state of a private link connection + */ + @JsonProperty(value = "privateLinkServiceConnectionState") + private PrivateLinkConnectionState privateLinkServiceConnectionState; + + /* + * Private IPAddresses mapped to the remote private endpoint + */ + @JsonProperty(value = "ipAddresses") + private List ipAddresses; + + /** + * Get the provisioningState property: The provisioningState property. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @return the privateEndpoint value. + */ + public ArmIdWrapper privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the RemotePrivateEndpointConnectionArmResourceProperties object itself. + */ + public RemotePrivateEndpointConnectionArmResourceProperties withPrivateEndpoint(ArmIdWrapper privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the RemotePrivateEndpointConnectionArmResourceProperties object itself. + */ + public RemotePrivateEndpointConnectionArmResourceProperties withPrivateLinkServiceConnectionState( + PrivateLinkConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @return the ipAddresses value. + */ + public List ipAddresses() { + return this.ipAddresses; + } + + /** + * Set the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @param ipAddresses the ipAddresses value to set. + * @return the RemotePrivateEndpointConnectionArmResourceProperties object itself. + */ + public RemotePrivateEndpointConnectionArmResourceProperties withIpAddresses(List ipAddresses) { + this.ipAddresses = ipAddresses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionProperties.java new file mode 100644 index 0000000000000..d223dde613bbe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RemotePrivateEndpointConnectionProperties.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ArmIdWrapper; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** RemotePrivateEndpointConnection resource specific properties. */ +@Fluent +public final class RemotePrivateEndpointConnectionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RemotePrivateEndpointConnectionProperties.class); + + /* + * The provisioningState property. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * PrivateEndpoint of a remote private endpoint connection + */ + @JsonProperty(value = "privateEndpoint") + private ArmIdWrapper privateEndpoint; + + /* + * The state of a private link connection + */ + @JsonProperty(value = "privateLinkServiceConnectionState") + private PrivateLinkConnectionState privateLinkServiceConnectionState; + + /* + * Private IPAddresses mapped to the remote private endpoint + */ + @JsonProperty(value = "ipAddresses") + private List ipAddresses; + + /** + * Get the provisioningState property: The provisioningState property. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @return the privateEndpoint value. + */ + public ArmIdWrapper privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the RemotePrivateEndpointConnectionProperties object itself. + */ + public RemotePrivateEndpointConnectionProperties withPrivateEndpoint(ArmIdWrapper privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the RemotePrivateEndpointConnectionProperties object itself. + */ + public RemotePrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState( + PrivateLinkConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @return the ipAddresses value. + */ + public List ipAddresses() { + return this.ipAddresses; + } + + /** + * Set the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @param ipAddresses the ipAddresses value to set. + * @return the RemotePrivateEndpointConnectionProperties object itself. + */ + public RemotePrivateEndpointConnectionProperties withIpAddresses(List ipAddresses) { + this.ipAddresses = ipAddresses; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RenewCertificateOrderRequestProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RenewCertificateOrderRequestProperties.java new file mode 100644 index 0000000000000..7d2960fbf2082 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RenewCertificateOrderRequestProperties.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** RenewCertificateOrderRequest resource specific properties. */ +@Fluent +public final class RenewCertificateOrderRequestProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RenewCertificateOrderRequestProperties.class); + + /* + * Certificate Key Size. + */ + @JsonProperty(value = "keySize") + private Integer keySize; + + /* + * Csr to be used for re-key operation. + */ + @JsonProperty(value = "csr") + private String csr; + + /* + * Should we change the ASC type (from managed private key to external + * private key and vice versa). + */ + @JsonProperty(value = "isPrivateKeyExternal") + private Boolean isPrivateKeyExternal; + + /** + * Get the keySize property: Certificate Key Size. + * + * @return the keySize value. + */ + public Integer keySize() { + return this.keySize; + } + + /** + * Set the keySize property: Certificate Key Size. + * + * @param keySize the keySize value to set. + * @return the RenewCertificateOrderRequestProperties object itself. + */ + public RenewCertificateOrderRequestProperties withKeySize(Integer keySize) { + this.keySize = keySize; + return this; + } + + /** + * Get the csr property: Csr to be used for re-key operation. + * + * @return the csr value. + */ + public String csr() { + return this.csr; + } + + /** + * Set the csr property: Csr to be used for re-key operation. + * + * @param csr the csr value to set. + * @return the RenewCertificateOrderRequestProperties object itself. + */ + public RenewCertificateOrderRequestProperties withCsr(String csr) { + this.csr = csr; + return this; + } + + /** + * Get the isPrivateKeyExternal property: Should we change the ASC type (from managed private key to external + * private key and vice versa). + * + * @return the isPrivateKeyExternal value. + */ + public Boolean isPrivateKeyExternal() { + return this.isPrivateKeyExternal; + } + + /** + * Set the isPrivateKeyExternal property: Should we change the ASC type (from managed private key to external + * private key and vice versa). + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set. + * @return the RenewCertificateOrderRequestProperties object itself. + */ + public RenewCertificateOrderRequestProperties withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + this.isPrivateKeyExternal = isPrivateKeyExternal; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceHealthMetadataInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceHealthMetadataInner.java new file mode 100644 index 0000000000000..3ae973f98f462 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceHealthMetadataInner.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Used for getting ResourceHealthCheck settings. */ +@Fluent +public final class ResourceHealthMetadataInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceHealthMetadataInner.class); + + /* + * ResourceHealthMetadata resource specific properties + */ + @JsonProperty(value = "properties") + private ResourceHealthMetadataProperties innerProperties; + + /** + * Get the innerProperties property: ResourceHealthMetadata resource specific properties. + * + * @return the innerProperties value. + */ + private ResourceHealthMetadataProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ResourceHealthMetadataInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the category property: The category that the resource matches in the RHC Policy File. + * + * @return the category value. + */ + public String category() { + return this.innerProperties() == null ? null : this.innerProperties().category(); + } + + /** + * Set the category property: The category that the resource matches in the RHC Policy File. + * + * @param category the category value to set. + * @return the ResourceHealthMetadataInner object itself. + */ + public ResourceHealthMetadataInner withCategory(String category) { + if (this.innerProperties() == null) { + this.innerProperties = new ResourceHealthMetadataProperties(); + } + this.innerProperties().withCategory(category); + return this; + } + + /** + * Get the signalAvailability property: Is there a health signal for the resource. + * + * @return the signalAvailability value. + */ + public Boolean signalAvailability() { + return this.innerProperties() == null ? null : this.innerProperties().signalAvailability(); + } + + /** + * Set the signalAvailability property: Is there a health signal for the resource. + * + * @param signalAvailability the signalAvailability value to set. + * @return the ResourceHealthMetadataInner object itself. + */ + public ResourceHealthMetadataInner withSignalAvailability(Boolean signalAvailability) { + if (this.innerProperties() == null) { + this.innerProperties = new ResourceHealthMetadataProperties(); + } + this.innerProperties().withSignalAvailability(signalAvailability); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceHealthMetadataProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceHealthMetadataProperties.java new file mode 100644 index 0000000000000..0c5e0eac0648e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceHealthMetadataProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ResourceHealthMetadata resource specific properties. */ +@Fluent +public final class ResourceHealthMetadataProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceHealthMetadataProperties.class); + + /* + * The category that the resource matches in the RHC Policy File + */ + @JsonProperty(value = "category") + private String category; + + /* + * Is there a health signal for the resource + */ + @JsonProperty(value = "signalAvailability") + private Boolean signalAvailability; + + /** + * Get the category property: The category that the resource matches in the RHC Policy File. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: The category that the resource matches in the RHC Policy File. + * + * @param category the category value to set. + * @return the ResourceHealthMetadataProperties object itself. + */ + public ResourceHealthMetadataProperties withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the signalAvailability property: Is there a health signal for the resource. + * + * @return the signalAvailability value. + */ + public Boolean signalAvailability() { + return this.signalAvailability; + } + + /** + * Set the signalAvailability property: Is there a health signal for the resource. + * + * @param signalAvailability the signalAvailability value to set. + * @return the ResourceHealthMetadataProperties object itself. + */ + public ResourceHealthMetadataProperties withSignalAvailability(Boolean signalAvailability) { + this.signalAvailability = signalAvailability; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceMetricDefinitionInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceMetricDefinitionInner.java new file mode 100644 index 0000000000000..e59ced1e15fb2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceMetricDefinitionInner.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.ResourceMetricAvailability; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Metadata for the metrics. */ +@Fluent +public final class ResourceMetricDefinitionInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceMetricDefinitionInner.class); + + /* + * ResourceMetricDefinition resource specific properties + */ + @JsonProperty(value = "properties") + private ResourceMetricDefinitionProperties innerProperties; + + /** + * Get the innerProperties property: ResourceMetricDefinition resource specific properties. + * + * @return the innerProperties value. + */ + private ResourceMetricDefinitionProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ResourceMetricDefinitionInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the unit property: Unit of the metric. + * + * @return the unit value. + */ + public String unit() { + return this.innerProperties() == null ? null : this.innerProperties().unit(); + } + + /** + * Get the primaryAggregationType property: Primary aggregation type. + * + * @return the primaryAggregationType value. + */ + public String primaryAggregationType() { + return this.innerProperties() == null ? null : this.innerProperties().primaryAggregationType(); + } + + /** + * Get the metricAvailabilities property: List of time grains supported for the metric together with retention + * period. + * + * @return the metricAvailabilities value. + */ + public List metricAvailabilities() { + return this.innerProperties() == null ? null : this.innerProperties().metricAvailabilities(); + } + + /** + * Get the resourceUri property: Resource URI. + * + * @return the resourceUri value. + */ + public String resourceUri() { + return this.innerProperties() == null ? null : this.innerProperties().resourceUri(); + } + + /** + * Get the properties property: Resource metric definition properties. + * + * @return the properties value. + */ + public Map properties() { + return this.innerProperties() == null ? null : this.innerProperties().properties(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceMetricDefinitionProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceMetricDefinitionProperties.java new file mode 100644 index 0000000000000..e4ebb74840d86 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceMetricDefinitionProperties.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ResourceMetricAvailability; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** ResourceMetricDefinition resource specific properties. */ +@Immutable +public final class ResourceMetricDefinitionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceMetricDefinitionProperties.class); + + /* + * Unit of the metric. + */ + @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /* + * Primary aggregation type. + */ + @JsonProperty(value = "primaryAggregationType", access = JsonProperty.Access.WRITE_ONLY) + private String primaryAggregationType; + + /* + * List of time grains supported for the metric together with retention + * period. + */ + @JsonProperty(value = "metricAvailabilities", access = JsonProperty.Access.WRITE_ONLY) + private List metricAvailabilities; + + /* + * Resource URI. + */ + @JsonProperty(value = "resourceUri", access = JsonProperty.Access.WRITE_ONLY) + private String resourceUri; + + /* + * Resource metric definition properties. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /** + * Get the unit property: Unit of the metric. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Get the primaryAggregationType property: Primary aggregation type. + * + * @return the primaryAggregationType value. + */ + public String primaryAggregationType() { + return this.primaryAggregationType; + } + + /** + * Get the metricAvailabilities property: List of time grains supported for the metric together with retention + * period. + * + * @return the metricAvailabilities value. + */ + public List metricAvailabilities() { + return this.metricAvailabilities; + } + + /** + * Get the resourceUri property: Resource URI. + * + * @return the resourceUri value. + */ + public String resourceUri() { + return this.resourceUri; + } + + /** + * Get the properties property: Resource metric definition properties. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metricAvailabilities() != null) { + metricAvailabilities().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceNameAvailabilityInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceNameAvailabilityInner.java new file mode 100644 index 0000000000000..334ca8358b8f5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ResourceNameAvailabilityInner.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.InAvailabilityReasonType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information regarding availability of a resource name. */ +@Fluent +public final class ResourceNameAvailabilityInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceNameAvailabilityInner.class); + + /* + * true indicates name is valid and available. + * false indicates the name is invalid, unavailable, or both. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /* + * Invalid indicates the name provided does not match Azure + * App Service naming requirements. AlreadyExists indicates + * that the name is already in use and is therefore unavailable. + */ + @JsonProperty(value = "reason") + private InAvailabilityReasonType reason; + + /* + * If reason == invalid, provide the user with the reason why the given + * name is invalid, and provide the resource naming requirements so that + * the user can select a valid name. If reason == AlreadyExists, explain + * that resource name is already in use, and direct them to select a + * different name. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the nameAvailable property: <code>true</code> indicates name is valid and available. + * <code>false</code> indicates the name is invalid, unavailable, or both. + * + * @return the nameAvailable value. + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set the nameAvailable property: <code>true</code> indicates name is valid and available. + * <code>false</code> indicates the name is invalid, unavailable, or both. + * + * @param nameAvailable the nameAvailable value to set. + * @return the ResourceNameAvailabilityInner object itself. + */ + public ResourceNameAvailabilityInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason property: <code>Invalid</code> indicates the name provided does not match Azure App + * Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and + * is therefore unavailable. + * + * @return the reason value. + */ + public InAvailabilityReasonType reason() { + return this.reason; + } + + /** + * Set the reason property: <code>Invalid</code> indicates the name provided does not match Azure App + * Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and + * is therefore unavailable. + * + * @param reason the reason value to set. + * @return the ResourceNameAvailabilityInner object itself. + */ + public ResourceNameAvailabilityInner withReason(InAvailabilityReasonType reason) { + this.reason = reason; + return this; + } + + /** + * Get the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @param message the message value to set. + * @return the ResourceNameAvailabilityInner object itself. + */ + public ResourceNameAvailabilityInner withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RestoreRequestInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RestoreRequestInner.java new file mode 100644 index 0000000000000..7bc95e05877ac --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RestoreRequestInner.java @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BackupRestoreOperationType; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Description of a restore request. */ +@Fluent +public final class RestoreRequestInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RestoreRequestInner.class); + + /* + * RestoreRequest resource specific properties + */ + @JsonProperty(value = "properties") + private RestoreRequestProperties innerProperties; + + /** + * Get the innerProperties property: RestoreRequest resource specific properties. + * + * @return the innerProperties value. + */ + private RestoreRequestProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public RestoreRequestInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the storageAccountUrl property: SAS URL to the container. + * + * @return the storageAccountUrl value. + */ + public String storageAccountUrl() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountUrl(); + } + + /** + * Set the storageAccountUrl property: SAS URL to the container. + * + * @param storageAccountUrl the storageAccountUrl value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withStorageAccountUrl(String storageAccountUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withStorageAccountUrl(storageAccountUrl); + return this; + } + + /** + * Get the blobName property: Name of a blob which contains the backup. + * + * @return the blobName value. + */ + public String blobName() { + return this.innerProperties() == null ? null : this.innerProperties().blobName(); + } + + /** + * Set the blobName property: Name of a blob which contains the backup. + * + * @param blobName the blobName value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withBlobName(String blobName) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withBlobName(blobName); + return this; + } + + /** + * Get the overwrite property: <code>true</code> if the restore operation can overwrite target app; + * otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an + * existing app. + * + * @return the overwrite value. + */ + public Boolean overwrite() { + return this.innerProperties() == null ? null : this.innerProperties().overwrite(); + } + + /** + * Set the overwrite property: <code>true</code> if the restore operation can overwrite target app; + * otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an + * existing app. + * + * @param overwrite the overwrite value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withOverwrite(Boolean overwrite) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withOverwrite(overwrite); + return this; + } + + /** + * Get the siteName property: Name of an app. + * + * @return the siteName value. + */ + public String siteName() { + return this.innerProperties() == null ? null : this.innerProperties().siteName(); + } + + /** + * Set the siteName property: Name of an app. + * + * @param siteName the siteName value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withSiteName(String siteName) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withSiteName(siteName); + return this; + } + + /** + * Get the databases property: Collection of databases which should be restored. This list has to match the list of + * databases included in the backup. + * + * @return the databases value. + */ + public List databases() { + return this.innerProperties() == null ? null : this.innerProperties().databases(); + } + + /** + * Set the databases property: Collection of databases which should be restored. This list has to match the list of + * databases included in the backup. + * + * @param databases the databases value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withDatabases(List databases) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withDatabases(databases); + return this; + } + + /** + * Get the ignoreConflictingHostNames property: Changes a logic when restoring an app with custom domains. + * <code>true</code> to remove custom domains automatically. If <code>false</code>, custom + * domains are added to the app's object when it is being restored, but that might fail due to conflicts during the + * operation. + * + * @return the ignoreConflictingHostNames value. + */ + public Boolean ignoreConflictingHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().ignoreConflictingHostNames(); + } + + /** + * Set the ignoreConflictingHostNames property: Changes a logic when restoring an app with custom domains. + * <code>true</code> to remove custom domains automatically. If <code>false</code>, custom + * domains are added to the app's object when it is being restored, but that might fail due to conflicts during the + * operation. + * + * @param ignoreConflictingHostNames the ignoreConflictingHostNames value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withIgnoreConflictingHostNames(Boolean ignoreConflictingHostNames) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withIgnoreConflictingHostNames(ignoreConflictingHostNames); + return this; + } + + /** + * Get the ignoreDatabases property: Ignore the databases and only restore the site content. + * + * @return the ignoreDatabases value. + */ + public Boolean ignoreDatabases() { + return this.innerProperties() == null ? null : this.innerProperties().ignoreDatabases(); + } + + /** + * Set the ignoreDatabases property: Ignore the databases and only restore the site content. + * + * @param ignoreDatabases the ignoreDatabases value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withIgnoreDatabases(Boolean ignoreDatabases) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withIgnoreDatabases(ignoreDatabases); + return this; + } + + /** + * Get the appServicePlan property: Specify app service plan that will own restored site. + * + * @return the appServicePlan value. + */ + public String appServicePlan() { + return this.innerProperties() == null ? null : this.innerProperties().appServicePlan(); + } + + /** + * Set the appServicePlan property: Specify app service plan that will own restored site. + * + * @param appServicePlan the appServicePlan value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withAppServicePlan(String appServicePlan) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withAppServicePlan(appServicePlan); + return this; + } + + /** + * Get the operationType property: Operation type. + * + * @return the operationType value. + */ + public BackupRestoreOperationType operationType() { + return this.innerProperties() == null ? null : this.innerProperties().operationType(); + } + + /** + * Set the operationType property: Operation type. + * + * @param operationType the operationType value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withOperationType(BackupRestoreOperationType operationType) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withOperationType(operationType); + return this; + } + + /** + * Get the adjustConnectionStrings property: <code>true</code> if SiteConfig.ConnectionStrings should be + * set in new app; otherwise, <code>false</code>. + * + * @return the adjustConnectionStrings value. + */ + public Boolean adjustConnectionStrings() { + return this.innerProperties() == null ? null : this.innerProperties().adjustConnectionStrings(); + } + + /** + * Set the adjustConnectionStrings property: <code>true</code> if SiteConfig.ConnectionStrings should be + * set in new app; otherwise, <code>false</code>. + * + * @param adjustConnectionStrings the adjustConnectionStrings value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withAdjustConnectionStrings(Boolean adjustConnectionStrings) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withAdjustConnectionStrings(adjustConnectionStrings); + return this; + } + + /** + * Get the hostingEnvironment property: App Service Environment name, if needed (only when restoring an app to an + * App Service Environment). + * + * @return the hostingEnvironment value. + */ + public String hostingEnvironment() { + return this.innerProperties() == null ? null : this.innerProperties().hostingEnvironment(); + } + + /** + * Set the hostingEnvironment property: App Service Environment name, if needed (only when restoring an app to an + * App Service Environment). + * + * @param hostingEnvironment the hostingEnvironment value to set. + * @return the RestoreRequestInner object itself. + */ + public RestoreRequestInner withHostingEnvironment(String hostingEnvironment) { + if (this.innerProperties() == null) { + this.innerProperties = new RestoreRequestProperties(); + } + this.innerProperties().withHostingEnvironment(hostingEnvironment); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RestoreRequestProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RestoreRequestProperties.java new file mode 100644 index 0000000000000..c31ca7d6d6899 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RestoreRequestProperties.java @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BackupRestoreOperationType; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** RestoreRequest resource specific properties. */ +@Fluent +public final class RestoreRequestProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RestoreRequestProperties.class); + + /* + * SAS URL to the container. + */ + @JsonProperty(value = "storageAccountUrl", required = true) + private String storageAccountUrl; + + /* + * Name of a blob which contains the backup. + */ + @JsonProperty(value = "blobName") + private String blobName; + + /* + * true if the restore operation can overwrite target app; + * otherwise, false. true is needed if trying to + * restore over an existing app. + */ + @JsonProperty(value = "overwrite", required = true) + private boolean overwrite; + + /* + * Name of an app. + */ + @JsonProperty(value = "siteName") + private String siteName; + + /* + * Collection of databases which should be restored. This list has to match + * the list of databases included in the backup. + */ + @JsonProperty(value = "databases") + private List databases; + + /* + * Changes a logic when restoring an app with custom domains. + * true to remove custom domains automatically. If + * false, custom domains are added to + * the app's object when it is being restored, but that might fail due to + * conflicts during the operation. + */ + @JsonProperty(value = "ignoreConflictingHostNames") + private Boolean ignoreConflictingHostNames; + + /* + * Ignore the databases and only restore the site content + */ + @JsonProperty(value = "ignoreDatabases") + private Boolean ignoreDatabases; + + /* + * Specify app service plan that will own restored site. + */ + @JsonProperty(value = "appServicePlan") + private String appServicePlan; + + /* + * Operation type. + */ + @JsonProperty(value = "operationType") + private BackupRestoreOperationType operationType; + + /* + * true if SiteConfig.ConnectionStrings should be set in new + * app; otherwise, false. + */ + @JsonProperty(value = "adjustConnectionStrings") + private Boolean adjustConnectionStrings; + + /* + * App Service Environment name, if needed (only when restoring an app to + * an App Service Environment). + */ + @JsonProperty(value = "hostingEnvironment") + private String hostingEnvironment; + + /** + * Get the storageAccountUrl property: SAS URL to the container. + * + * @return the storageAccountUrl value. + */ + public String storageAccountUrl() { + return this.storageAccountUrl; + } + + /** + * Set the storageAccountUrl property: SAS URL to the container. + * + * @param storageAccountUrl the storageAccountUrl value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withStorageAccountUrl(String storageAccountUrl) { + this.storageAccountUrl = storageAccountUrl; + return this; + } + + /** + * Get the blobName property: Name of a blob which contains the backup. + * + * @return the blobName value. + */ + public String blobName() { + return this.blobName; + } + + /** + * Set the blobName property: Name of a blob which contains the backup. + * + * @param blobName the blobName value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withBlobName(String blobName) { + this.blobName = blobName; + return this; + } + + /** + * Get the overwrite property: <code>true</code> if the restore operation can overwrite target app; + * otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an + * existing app. + * + * @return the overwrite value. + */ + public boolean overwrite() { + return this.overwrite; + } + + /** + * Set the overwrite property: <code>true</code> if the restore operation can overwrite target app; + * otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an + * existing app. + * + * @param overwrite the overwrite value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withOverwrite(boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get the siteName property: Name of an app. + * + * @return the siteName value. + */ + public String siteName() { + return this.siteName; + } + + /** + * Set the siteName property: Name of an app. + * + * @param siteName the siteName value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withSiteName(String siteName) { + this.siteName = siteName; + return this; + } + + /** + * Get the databases property: Collection of databases which should be restored. This list has to match the list of + * databases included in the backup. + * + * @return the databases value. + */ + public List databases() { + return this.databases; + } + + /** + * Set the databases property: Collection of databases which should be restored. This list has to match the list of + * databases included in the backup. + * + * @param databases the databases value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withDatabases(List databases) { + this.databases = databases; + return this; + } + + /** + * Get the ignoreConflictingHostNames property: Changes a logic when restoring an app with custom domains. + * <code>true</code> to remove custom domains automatically. If <code>false</code>, custom + * domains are added to the app's object when it is being restored, but that might fail due to conflicts during the + * operation. + * + * @return the ignoreConflictingHostNames value. + */ + public Boolean ignoreConflictingHostNames() { + return this.ignoreConflictingHostNames; + } + + /** + * Set the ignoreConflictingHostNames property: Changes a logic when restoring an app with custom domains. + * <code>true</code> to remove custom domains automatically. If <code>false</code>, custom + * domains are added to the app's object when it is being restored, but that might fail due to conflicts during the + * operation. + * + * @param ignoreConflictingHostNames the ignoreConflictingHostNames value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withIgnoreConflictingHostNames(Boolean ignoreConflictingHostNames) { + this.ignoreConflictingHostNames = ignoreConflictingHostNames; + return this; + } + + /** + * Get the ignoreDatabases property: Ignore the databases and only restore the site content. + * + * @return the ignoreDatabases value. + */ + public Boolean ignoreDatabases() { + return this.ignoreDatabases; + } + + /** + * Set the ignoreDatabases property: Ignore the databases and only restore the site content. + * + * @param ignoreDatabases the ignoreDatabases value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withIgnoreDatabases(Boolean ignoreDatabases) { + this.ignoreDatabases = ignoreDatabases; + return this; + } + + /** + * Get the appServicePlan property: Specify app service plan that will own restored site. + * + * @return the appServicePlan value. + */ + public String appServicePlan() { + return this.appServicePlan; + } + + /** + * Set the appServicePlan property: Specify app service plan that will own restored site. + * + * @param appServicePlan the appServicePlan value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withAppServicePlan(String appServicePlan) { + this.appServicePlan = appServicePlan; + return this; + } + + /** + * Get the operationType property: Operation type. + * + * @return the operationType value. + */ + public BackupRestoreOperationType operationType() { + return this.operationType; + } + + /** + * Set the operationType property: Operation type. + * + * @param operationType the operationType value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withOperationType(BackupRestoreOperationType operationType) { + this.operationType = operationType; + return this; + } + + /** + * Get the adjustConnectionStrings property: <code>true</code> if SiteConfig.ConnectionStrings should be + * set in new app; otherwise, <code>false</code>. + * + * @return the adjustConnectionStrings value. + */ + public Boolean adjustConnectionStrings() { + return this.adjustConnectionStrings; + } + + /** + * Set the adjustConnectionStrings property: <code>true</code> if SiteConfig.ConnectionStrings should be + * set in new app; otherwise, <code>false</code>. + * + * @param adjustConnectionStrings the adjustConnectionStrings value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withAdjustConnectionStrings(Boolean adjustConnectionStrings) { + this.adjustConnectionStrings = adjustConnectionStrings; + return this; + } + + /** + * Get the hostingEnvironment property: App Service Environment name, if needed (only when restoring an app to an + * App Service Environment). + * + * @return the hostingEnvironment value. + */ + public String hostingEnvironment() { + return this.hostingEnvironment; + } + + /** + * Set the hostingEnvironment property: App Service Environment name, if needed (only when restoring an app to an + * App Service Environment). + * + * @param hostingEnvironment the hostingEnvironment value to set. + * @return the RestoreRequestProperties object itself. + */ + public RestoreRequestProperties withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (storageAccountUrl() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property storageAccountUrl in model RestoreRequestProperties")); + } + if (databases() != null) { + databases().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RevisionInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RevisionInner.java new file mode 100644 index 0000000000000..46bb5dfb4f431 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RevisionInner.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.RevisionHealthState; +import com.azure.resourcemanager.appservice.generated.models.RevisionProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.Template; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Container App Revision. */ +@Fluent +public final class RevisionInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RevisionInner.class); + + /* + * Revision resource specific properties + */ + @JsonProperty(value = "properties") + private RevisionProperties innerProperties; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: Revision resource specific properties. + * + * @return the innerProperties value. + */ + private RevisionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the RevisionInner object itself. + */ + public RevisionInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public RevisionInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public RevisionInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the createdTime property: Timestamp describing when the revision was created by controller. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.innerProperties() == null ? null : this.innerProperties().createdTime(); + } + + /** + * Get the fqdn property: Fully qualified domain name of the revision. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.innerProperties() == null ? null : this.innerProperties().fqdn(); + } + + /** + * Get the template property: Container App Revision Template with all possible settings and the defaults if user + * did not provide them. The defaults are populated as they were at the creation time. + * + * @return the template value. + */ + public Template template() { + return this.innerProperties() == null ? null : this.innerProperties().template(); + } + + /** + * Get the active property: Boolean describing if the Revision is Active. + * + * @return the active value. + */ + public Boolean active() { + return this.innerProperties() == null ? null : this.innerProperties().active(); + } + + /** + * Get the replicas property: Number of pods currently running for this revision. + * + * @return the replicas value. + */ + public Integer replicas() { + return this.innerProperties() == null ? null : this.innerProperties().replicas(); + } + + /** + * Get the trafficWeight property: Traffic weight assigned to this revision. + * + * @return the trafficWeight value. + */ + public Integer trafficWeight() { + return this.innerProperties() == null ? null : this.innerProperties().trafficWeight(); + } + + /** + * Get the provisioningError property: Optional Field - Platform Error Message. + * + * @return the provisioningError value. + */ + public String provisioningError() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningError(); + } + + /** + * Get the healthState property: Current health State of the revision. + * + * @return the healthState value. + */ + public RevisionHealthState healthState() { + return this.innerProperties() == null ? null : this.innerProperties().healthState(); + } + + /** + * Get the provisioningState property: Current provisioning State of the revision. + * + * @return the provisioningState value. + */ + public RevisionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RevisionProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RevisionProperties.java new file mode 100644 index 0000000000000..e8c02937728fc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/RevisionProperties.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.RevisionHealthState; +import com.azure.resourcemanager.appservice.generated.models.RevisionProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.Template; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Revision resource specific properties. */ +@Immutable +public final class RevisionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RevisionProperties.class); + + /* + * Timestamp describing when the revision was created + * by controller + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTime; + + /* + * Fully qualified domain name of the revision + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time + */ + @JsonProperty(value = "template", access = JsonProperty.Access.WRITE_ONLY) + private Template template; + + /* + * Boolean describing if the Revision is Active + */ + @JsonProperty(value = "active", access = JsonProperty.Access.WRITE_ONLY) + private Boolean active; + + /* + * Number of pods currently running for this revision + */ + @JsonProperty(value = "replicas", access = JsonProperty.Access.WRITE_ONLY) + private Integer replicas; + + /* + * Traffic weight assigned to this revision + */ + @JsonProperty(value = "trafficWeight", access = JsonProperty.Access.WRITE_ONLY) + private Integer trafficWeight; + + /* + * Optional Field - Platform Error Message + */ + @JsonProperty(value = "provisioningError", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningError; + + /* + * Current health State of the revision + */ + @JsonProperty(value = "healthState", access = JsonProperty.Access.WRITE_ONLY) + private RevisionHealthState healthState; + + /* + * Current provisioning State of the revision + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private RevisionProvisioningState provisioningState; + + /** + * Get the createdTime property: Timestamp describing when the revision was created by controller. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.createdTime; + } + + /** + * Get the fqdn property: Fully qualified domain name of the revision. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the template property: Container App Revision Template with all possible settings and the defaults if user + * did not provide them. The defaults are populated as they were at the creation time. + * + * @return the template value. + */ + public Template template() { + return this.template; + } + + /** + * Get the active property: Boolean describing if the Revision is Active. + * + * @return the active value. + */ + public Boolean active() { + return this.active; + } + + /** + * Get the replicas property: Number of pods currently running for this revision. + * + * @return the replicas value. + */ + public Integer replicas() { + return this.replicas; + } + + /** + * Get the trafficWeight property: Traffic weight assigned to this revision. + * + * @return the trafficWeight value. + */ + public Integer trafficWeight() { + return this.trafficWeight; + } + + /** + * Get the provisioningError property: Optional Field - Platform Error Message. + * + * @return the provisioningError value. + */ + public String provisioningError() { + return this.provisioningError; + } + + /** + * Get the healthState property: Current health State of the revision. + * + * @return the healthState value. + */ + public RevisionHealthState healthState() { + return this.healthState; + } + + /** + * Get the provisioningState property: Current provisioning State of the revision. + * + * @return the provisioningState value. + */ + public RevisionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (template() != null) { + template().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SecretsCollectionInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SecretsCollectionInner.java new file mode 100644 index 0000000000000..6a6a529af7d26 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SecretsCollectionInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppSecret; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App Secrets Collection ARM resource. */ +@Fluent +public final class SecretsCollectionInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SecretsCollectionInner.class); + + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * 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 SecretsCollectionInner object itself. + */ + public SecretsCollectionInner 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 SecretsCollectionInner")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsInner.java new file mode 100644 index 0000000000000..266dcbf02f77f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsInner.java @@ -0,0 +1,1053 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BuiltInAuthenticationProvider; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.UnauthenticatedClientAction; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Configuration settings for the Azure App Service Authentication / Authorization feature. */ +@Fluent +public final class SiteAuthSettingsInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteAuthSettingsInner.class); + + /* + * SiteAuthSettings resource specific properties + */ + @JsonProperty(value = "properties") + private SiteAuthSettingsProperties innerProperties; + + /** + * Get the innerProperties property: SiteAuthSettings resource specific properties. + * + * @return the innerProperties value. + */ + private SiteAuthSettingsProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SiteAuthSettingsInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled + * for the current app; otherwise, <code>false</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled + * for the current app; otherwise, <code>false</code>. + * + * @param enabled the enabled value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of certain features in the Authentication / + * Authorization module. + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.innerProperties() == null ? null : this.innerProperties().runtimeVersion(); + } + + /** + * Set the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of certain features in the Authentication / + * Authorization module. + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withRuntimeVersion(String runtimeVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withRuntimeVersion(runtimeVersion); + return this; + } + + /** + * Get the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to + * access the app. + * + * @return the unauthenticatedClientAction value. + */ + public UnauthenticatedClientAction unauthenticatedClientAction() { + return this.innerProperties() == null ? null : this.innerProperties().unauthenticatedClientAction(); + } + + /** + * Set the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to + * access the app. + * + * @param unauthenticatedClientAction the unauthenticatedClientAction value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withUnauthenticatedClientAction( + UnauthenticatedClientAction unauthenticatedClientAction) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withUnauthenticatedClientAction(unauthenticatedClientAction); + return this; + } + + /** + * Get the tokenStoreEnabled property: <code>true</code> to durably store platform-specific security + * tokens that are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @return the tokenStoreEnabled value. + */ + public Boolean tokenStoreEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().tokenStoreEnabled(); + } + + /** + * Set the tokenStoreEnabled property: <code>true</code> to durably store platform-specific security + * tokens that are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @param tokenStoreEnabled the tokenStoreEnabled value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTokenStoreEnabled(Boolean tokenStoreEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withTokenStoreEnabled(tokenStoreEnabled); + return this; + } + + /** + * Get the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or + * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting + * typically only needed by Windows Store application backends. Note that URLs within the current domain are always + * implicitly allowed. + * + * @return the allowedExternalRedirectUrls value. + */ + public List allowedExternalRedirectUrls() { + return this.innerProperties() == null ? null : this.innerProperties().allowedExternalRedirectUrls(); + } + + /** + * Set the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or + * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting + * typically only needed by Windows Store application backends. Note that URLs within the current domain are always + * implicitly allowed. + * + * @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAllowedExternalRedirectUrls(List allowedExternalRedirectUrls) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withAllowedExternalRedirectUrls(allowedExternalRedirectUrls); + return this; + } + + /** + * Get the defaultProvider property: The default authentication provider to use when multiple providers are + * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". + * + * @return the defaultProvider value. + */ + public BuiltInAuthenticationProvider defaultProvider() { + return this.innerProperties() == null ? null : this.innerProperties().defaultProvider(); + } + + /** + * Set the defaultProvider property: The default authentication provider to use when multiple providers are + * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". + * + * @param defaultProvider the defaultProvider value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withDefaultProvider(BuiltInAuthenticationProvider defaultProvider) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withDefaultProvider(defaultProvider); + return this; + } + + /** + * Get the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @return the tokenRefreshExtensionHours value. + */ + public Double tokenRefreshExtensionHours() { + return this.innerProperties() == null ? null : this.innerProperties().tokenRefreshExtensionHours(); + } + + /** + * Set the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @param tokenRefreshExtensionHours the tokenRefreshExtensionHours value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTokenRefreshExtensionHours(Double tokenRefreshExtensionHours) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withTokenRefreshExtensionHours(tokenRefreshExtensionHours); + return this; + } + + /** + * Get the clientId property: The Client ID of this relying party application, known as the client_id. This setting + * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID + * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * + * @return the clientId value. + */ + public String clientId() { + return this.innerProperties() == null ? null : this.innerProperties().clientId(); + } + + /** + * Set the clientId property: The Client ID of this relying party application, known as the client_id. This setting + * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID + * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * + * @param clientId the clientId value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientId(String clientId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withClientId(clientId); + return this; + } + + /** + * Get the clientSecret property: The Client Secret of this relying party application (in Azure Active Directory, + * this is also referred to as the Key). This setting is optional. If no client secret is configured, the OpenID + * Connect implicit auth flow is used to authenticate end users. Otherwise, the OpenID Connect Authorization Code + * Flow is used to authenticate end users. More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.innerProperties() == null ? null : this.innerProperties().clientSecret(); + } + + /** + * Set the clientSecret property: The Client Secret of this relying party application (in Azure Active Directory, + * this is also referred to as the Key). This setting is optional. If no client secret is configured, the OpenID + * Connect implicit auth flow is used to authenticate end users. Otherwise, the OpenID Connect Authorization Code + * Flow is used to authenticate end users. More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html. + * + * @param clientSecret the clientSecret value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientSecret(String clientSecret) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withClientSecret(clientSecret); + return this; + } + + /** + * Get the clientSecretSettingName property: The app setting name that contains the client secret of the relying + * party application. + * + * @return the clientSecretSettingName value. + */ + public String clientSecretSettingName() { + return this.innerProperties() == null ? null : this.innerProperties().clientSecretSettingName(); + } + + /** + * Set the clientSecretSettingName property: The app setting name that contains the client secret of the relying + * party application. + * + * @param clientSecretSettingName the clientSecretSettingName value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientSecretSettingName(String clientSecretSettingName) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withClientSecretSettingName(clientSecretSettingName); + return this; + } + + /** + * Get the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint + * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also + * optional. + * + * @return the clientSecretCertificateThumbprint value. + */ + public String clientSecretCertificateThumbprint() { + return this.innerProperties() == null ? null : this.innerProperties().clientSecretCertificateThumbprint(); + } + + /** + * Set the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint + * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also + * optional. + * + * @param clientSecretCertificateThumbprint the clientSecretCertificateThumbprint value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withClientSecretCertificateThumbprint(String clientSecretCertificateThumbprint) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withClientSecretCertificateThumbprint(clientSecretCertificateThumbprint); + return this; + } + + /** + * Get the issuer property: The OpenID Connect Issuer URI that represents the entity which issues access tokens for + * this application. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + * https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. More + * information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * + * @return the issuer value. + */ + public String issuer() { + return this.innerProperties() == null ? null : this.innerProperties().issuer(); + } + + /** + * Set the issuer property: The OpenID Connect Issuer URI that represents the entity which issues access tokens for + * this application. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + * https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. More + * information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * + * @param issuer the issuer value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withIssuer(String issuer) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withIssuer(issuer); + return this; + } + + /** + * Get the validateIssuer property: Gets a value indicating whether the issuer should be a valid HTTPS url and be + * validated as such. + * + * @return the validateIssuer value. + */ + public Boolean validateIssuer() { + return this.innerProperties() == null ? null : this.innerProperties().validateIssuer(); + } + + /** + * Set the validateIssuer property: Gets a value indicating whether the issuer should be a valid HTTPS url and be + * validated as such. + * + * @param validateIssuer the validateIssuer value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withValidateIssuer(Boolean validateIssuer) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withValidateIssuer(validateIssuer); + return this; + } + + /** + * Get the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure + * Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience, + * regardless of this setting. + * + * @return the allowedAudiences value. + */ + public List allowedAudiences() { + return this.innerProperties() == null ? null : this.innerProperties().allowedAudiences(); + } + + /** + * Set the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure + * Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience, + * regardless of this setting. + * + * @param allowedAudiences the allowedAudiences value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAllowedAudiences(List allowedAudiences) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withAllowedAudiences(allowedAudiences); + return this; + } + + /** + * Get the additionalLoginParams property: Login parameters to send to the OpenID Connect authorization endpoint + * when a user logs in. Each parameter must be in the form "key=value". + * + * @return the additionalLoginParams value. + */ + public List additionalLoginParams() { + return this.innerProperties() == null ? null : this.innerProperties().additionalLoginParams(); + } + + /** + * Set the additionalLoginParams property: Login parameters to send to the OpenID Connect authorization endpoint + * when a user logs in. Each parameter must be in the form "key=value". + * + * @param additionalLoginParams the additionalLoginParams value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAdditionalLoginParams(List additionalLoginParams) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withAdditionalLoginParams(additionalLoginParams); + return this; + } + + /** + * Get the aadClaimsAuthorization property: Gets a JSON string containing the Azure AD Acl settings. + * + * @return the aadClaimsAuthorization value. + */ + public String aadClaimsAuthorization() { + return this.innerProperties() == null ? null : this.innerProperties().aadClaimsAuthorization(); + } + + /** + * Set the aadClaimsAuthorization property: Gets a JSON string containing the Azure AD Acl settings. + * + * @param aadClaimsAuthorization the aadClaimsAuthorization value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAadClaimsAuthorization(String aadClaimsAuthorization) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withAadClaimsAuthorization(aadClaimsAuthorization); + return this; + } + + /** + * Get the googleClientId property: The OpenID Connect Client ID for the Google web application. This setting is + * required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @return the googleClientId value. + */ + public String googleClientId() { + return this.innerProperties() == null ? null : this.innerProperties().googleClientId(); + } + + /** + * Set the googleClientId property: The OpenID Connect Client ID for the Google web application. This setting is + * required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @param googleClientId the googleClientId value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleClientId(String googleClientId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withGoogleClientId(googleClientId); + return this; + } + + /** + * Get the googleClientSecret property: The client secret associated with the Google web application. This setting + * is required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @return the googleClientSecret value. + */ + public String googleClientSecret() { + return this.innerProperties() == null ? null : this.innerProperties().googleClientSecret(); + } + + /** + * Set the googleClientSecret property: The client secret associated with the Google web application. This setting + * is required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @param googleClientSecret the googleClientSecret value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleClientSecret(String googleClientSecret) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withGoogleClientSecret(googleClientSecret); + return this; + } + + /** + * Get the googleClientSecretSettingName property: The app setting name that contains the client secret associated + * with the Google web application. + * + * @return the googleClientSecretSettingName value. + */ + public String googleClientSecretSettingName() { + return this.innerProperties() == null ? null : this.innerProperties().googleClientSecretSettingName(); + } + + /** + * Set the googleClientSecretSettingName property: The app setting name that contains the client secret associated + * with the Google web application. + * + * @param googleClientSecretSettingName the googleClientSecretSettingName value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleClientSecretSettingName(String googleClientSecretSettingName) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withGoogleClientSecretSettingName(googleClientSecretSettingName); + return this; + } + + /** + * Get the googleOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Google Sign-In + * authentication. This setting is optional. If not specified, "openid", "profile", and "email" are used as default + * scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + * + * @return the googleOAuthScopes value. + */ + public List googleOAuthScopes() { + return this.innerProperties() == null ? null : this.innerProperties().googleOAuthScopes(); + } + + /** + * Set the googleOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Google Sign-In + * authentication. This setting is optional. If not specified, "openid", "profile", and "email" are used as default + * scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + * + * @param googleOAuthScopes the googleOAuthScopes value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGoogleOAuthScopes(List googleOAuthScopes) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withGoogleOAuthScopes(googleOAuthScopes); + return this; + } + + /** + * Get the facebookAppId property: The App ID of the Facebook app used for login. This setting is required for + * enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookAppId value. + */ + public String facebookAppId() { + return this.innerProperties() == null ? null : this.innerProperties().facebookAppId(); + } + + /** + * Set the facebookAppId property: The App ID of the Facebook app used for login. This setting is required for + * enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + * + * @param facebookAppId the facebookAppId value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookAppId(String facebookAppId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withFacebookAppId(facebookAppId); + return this; + } + + /** + * Get the facebookAppSecret property: The App Secret of the Facebook app used for Facebook Login. This setting is + * required for enabling Facebook Login. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookAppSecret value. + */ + public String facebookAppSecret() { + return this.innerProperties() == null ? null : this.innerProperties().facebookAppSecret(); + } + + /** + * Set the facebookAppSecret property: The App Secret of the Facebook app used for Facebook Login. This setting is + * required for enabling Facebook Login. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @param facebookAppSecret the facebookAppSecret value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookAppSecret(String facebookAppSecret) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withFacebookAppSecret(facebookAppSecret); + return this; + } + + /** + * Get the facebookAppSecretSettingName property: The app setting name that contains the app secret used for + * Facebook Login. + * + * @return the facebookAppSecretSettingName value. + */ + public String facebookAppSecretSettingName() { + return this.innerProperties() == null ? null : this.innerProperties().facebookAppSecretSettingName(); + } + + /** + * Set the facebookAppSecretSettingName property: The app setting name that contains the app secret used for + * Facebook Login. + * + * @param facebookAppSecretSettingName the facebookAppSecretSettingName value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookAppSecretSettingName(String facebookAppSecretSettingName) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withFacebookAppSecretSettingName(facebookAppSecretSettingName); + return this; + } + + /** + * Get the facebookOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Facebook Login + * authentication. This setting is optional. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookOAuthScopes value. + */ + public List facebookOAuthScopes() { + return this.innerProperties() == null ? null : this.innerProperties().facebookOAuthScopes(); + } + + /** + * Set the facebookOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Facebook Login + * authentication. This setting is optional. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @param facebookOAuthScopes the facebookOAuthScopes value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withFacebookOAuthScopes(List facebookOAuthScopes) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withFacebookOAuthScopes(facebookOAuthScopes); + return this; + } + + /** + * Get the gitHubClientId property: The Client Id of the GitHub app used for login. This setting is required for + * enabling Github login. + * + * @return the gitHubClientId value. + */ + public String gitHubClientId() { + return this.innerProperties() == null ? null : this.innerProperties().gitHubClientId(); + } + + /** + * Set the gitHubClientId property: The Client Id of the GitHub app used for login. This setting is required for + * enabling Github login. + * + * @param gitHubClientId the gitHubClientId value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGitHubClientId(String gitHubClientId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withGitHubClientId(gitHubClientId); + return this; + } + + /** + * Get the gitHubClientSecret property: The Client Secret of the GitHub app used for Github Login. This setting is + * required for enabling Github login. + * + * @return the gitHubClientSecret value. + */ + public String gitHubClientSecret() { + return this.innerProperties() == null ? null : this.innerProperties().gitHubClientSecret(); + } + + /** + * Set the gitHubClientSecret property: The Client Secret of the GitHub app used for Github Login. This setting is + * required for enabling Github login. + * + * @param gitHubClientSecret the gitHubClientSecret value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGitHubClientSecret(String gitHubClientSecret) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withGitHubClientSecret(gitHubClientSecret); + return this; + } + + /** + * Get the gitHubClientSecretSettingName property: The app setting name that contains the client secret of the + * Github app used for GitHub Login. + * + * @return the gitHubClientSecretSettingName value. + */ + public String gitHubClientSecretSettingName() { + return this.innerProperties() == null ? null : this.innerProperties().gitHubClientSecretSettingName(); + } + + /** + * Set the gitHubClientSecretSettingName property: The app setting name that contains the client secret of the + * Github app used for GitHub Login. + * + * @param gitHubClientSecretSettingName the gitHubClientSecretSettingName value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGitHubClientSecretSettingName(String gitHubClientSecretSettingName) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withGitHubClientSecretSettingName(gitHubClientSecretSettingName); + return this; + } + + /** + * Get the gitHubOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of GitHub Login + * authentication. This setting is optional. + * + * @return the gitHubOAuthScopes value. + */ + public List gitHubOAuthScopes() { + return this.innerProperties() == null ? null : this.innerProperties().gitHubOAuthScopes(); + } + + /** + * Set the gitHubOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of GitHub Login + * authentication. This setting is optional. + * + * @param gitHubOAuthScopes the gitHubOAuthScopes value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withGitHubOAuthScopes(List gitHubOAuthScopes) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withGitHubOAuthScopes(gitHubOAuthScopes); + return this; + } + + /** + * Get the twitterConsumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @return the twitterConsumerKey value. + */ + public String twitterConsumerKey() { + return this.innerProperties() == null ? null : this.innerProperties().twitterConsumerKey(); + } + + /** + * Set the twitterConsumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @param twitterConsumerKey the twitterConsumerKey value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTwitterConsumerKey(String twitterConsumerKey) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withTwitterConsumerKey(twitterConsumerKey); + return this; + } + + /** + * Get the twitterConsumerSecret property: The OAuth 1.0a consumer secret of the Twitter application used for + * sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @return the twitterConsumerSecret value. + */ + public String twitterConsumerSecret() { + return this.innerProperties() == null ? null : this.innerProperties().twitterConsumerSecret(); + } + + /** + * Set the twitterConsumerSecret property: The OAuth 1.0a consumer secret of the Twitter application used for + * sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @param twitterConsumerSecret the twitterConsumerSecret value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTwitterConsumerSecret(String twitterConsumerSecret) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withTwitterConsumerSecret(twitterConsumerSecret); + return this; + } + + /** + * Get the twitterConsumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer + * secret of the Twitter application used for sign-in. + * + * @return the twitterConsumerSecretSettingName value. + */ + public String twitterConsumerSecretSettingName() { + return this.innerProperties() == null ? null : this.innerProperties().twitterConsumerSecretSettingName(); + } + + /** + * Set the twitterConsumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer + * secret of the Twitter application used for sign-in. + * + * @param twitterConsumerSecretSettingName the twitterConsumerSecretSettingName value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withTwitterConsumerSecretSettingName(String twitterConsumerSecretSettingName) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withTwitterConsumerSecretSettingName(twitterConsumerSecretSettingName); + return this; + } + + /** + * Get the microsoftAccountClientId property: The OAuth 2.0 client ID that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @return the microsoftAccountClientId value. + */ + public String microsoftAccountClientId() { + return this.innerProperties() == null ? null : this.innerProperties().microsoftAccountClientId(); + } + + /** + * Set the microsoftAccountClientId property: The OAuth 2.0 client ID that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @param microsoftAccountClientId the microsoftAccountClientId value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountClientId(String microsoftAccountClientId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withMicrosoftAccountClientId(microsoftAccountClientId); + return this; + } + + /** + * Get the microsoftAccountClientSecret property: The OAuth 2.0 client secret that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @return the microsoftAccountClientSecret value. + */ + public String microsoftAccountClientSecret() { + return this.innerProperties() == null ? null : this.innerProperties().microsoftAccountClientSecret(); + } + + /** + * Set the microsoftAccountClientSecret property: The OAuth 2.0 client secret that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @param microsoftAccountClientSecret the microsoftAccountClientSecret value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountClientSecret(String microsoftAccountClientSecret) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withMicrosoftAccountClientSecret(microsoftAccountClientSecret); + return this; + } + + /** + * Get the microsoftAccountClientSecretSettingName property: The app setting name containing the OAuth 2.0 client + * secret that was created for the app used for authentication. + * + * @return the microsoftAccountClientSecretSettingName value. + */ + public String microsoftAccountClientSecretSettingName() { + return this.innerProperties() == null ? null : this.innerProperties().microsoftAccountClientSecretSettingName(); + } + + /** + * Set the microsoftAccountClientSecretSettingName property: The app setting name containing the OAuth 2.0 client + * secret that was created for the app used for authentication. + * + * @param microsoftAccountClientSecretSettingName the microsoftAccountClientSecretSettingName value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountClientSecretSettingName( + String microsoftAccountClientSecretSettingName) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withMicrosoftAccountClientSecretSettingName(microsoftAccountClientSecretSettingName); + return this; + } + + /** + * Get the microsoftAccountOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Microsoft + * Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. + * Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx. + * + * @return the microsoftAccountOAuthScopes value. + */ + public List microsoftAccountOAuthScopes() { + return this.innerProperties() == null ? null : this.innerProperties().microsoftAccountOAuthScopes(); + } + + /** + * Set the microsoftAccountOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Microsoft + * Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. + * Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx. + * + * @param microsoftAccountOAuthScopes the microsoftAccountOAuthScopes value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withMicrosoftAccountOAuthScopes(List microsoftAccountOAuthScopes) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withMicrosoftAccountOAuthScopes(microsoftAccountOAuthScopes); + return this; + } + + /** + * Get the isAuthFromFile property: "true" if the auth config settings should be read from a file, "false" + * otherwise. + * + * @return the isAuthFromFile value. + */ + public String isAuthFromFile() { + return this.innerProperties() == null ? null : this.innerProperties().isAuthFromFile(); + } + + /** + * Set the isAuthFromFile property: "true" if the auth config settings should be read from a file, "false" + * otherwise. + * + * @param isAuthFromFile the isAuthFromFile value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withIsAuthFromFile(String isAuthFromFile) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withIsAuthFromFile(isAuthFromFile); + return this; + } + + /** + * Get the authFilePath property: The path of the config file containing auth settings. If the path is relative, + * base will the site's root directory. + * + * @return the authFilePath value. + */ + public String authFilePath() { + return this.innerProperties() == null ? null : this.innerProperties().authFilePath(); + } + + /** + * Set the authFilePath property: The path of the config file containing auth settings. If the path is relative, + * base will the site's root directory. + * + * @param authFilePath the authFilePath value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withAuthFilePath(String authFilePath) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withAuthFilePath(authFilePath); + return this; + } + + /** + * Get the configVersion property: The ConfigVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of the control plane for Authentication / + * Authorization. + * + * @return the configVersion value. + */ + public String configVersion() { + return this.innerProperties() == null ? null : this.innerProperties().configVersion(); + } + + /** + * Set the configVersion property: The ConfigVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of the control plane for Authentication / + * Authorization. + * + * @param configVersion the configVersion value to set. + * @return the SiteAuthSettingsInner object itself. + */ + public SiteAuthSettingsInner withConfigVersion(String configVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsProperties(); + } + this.innerProperties().withConfigVersion(configVersion); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsProperties.java new file mode 100644 index 0000000000000..0bf6cb6eaaae9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsProperties.java @@ -0,0 +1,1238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BuiltInAuthenticationProvider; +import com.azure.resourcemanager.appservice.generated.models.UnauthenticatedClientAction; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** SiteAuthSettings resource specific properties. */ +@Fluent +public final class SiteAuthSettingsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteAuthSettingsProperties.class); + + /* + * 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. + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /* + * The action to take when an unauthenticated client attempts to access the + * app. + */ + @JsonProperty(value = "unauthenticatedClientAction") + private UnauthenticatedClientAction unauthenticatedClientAction; + + /* + * true to durably store platform-specific security tokens + * that are obtained during login flows; otherwise, false. + * The default is false. + */ + @JsonProperty(value = "tokenStoreEnabled") + private Boolean tokenStoreEnabled; + + /* + * 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") + private List allowedExternalRedirectUrls; + + /* + * 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 = "defaultProvider") + private BuiltInAuthenticationProvider defaultProvider; + + /* + * The number of hours after session token expiration that a session token + * can be used to + * call the token refresh API. The default is 72 hours. + */ + @JsonProperty(value = "tokenRefreshExtensionHours") + private Double tokenRefreshExtensionHours; + + /* + * The Client ID of this relying party application, known as the client_id. + * This setting is required for enabling OpenID Connection authentication + * with Azure Active Directory or + * other 3rd party OpenID Connect providers. + * More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The Client Secret of this relying party application (in Azure Active + * Directory, this is also referred to as the Key). + * This setting is optional. If no client secret is configured, the OpenID + * Connect implicit auth flow is used to authenticate end users. + * Otherwise, the OpenID Connect Authorization Code Flow is used to + * authenticate end users. + * More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html + */ + @JsonProperty(value = "clientSecret") + private String clientSecret; + + /* + * 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 + * a replacement for the Client Secret. It is also optional. + */ + @JsonProperty(value = "clientSecretCertificateThumbprint") + private String clientSecretCertificateThumbprint; + + /* + * 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://sts.windows.net/{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 + */ + @JsonProperty(value = "issuer") + private String issuer; + + /* + * Gets a value indicating whether the issuer should be a valid HTTPS url + * and be validated as such. + */ + @JsonProperty(value = "validateIssuer") + private Boolean validateIssuer; + + /* + * Allowed audience values to consider when validating JWTs issued by + * Azure Active Directory. Note that the ClientID value is + * always considered an + * allowed audience, regardless of this setting. + */ + @JsonProperty(value = "allowedAudiences") + private List allowedAudiences; + + /* + * 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 = "additionalLoginParams") + private List additionalLoginParams; + + /* + * Gets a JSON string containing the Azure AD Acl settings. + */ + @JsonProperty(value = "aadClaimsAuthorization") + private String aadClaimsAuthorization; + + /* + * The OpenID Connect Client ID for the Google web application. + * This setting is required for enabling Google Sign-In. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/ + */ + @JsonProperty(value = "googleClientId") + private String googleClientId; + + /* + * The client secret associated with the Google web application. + * This setting is required for enabling Google Sign-In. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/ + */ + @JsonProperty(value = "googleClientSecret") + private String googleClientSecret; + + /* + * The app setting name that contains the client secret associated with + * the Google web application. + */ + @JsonProperty(value = "googleClientSecretSettingName") + private String googleClientSecretSettingName; + + /* + * The OAuth 2.0 scopes that will be requested as part of Google Sign-In + * authentication. + * This setting is optional. If not specified, "openid", "profile", and + * "email" are used as default scopes. + * Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/ + */ + @JsonProperty(value = "googleOAuthScopes") + private List googleOAuthScopes; + + /* + * The App ID of the Facebook app used for login. + * This setting is required for enabling Facebook Login. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login + */ + @JsonProperty(value = "facebookAppId") + private String facebookAppId; + + /* + * The App Secret of the Facebook app used for Facebook Login. + * This setting is required for enabling Facebook Login. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login + */ + @JsonProperty(value = "facebookAppSecret") + private String facebookAppSecret; + + /* + * The app setting name that contains the app secret used for Facebook + * Login. + */ + @JsonProperty(value = "facebookAppSecretSettingName") + private String facebookAppSecretSettingName; + + /* + * The OAuth 2.0 scopes that will be requested as part of Facebook Login + * authentication. + * This setting is optional. + * Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login + */ + @JsonProperty(value = "facebookOAuthScopes") + private List facebookOAuthScopes; + + /* + * The Client Id of the GitHub app used for login. + * This setting is required for enabling Github login + */ + @JsonProperty(value = "gitHubClientId") + private String gitHubClientId; + + /* + * The Client Secret of the GitHub app used for Github Login. + * This setting is required for enabling Github login. + */ + @JsonProperty(value = "gitHubClientSecret") + private String gitHubClientSecret; + + /* + * The app setting name that contains the client secret of the Github + * app used for GitHub Login. + */ + @JsonProperty(value = "gitHubClientSecretSettingName") + private String gitHubClientSecretSettingName; + + /* + * The OAuth 2.0 scopes that will be requested as part of GitHub Login + * authentication. + * This setting is optional + */ + @JsonProperty(value = "gitHubOAuthScopes") + private List gitHubOAuthScopes; + + /* + * The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + */ + @JsonProperty(value = "twitterConsumerKey") + private String twitterConsumerKey; + + /* + * The OAuth 1.0a consumer secret of the Twitter application used for + * sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + */ + @JsonProperty(value = "twitterConsumerSecret") + private String twitterConsumerSecret; + + /* + * The app setting name that contains the OAuth 1.0a consumer secret of the + * Twitter + * application used for sign-in. + */ + @JsonProperty(value = "twitterConsumerSecretSettingName") + private String twitterConsumerSecretSettingName; + + /* + * The OAuth 2.0 client ID that was created for the app used for + * authentication. + * This setting is required for enabling Microsoft Account authentication. + * Microsoft Account OAuth documentation: + * https://dev.onedrive.com/auth/msa_oauth.htm + */ + @JsonProperty(value = "microsoftAccountClientId") + private String microsoftAccountClientId; + + /* + * The OAuth 2.0 client secret that was created for the app used for + * authentication. + * This setting is required for enabling Microsoft Account authentication. + * Microsoft Account OAuth documentation: + * https://dev.onedrive.com/auth/msa_oauth.htm + */ + @JsonProperty(value = "microsoftAccountClientSecret") + private String microsoftAccountClientSecret; + + /* + * The app setting name containing the OAuth 2.0 client secret that was + * created for the + * app used for authentication. + */ + @JsonProperty(value = "microsoftAccountClientSecretSettingName") + private String microsoftAccountClientSecretSettingName; + + /* + * The OAuth 2.0 scopes that will be requested as part of Microsoft Account + * authentication. + * This setting is optional. If not specified, "wl.basic" is used as the + * default scope. + * Microsoft Account Scopes and permissions documentation: + * https://msdn.microsoft.com/en-us/library/dn631845.aspx + */ + @JsonProperty(value = "microsoftAccountOAuthScopes") + private List microsoftAccountOAuthScopes; + + /* + * "true" if the auth config settings should be read from a file, + * "false" otherwise + */ + @JsonProperty(value = "isAuthFromFile") + private String isAuthFromFile; + + /* + * The path of the config file containing auth settings. + * If the path is relative, base will the site's root directory. + */ + @JsonProperty(value = "authFilePath") + private String authFilePath; + + /* + * The ConfigVersion of the Authentication / Authorization feature in use + * for the current app. + * The setting in this value can control the behavior of the control plane + * for Authentication / Authorization. + */ + @JsonProperty(value = "configVersion") + private String configVersion; + + /** + * Get the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled + * for the current app; otherwise, <code>false</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled + * for the current app; otherwise, <code>false</code>. + * + * @param enabled the enabled value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of certain features in the Authentication / + * Authorization module. + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of certain features in the Authentication / + * Authorization module. + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to + * access the app. + * + * @return the unauthenticatedClientAction value. + */ + public UnauthenticatedClientAction unauthenticatedClientAction() { + return this.unauthenticatedClientAction; + } + + /** + * Set the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to + * access the app. + * + * @param unauthenticatedClientAction the unauthenticatedClientAction value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withUnauthenticatedClientAction( + UnauthenticatedClientAction unauthenticatedClientAction) { + this.unauthenticatedClientAction = unauthenticatedClientAction; + return this; + } + + /** + * Get the tokenStoreEnabled property: <code>true</code> to durably store platform-specific security + * tokens that are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @return the tokenStoreEnabled value. + */ + public Boolean tokenStoreEnabled() { + return this.tokenStoreEnabled; + } + + /** + * Set the tokenStoreEnabled property: <code>true</code> to durably store platform-specific security + * tokens that are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @param tokenStoreEnabled the tokenStoreEnabled value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withTokenStoreEnabled(Boolean tokenStoreEnabled) { + this.tokenStoreEnabled = tokenStoreEnabled; + return this; + } + + /** + * Get the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or + * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting + * typically only needed by Windows Store application backends. Note that URLs within the current domain are always + * implicitly allowed. + * + * @return the allowedExternalRedirectUrls value. + */ + public List allowedExternalRedirectUrls() { + return this.allowedExternalRedirectUrls; + } + + /** + * Set the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or + * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting + * typically only needed by Windows Store application backends. Note that URLs within the current domain are always + * implicitly allowed. + * + * @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withAllowedExternalRedirectUrls(List allowedExternalRedirectUrls) { + this.allowedExternalRedirectUrls = allowedExternalRedirectUrls; + return this; + } + + /** + * Get the defaultProvider property: The default authentication provider to use when multiple providers are + * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". + * + * @return the defaultProvider value. + */ + public BuiltInAuthenticationProvider defaultProvider() { + return this.defaultProvider; + } + + /** + * Set the defaultProvider property: The default authentication provider to use when multiple providers are + * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". + * + * @param defaultProvider the defaultProvider value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withDefaultProvider(BuiltInAuthenticationProvider defaultProvider) { + this.defaultProvider = defaultProvider; + return this; + } + + /** + * Get the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @return the tokenRefreshExtensionHours value. + */ + public Double tokenRefreshExtensionHours() { + return this.tokenRefreshExtensionHours; + } + + /** + * Set the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @param tokenRefreshExtensionHours the tokenRefreshExtensionHours value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withTokenRefreshExtensionHours(Double tokenRefreshExtensionHours) { + this.tokenRefreshExtensionHours = tokenRefreshExtensionHours; + return this; + } + + /** + * Get the clientId property: The Client ID of this relying party application, known as the client_id. This setting + * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID + * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The Client ID of this relying party application, known as the client_id. This setting + * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID + * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * + * @param clientId the clientId value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecret property: The Client Secret of this relying party application (in Azure Active Directory, + * this is also referred to as the Key). This setting is optional. If no client secret is configured, the OpenID + * Connect implicit auth flow is used to authenticate end users. Otherwise, the OpenID Connect Authorization Code + * Flow is used to authenticate end users. More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret property: The Client Secret of this relying party application (in Azure Active Directory, + * this is also referred to as the Key). This setting is optional. If no client secret is configured, the OpenID + * Connect implicit auth flow is used to authenticate end users. Otherwise, the OpenID Connect Authorization Code + * Flow is used to authenticate end users. More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html. + * + * @param clientSecret the clientSecret value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get the clientSecretSettingName property: The app setting name that contains the client secret of the relying + * party application. + * + * @return the clientSecretSettingName value. + */ + public String clientSecretSettingName() { + return this.clientSecretSettingName; + } + + /** + * Set the clientSecretSettingName property: The app setting name that contains the client secret of the relying + * party application. + * + * @param clientSecretSettingName the clientSecretSettingName value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withClientSecretSettingName(String clientSecretSettingName) { + this.clientSecretSettingName = clientSecretSettingName; + return this; + } + + /** + * Get the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint + * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also + * optional. + * + * @return the clientSecretCertificateThumbprint value. + */ + public String clientSecretCertificateThumbprint() { + return this.clientSecretCertificateThumbprint; + } + + /** + * Set the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint + * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also + * optional. + * + * @param clientSecretCertificateThumbprint the clientSecretCertificateThumbprint value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withClientSecretCertificateThumbprint(String clientSecretCertificateThumbprint) { + this.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint; + return this; + } + + /** + * Get the issuer property: The OpenID Connect Issuer URI that represents the entity which issues access tokens for + * this application. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + * https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. More + * information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * + * @return the issuer value. + */ + public String issuer() { + return this.issuer; + } + + /** + * Set the issuer property: The OpenID Connect Issuer URI that represents the entity which issues access tokens for + * this application. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + * https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. More + * information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * + * @param issuer the issuer value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withIssuer(String issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get the validateIssuer property: Gets a value indicating whether the issuer should be a valid HTTPS url and be + * validated as such. + * + * @return the validateIssuer value. + */ + public Boolean validateIssuer() { + return this.validateIssuer; + } + + /** + * Set the validateIssuer property: Gets a value indicating whether the issuer should be a valid HTTPS url and be + * validated as such. + * + * @param validateIssuer the validateIssuer value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withValidateIssuer(Boolean validateIssuer) { + this.validateIssuer = validateIssuer; + return this; + } + + /** + * Get the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure + * Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience, + * regardless of this setting. + * + * @return the allowedAudiences value. + */ + public List allowedAudiences() { + return this.allowedAudiences; + } + + /** + * Set the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure + * Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience, + * regardless of this setting. + * + * @param allowedAudiences the allowedAudiences value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withAllowedAudiences(List allowedAudiences) { + this.allowedAudiences = allowedAudiences; + return this; + } + + /** + * Get the additionalLoginParams property: Login parameters to send to the OpenID Connect authorization endpoint + * when a user logs in. Each parameter must be in the form "key=value". + * + * @return the additionalLoginParams value. + */ + public List additionalLoginParams() { + return this.additionalLoginParams; + } + + /** + * Set the additionalLoginParams property: Login parameters to send to the OpenID Connect authorization endpoint + * when a user logs in. Each parameter must be in the form "key=value". + * + * @param additionalLoginParams the additionalLoginParams value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withAdditionalLoginParams(List additionalLoginParams) { + this.additionalLoginParams = additionalLoginParams; + return this; + } + + /** + * Get the aadClaimsAuthorization property: Gets a JSON string containing the Azure AD Acl settings. + * + * @return the aadClaimsAuthorization value. + */ + public String aadClaimsAuthorization() { + return this.aadClaimsAuthorization; + } + + /** + * Set the aadClaimsAuthorization property: Gets a JSON string containing the Azure AD Acl settings. + * + * @param aadClaimsAuthorization the aadClaimsAuthorization value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withAadClaimsAuthorization(String aadClaimsAuthorization) { + this.aadClaimsAuthorization = aadClaimsAuthorization; + return this; + } + + /** + * Get the googleClientId property: The OpenID Connect Client ID for the Google web application. This setting is + * required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @return the googleClientId value. + */ + public String googleClientId() { + return this.googleClientId; + } + + /** + * Set the googleClientId property: The OpenID Connect Client ID for the Google web application. This setting is + * required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @param googleClientId the googleClientId value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withGoogleClientId(String googleClientId) { + this.googleClientId = googleClientId; + return this; + } + + /** + * Get the googleClientSecret property: The client secret associated with the Google web application. This setting + * is required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @return the googleClientSecret value. + */ + public String googleClientSecret() { + return this.googleClientSecret; + } + + /** + * Set the googleClientSecret property: The client secret associated with the Google web application. This setting + * is required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @param googleClientSecret the googleClientSecret value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withGoogleClientSecret(String googleClientSecret) { + this.googleClientSecret = googleClientSecret; + return this; + } + + /** + * Get the googleClientSecretSettingName property: The app setting name that contains the client secret associated + * with the Google web application. + * + * @return the googleClientSecretSettingName value. + */ + public String googleClientSecretSettingName() { + return this.googleClientSecretSettingName; + } + + /** + * Set the googleClientSecretSettingName property: The app setting name that contains the client secret associated + * with the Google web application. + * + * @param googleClientSecretSettingName the googleClientSecretSettingName value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withGoogleClientSecretSettingName(String googleClientSecretSettingName) { + this.googleClientSecretSettingName = googleClientSecretSettingName; + return this; + } + + /** + * Get the googleOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Google Sign-In + * authentication. This setting is optional. If not specified, "openid", "profile", and "email" are used as default + * scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + * + * @return the googleOAuthScopes value. + */ + public List googleOAuthScopes() { + return this.googleOAuthScopes; + } + + /** + * Set the googleOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Google Sign-In + * authentication. This setting is optional. If not specified, "openid", "profile", and "email" are used as default + * scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + * + * @param googleOAuthScopes the googleOAuthScopes value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withGoogleOAuthScopes(List googleOAuthScopes) { + this.googleOAuthScopes = googleOAuthScopes; + return this; + } + + /** + * Get the facebookAppId property: The App ID of the Facebook app used for login. This setting is required for + * enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookAppId value. + */ + public String facebookAppId() { + return this.facebookAppId; + } + + /** + * Set the facebookAppId property: The App ID of the Facebook app used for login. This setting is required for + * enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + * + * @param facebookAppId the facebookAppId value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withFacebookAppId(String facebookAppId) { + this.facebookAppId = facebookAppId; + return this; + } + + /** + * Get the facebookAppSecret property: The App Secret of the Facebook app used for Facebook Login. This setting is + * required for enabling Facebook Login. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookAppSecret value. + */ + public String facebookAppSecret() { + return this.facebookAppSecret; + } + + /** + * Set the facebookAppSecret property: The App Secret of the Facebook app used for Facebook Login. This setting is + * required for enabling Facebook Login. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @param facebookAppSecret the facebookAppSecret value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withFacebookAppSecret(String facebookAppSecret) { + this.facebookAppSecret = facebookAppSecret; + return this; + } + + /** + * Get the facebookAppSecretSettingName property: The app setting name that contains the app secret used for + * Facebook Login. + * + * @return the facebookAppSecretSettingName value. + */ + public String facebookAppSecretSettingName() { + return this.facebookAppSecretSettingName; + } + + /** + * Set the facebookAppSecretSettingName property: The app setting name that contains the app secret used for + * Facebook Login. + * + * @param facebookAppSecretSettingName the facebookAppSecretSettingName value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withFacebookAppSecretSettingName(String facebookAppSecretSettingName) { + this.facebookAppSecretSettingName = facebookAppSecretSettingName; + return this; + } + + /** + * Get the facebookOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Facebook Login + * authentication. This setting is optional. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookOAuthScopes value. + */ + public List facebookOAuthScopes() { + return this.facebookOAuthScopes; + } + + /** + * Set the facebookOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Facebook Login + * authentication. This setting is optional. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @param facebookOAuthScopes the facebookOAuthScopes value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withFacebookOAuthScopes(List facebookOAuthScopes) { + this.facebookOAuthScopes = facebookOAuthScopes; + return this; + } + + /** + * Get the gitHubClientId property: The Client Id of the GitHub app used for login. This setting is required for + * enabling Github login. + * + * @return the gitHubClientId value. + */ + public String gitHubClientId() { + return this.gitHubClientId; + } + + /** + * Set the gitHubClientId property: The Client Id of the GitHub app used for login. This setting is required for + * enabling Github login. + * + * @param gitHubClientId the gitHubClientId value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withGitHubClientId(String gitHubClientId) { + this.gitHubClientId = gitHubClientId; + return this; + } + + /** + * Get the gitHubClientSecret property: The Client Secret of the GitHub app used for Github Login. This setting is + * required for enabling Github login. + * + * @return the gitHubClientSecret value. + */ + public String gitHubClientSecret() { + return this.gitHubClientSecret; + } + + /** + * Set the gitHubClientSecret property: The Client Secret of the GitHub app used for Github Login. This setting is + * required for enabling Github login. + * + * @param gitHubClientSecret the gitHubClientSecret value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withGitHubClientSecret(String gitHubClientSecret) { + this.gitHubClientSecret = gitHubClientSecret; + return this; + } + + /** + * Get the gitHubClientSecretSettingName property: The app setting name that contains the client secret of the + * Github app used for GitHub Login. + * + * @return the gitHubClientSecretSettingName value. + */ + public String gitHubClientSecretSettingName() { + return this.gitHubClientSecretSettingName; + } + + /** + * Set the gitHubClientSecretSettingName property: The app setting name that contains the client secret of the + * Github app used for GitHub Login. + * + * @param gitHubClientSecretSettingName the gitHubClientSecretSettingName value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withGitHubClientSecretSettingName(String gitHubClientSecretSettingName) { + this.gitHubClientSecretSettingName = gitHubClientSecretSettingName; + return this; + } + + /** + * Get the gitHubOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of GitHub Login + * authentication. This setting is optional. + * + * @return the gitHubOAuthScopes value. + */ + public List gitHubOAuthScopes() { + return this.gitHubOAuthScopes; + } + + /** + * Set the gitHubOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of GitHub Login + * authentication. This setting is optional. + * + * @param gitHubOAuthScopes the gitHubOAuthScopes value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withGitHubOAuthScopes(List gitHubOAuthScopes) { + this.gitHubOAuthScopes = gitHubOAuthScopes; + return this; + } + + /** + * Get the twitterConsumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @return the twitterConsumerKey value. + */ + public String twitterConsumerKey() { + return this.twitterConsumerKey; + } + + /** + * Set the twitterConsumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @param twitterConsumerKey the twitterConsumerKey value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withTwitterConsumerKey(String twitterConsumerKey) { + this.twitterConsumerKey = twitterConsumerKey; + return this; + } + + /** + * Get the twitterConsumerSecret property: The OAuth 1.0a consumer secret of the Twitter application used for + * sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @return the twitterConsumerSecret value. + */ + public String twitterConsumerSecret() { + return this.twitterConsumerSecret; + } + + /** + * Set the twitterConsumerSecret property: The OAuth 1.0a consumer secret of the Twitter application used for + * sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @param twitterConsumerSecret the twitterConsumerSecret value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withTwitterConsumerSecret(String twitterConsumerSecret) { + this.twitterConsumerSecret = twitterConsumerSecret; + return this; + } + + /** + * Get the twitterConsumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer + * secret of the Twitter application used for sign-in. + * + * @return the twitterConsumerSecretSettingName value. + */ + public String twitterConsumerSecretSettingName() { + return this.twitterConsumerSecretSettingName; + } + + /** + * Set the twitterConsumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer + * secret of the Twitter application used for sign-in. + * + * @param twitterConsumerSecretSettingName the twitterConsumerSecretSettingName value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withTwitterConsumerSecretSettingName(String twitterConsumerSecretSettingName) { + this.twitterConsumerSecretSettingName = twitterConsumerSecretSettingName; + return this; + } + + /** + * Get the microsoftAccountClientId property: The OAuth 2.0 client ID that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @return the microsoftAccountClientId value. + */ + public String microsoftAccountClientId() { + return this.microsoftAccountClientId; + } + + /** + * Set the microsoftAccountClientId property: The OAuth 2.0 client ID that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @param microsoftAccountClientId the microsoftAccountClientId value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withMicrosoftAccountClientId(String microsoftAccountClientId) { + this.microsoftAccountClientId = microsoftAccountClientId; + return this; + } + + /** + * Get the microsoftAccountClientSecret property: The OAuth 2.0 client secret that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @return the microsoftAccountClientSecret value. + */ + public String microsoftAccountClientSecret() { + return this.microsoftAccountClientSecret; + } + + /** + * Set the microsoftAccountClientSecret property: The OAuth 2.0 client secret that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @param microsoftAccountClientSecret the microsoftAccountClientSecret value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withMicrosoftAccountClientSecret(String microsoftAccountClientSecret) { + this.microsoftAccountClientSecret = microsoftAccountClientSecret; + return this; + } + + /** + * Get the microsoftAccountClientSecretSettingName property: The app setting name containing the OAuth 2.0 client + * secret that was created for the app used for authentication. + * + * @return the microsoftAccountClientSecretSettingName value. + */ + public String microsoftAccountClientSecretSettingName() { + return this.microsoftAccountClientSecretSettingName; + } + + /** + * Set the microsoftAccountClientSecretSettingName property: The app setting name containing the OAuth 2.0 client + * secret that was created for the app used for authentication. + * + * @param microsoftAccountClientSecretSettingName the microsoftAccountClientSecretSettingName value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withMicrosoftAccountClientSecretSettingName( + String microsoftAccountClientSecretSettingName) { + this.microsoftAccountClientSecretSettingName = microsoftAccountClientSecretSettingName; + return this; + } + + /** + * Get the microsoftAccountOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Microsoft + * Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. + * Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx. + * + * @return the microsoftAccountOAuthScopes value. + */ + public List microsoftAccountOAuthScopes() { + return this.microsoftAccountOAuthScopes; + } + + /** + * Set the microsoftAccountOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Microsoft + * Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. + * Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx. + * + * @param microsoftAccountOAuthScopes the microsoftAccountOAuthScopes value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withMicrosoftAccountOAuthScopes(List microsoftAccountOAuthScopes) { + this.microsoftAccountOAuthScopes = microsoftAccountOAuthScopes; + return this; + } + + /** + * Get the isAuthFromFile property: "true" if the auth config settings should be read from a file, "false" + * otherwise. + * + * @return the isAuthFromFile value. + */ + public String isAuthFromFile() { + return this.isAuthFromFile; + } + + /** + * Set the isAuthFromFile property: "true" if the auth config settings should be read from a file, "false" + * otherwise. + * + * @param isAuthFromFile the isAuthFromFile value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withIsAuthFromFile(String isAuthFromFile) { + this.isAuthFromFile = isAuthFromFile; + return this; + } + + /** + * Get the authFilePath property: The path of the config file containing auth settings. If the path is relative, + * base will the site's root directory. + * + * @return the authFilePath value. + */ + public String authFilePath() { + return this.authFilePath; + } + + /** + * Set the authFilePath property: The path of the config file containing auth settings. If the path is relative, + * base will the site's root directory. + * + * @param authFilePath the authFilePath value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withAuthFilePath(String authFilePath) { + this.authFilePath = authFilePath; + return this; + } + + /** + * Get the configVersion property: The ConfigVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of the control plane for Authentication / + * Authorization. + * + * @return the configVersion value. + */ + public String configVersion() { + return this.configVersion; + } + + /** + * Set the configVersion property: The ConfigVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of the control plane for Authentication / + * Authorization. + * + * @param configVersion the configVersion value to set. + * @return the SiteAuthSettingsProperties object itself. + */ + public SiteAuthSettingsProperties withConfigVersion(String configVersion) { + this.configVersion = configVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsV2Inner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsV2Inner.java new file mode 100644 index 0000000000000..e25a44e4d36d4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsV2Inner.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AuthPlatform; +import com.azure.resourcemanager.appservice.generated.models.GlobalValidation; +import com.azure.resourcemanager.appservice.generated.models.HttpSettings; +import com.azure.resourcemanager.appservice.generated.models.IdentityProviders; +import com.azure.resourcemanager.appservice.generated.models.Login; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration settings for the Azure App Service Authentication / Authorization V2 feature. */ +@Fluent +public final class SiteAuthSettingsV2Inner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteAuthSettingsV2Inner.class); + + /* + * SiteAuthSettingsV2 resource specific properties + */ + @JsonProperty(value = "properties") + private SiteAuthSettingsV2Properties innerProperties; + + /** + * Get the innerProperties property: SiteAuthSettingsV2 resource specific properties. + * + * @return the innerProperties value. + */ + private SiteAuthSettingsV2Properties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SiteAuthSettingsV2Inner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the platform property: The configuration settings of the platform of App Service + * Authentication/Authorization. + * + * @return the platform value. + */ + public AuthPlatform platform() { + return this.innerProperties() == null ? null : this.innerProperties().platform(); + } + + /** + * Set the platform property: The configuration settings of the platform of App Service + * Authentication/Authorization. + * + * @param platform the platform value to set. + * @return the SiteAuthSettingsV2Inner object itself. + */ + public SiteAuthSettingsV2Inner withPlatform(AuthPlatform platform) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsV2Properties(); + } + this.innerProperties().withPlatform(platform); + return this; + } + + /** + * Get the globalValidation property: The configuration settings that determines the validation flow of users using + * App Service Authentication/Authorization. + * + * @return the globalValidation value. + */ + public GlobalValidation globalValidation() { + return this.innerProperties() == null ? null : this.innerProperties().globalValidation(); + } + + /** + * Set the globalValidation property: The configuration settings that determines the validation flow of users using + * App Service Authentication/Authorization. + * + * @param globalValidation the globalValidation value to set. + * @return the SiteAuthSettingsV2Inner object itself. + */ + public SiteAuthSettingsV2Inner withGlobalValidation(GlobalValidation globalValidation) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsV2Properties(); + } + this.innerProperties().withGlobalValidation(globalValidation); + return this; + } + + /** + * Get the identityProviders property: The configuration settings of each of the identity providers used to + * configure App Service Authentication/Authorization. + * + * @return the identityProviders value. + */ + public IdentityProviders identityProviders() { + return this.innerProperties() == null ? null : this.innerProperties().identityProviders(); + } + + /** + * Set the identityProviders property: The configuration settings of each of the identity providers used to + * configure App Service Authentication/Authorization. + * + * @param identityProviders the identityProviders value to set. + * @return the SiteAuthSettingsV2Inner object itself. + */ + public SiteAuthSettingsV2Inner withIdentityProviders(IdentityProviders identityProviders) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsV2Properties(); + } + this.innerProperties().withIdentityProviders(identityProviders); + return this; + } + + /** + * Get the login property: The configuration settings of the login flow of users using App Service + * Authentication/Authorization. + * + * @return the login value. + */ + public Login login() { + return this.innerProperties() == null ? null : this.innerProperties().login(); + } + + /** + * Set the login property: The configuration settings of the login flow of users using App Service + * Authentication/Authorization. + * + * @param login the login value to set. + * @return the SiteAuthSettingsV2Inner object itself. + */ + public SiteAuthSettingsV2Inner withLogin(Login login) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsV2Properties(); + } + this.innerProperties().withLogin(login); + return this; + } + + /** + * Get the httpSettings property: The configuration settings of the HTTP requests for authentication and + * authorization requests made against App Service Authentication/Authorization. + * + * @return the httpSettings value. + */ + public HttpSettings httpSettings() { + return this.innerProperties() == null ? null : this.innerProperties().httpSettings(); + } + + /** + * Set the httpSettings property: The configuration settings of the HTTP requests for authentication and + * authorization requests made against App Service Authentication/Authorization. + * + * @param httpSettings the httpSettings value to set. + * @return the SiteAuthSettingsV2Inner object itself. + */ + public SiteAuthSettingsV2Inner withHttpSettings(HttpSettings httpSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteAuthSettingsV2Properties(); + } + this.innerProperties().withHttpSettings(httpSettings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsV2Properties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsV2Properties.java new file mode 100644 index 0000000000000..77e01448a7af1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteAuthSettingsV2Properties.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.AuthPlatform; +import com.azure.resourcemanager.appservice.generated.models.GlobalValidation; +import com.azure.resourcemanager.appservice.generated.models.HttpSettings; +import com.azure.resourcemanager.appservice.generated.models.IdentityProviders; +import com.azure.resourcemanager.appservice.generated.models.Login; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SiteAuthSettingsV2 resource specific properties. */ +@Fluent +public final class SiteAuthSettingsV2Properties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteAuthSettingsV2Properties.class); + + /* + * The configuration settings of the platform of App Service + * Authentication/Authorization. + */ + @JsonProperty(value = "platform") + private AuthPlatform platform; + + /* + * The configuration settings that determines the validation flow of users + * using App Service Authentication/Authorization. + */ + @JsonProperty(value = "globalValidation") + private GlobalValidation globalValidation; + + /* + * The configuration settings of each of the identity providers used to + * configure App Service Authentication/Authorization. + */ + @JsonProperty(value = "identityProviders") + private IdentityProviders identityProviders; + + /* + * The configuration settings of the login flow of users using App Service + * Authentication/Authorization. + */ + @JsonProperty(value = "login") + private Login login; + + /* + * The configuration settings of the HTTP requests for authentication and + * authorization requests made against App Service + * Authentication/Authorization. + */ + @JsonProperty(value = "httpSettings") + private HttpSettings httpSettings; + + /** + * Get the platform property: The configuration settings of the platform of App Service + * Authentication/Authorization. + * + * @return the platform value. + */ + public AuthPlatform platform() { + return this.platform; + } + + /** + * Set the platform property: The configuration settings of the platform of App Service + * Authentication/Authorization. + * + * @param platform the platform value to set. + * @return the SiteAuthSettingsV2Properties object itself. + */ + public SiteAuthSettingsV2Properties withPlatform(AuthPlatform platform) { + this.platform = platform; + return this; + } + + /** + * Get the globalValidation property: The configuration settings that determines the validation flow of users using + * App Service Authentication/Authorization. + * + * @return the globalValidation value. + */ + public GlobalValidation globalValidation() { + return this.globalValidation; + } + + /** + * Set the globalValidation property: The configuration settings that determines the validation flow of users using + * App Service Authentication/Authorization. + * + * @param globalValidation the globalValidation value to set. + * @return the SiteAuthSettingsV2Properties object itself. + */ + public SiteAuthSettingsV2Properties withGlobalValidation(GlobalValidation globalValidation) { + this.globalValidation = globalValidation; + return this; + } + + /** + * Get the identityProviders property: The configuration settings of each of the identity providers used to + * configure App Service Authentication/Authorization. + * + * @return the identityProviders value. + */ + public IdentityProviders identityProviders() { + return this.identityProviders; + } + + /** + * Set the identityProviders property: The configuration settings of each of the identity providers used to + * configure App Service Authentication/Authorization. + * + * @param identityProviders the identityProviders value to set. + * @return the SiteAuthSettingsV2Properties object itself. + */ + public SiteAuthSettingsV2Properties withIdentityProviders(IdentityProviders identityProviders) { + this.identityProviders = identityProviders; + return this; + } + + /** + * Get the login property: The configuration settings of the login flow of users using App Service + * Authentication/Authorization. + * + * @return the login value. + */ + public Login login() { + return this.login; + } + + /** + * Set the login property: The configuration settings of the login flow of users using App Service + * Authentication/Authorization. + * + * @param login the login value to set. + * @return the SiteAuthSettingsV2Properties object itself. + */ + public SiteAuthSettingsV2Properties withLogin(Login login) { + this.login = login; + return this; + } + + /** + * Get the httpSettings property: The configuration settings of the HTTP requests for authentication and + * authorization requests made against App Service Authentication/Authorization. + * + * @return the httpSettings value. + */ + public HttpSettings httpSettings() { + return this.httpSettings; + } + + /** + * Set the httpSettings property: The configuration settings of the HTTP requests for authentication and + * authorization requests made against App Service Authentication/Authorization. + * + * @param httpSettings the httpSettings value to set. + * @return the SiteAuthSettingsV2Properties object itself. + */ + public SiteAuthSettingsV2Properties withHttpSettings(HttpSettings httpSettings) { + this.httpSettings = httpSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (platform() != null) { + platform().validate(); + } + if (globalValidation() != null) { + globalValidation().validate(); + } + if (identityProviders() != null) { + identityProviders().validate(); + } + if (login() != null) { + login().validate(); + } + if (httpSettings() != null) { + httpSettings().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteCloneabilityInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteCloneabilityInner.java new file mode 100644 index 0000000000000..accbcde3c7a34 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteCloneabilityInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.CloneAbilityResult; +import com.azure.resourcemanager.appservice.generated.models.SiteCloneabilityCriterion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents whether or not an app is cloneable. */ +@Fluent +public final class SiteCloneabilityInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteCloneabilityInner.class); + + /* + * Name of app. + */ + @JsonProperty(value = "result") + private CloneAbilityResult result; + + /* + * List of features enabled on app that prevent cloning. + */ + @JsonProperty(value = "blockingFeatures") + private List blockingFeatures; + + /* + * List of features enabled on app that are non-blocking but cannot be + * cloned. The app can still be cloned + * but the features in this list will not be set up on cloned app. + */ + @JsonProperty(value = "unsupportedFeatures") + private List unsupportedFeatures; + + /* + * List of blocking application characteristics. + */ + @JsonProperty(value = "blockingCharacteristics") + private List blockingCharacteristics; + + /** + * Get the result property: Name of app. + * + * @return the result value. + */ + public CloneAbilityResult result() { + return this.result; + } + + /** + * Set the result property: Name of app. + * + * @param result the result value to set. + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withResult(CloneAbilityResult result) { + this.result = result; + return this; + } + + /** + * Get the blockingFeatures property: List of features enabled on app that prevent cloning. + * + * @return the blockingFeatures value. + */ + public List blockingFeatures() { + return this.blockingFeatures; + } + + /** + * Set the blockingFeatures property: List of features enabled on app that prevent cloning. + * + * @param blockingFeatures the blockingFeatures value to set. + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withBlockingFeatures(List blockingFeatures) { + this.blockingFeatures = blockingFeatures; + return this; + } + + /** + * Get the unsupportedFeatures property: List of features enabled on app that are non-blocking but cannot be cloned. + * The app can still be cloned but the features in this list will not be set up on cloned app. + * + * @return the unsupportedFeatures value. + */ + public List unsupportedFeatures() { + return this.unsupportedFeatures; + } + + /** + * Set the unsupportedFeatures property: List of features enabled on app that are non-blocking but cannot be cloned. + * The app can still be cloned but the features in this list will not be set up on cloned app. + * + * @param unsupportedFeatures the unsupportedFeatures value to set. + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withUnsupportedFeatures(List unsupportedFeatures) { + this.unsupportedFeatures = unsupportedFeatures; + return this; + } + + /** + * Get the blockingCharacteristics property: List of blocking application characteristics. + * + * @return the blockingCharacteristics value. + */ + public List blockingCharacteristics() { + return this.blockingCharacteristics; + } + + /** + * Set the blockingCharacteristics property: List of blocking application characteristics. + * + * @param blockingCharacteristics the blockingCharacteristics value to set. + * @return the SiteCloneabilityInner object itself. + */ + public SiteCloneabilityInner withBlockingCharacteristics(List blockingCharacteristics) { + this.blockingCharacteristics = blockingCharacteristics; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (blockingFeatures() != null) { + blockingFeatures().forEach(e -> e.validate()); + } + if (unsupportedFeatures() != null) { + unsupportedFeatures().forEach(e -> e.validate()); + } + if (blockingCharacteristics() != null) { + blockingCharacteristics().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigInner.java new file mode 100644 index 0000000000000..d3a817a6a34d0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigInner.java @@ -0,0 +1,1899 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ApiDefinitionInfo; +import com.azure.resourcemanager.appservice.generated.models.ApiManagementConfig; +import com.azure.resourcemanager.appservice.generated.models.AutoHealRules; +import com.azure.resourcemanager.appservice.generated.models.AzureStorageInfoValue; +import com.azure.resourcemanager.appservice.generated.models.ConnStringInfo; +import com.azure.resourcemanager.appservice.generated.models.CorsSettings; +import com.azure.resourcemanager.appservice.generated.models.Experiments; +import com.azure.resourcemanager.appservice.generated.models.FtpsState; +import com.azure.resourcemanager.appservice.generated.models.HandlerMapping; +import com.azure.resourcemanager.appservice.generated.models.IpSecurityRestriction; +import com.azure.resourcemanager.appservice.generated.models.ManagedPipelineMode; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.ScmType; +import com.azure.resourcemanager.appservice.generated.models.SiteLimits; +import com.azure.resourcemanager.appservice.generated.models.SiteLoadBalancing; +import com.azure.resourcemanager.appservice.generated.models.SiteMachineKey; +import com.azure.resourcemanager.appservice.generated.models.SupportedTlsVersions; +import com.azure.resourcemanager.appservice.generated.models.VirtualApplication; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** Configuration of an App Service app. */ +@Fluent +public final class SiteConfigInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteConfigInner.class); + + /* + * Number of workers. + */ + @JsonProperty(value = "numberOfWorkers") + private Integer numberOfWorkers; + + /* + * Default documents. + */ + @JsonProperty(value = "defaultDocuments") + private List defaultDocuments; + + /* + * .NET Framework version. + */ + @JsonProperty(value = "netFrameworkVersion") + private String netFrameworkVersion; + + /* + * Version of PHP. + */ + @JsonProperty(value = "phpVersion") + private String phpVersion; + + /* + * Version of Python. + */ + @JsonProperty(value = "pythonVersion") + private String pythonVersion; + + /* + * Version of Node.js. + */ + @JsonProperty(value = "nodeVersion") + private String nodeVersion; + + /* + * Version of PowerShell. + */ + @JsonProperty(value = "powerShellVersion") + private String powerShellVersion; + + /* + * Linux App Framework and version + */ + @JsonProperty(value = "linuxFxVersion") + private String linuxFxVersion; + + /* + * Xenon App Framework and version + */ + @JsonProperty(value = "windowsFxVersion") + private String windowsFxVersion; + + /* + * true if request tracing is enabled; otherwise, + * false. + */ + @JsonProperty(value = "requestTracingEnabled") + private Boolean requestTracingEnabled; + + /* + * Request tracing expiration time. + */ + @JsonProperty(value = "requestTracingExpirationTime") + private OffsetDateTime requestTracingExpirationTime; + + /* + * true if remote debugging is enabled; otherwise, + * false. + */ + @JsonProperty(value = "remoteDebuggingEnabled") + private Boolean remoteDebuggingEnabled; + + /* + * Remote debugging version. + */ + @JsonProperty(value = "remoteDebuggingVersion") + private String remoteDebuggingVersion; + + /* + * true if HTTP logging is enabled; otherwise, + * false. + */ + @JsonProperty(value = "httpLoggingEnabled") + private Boolean httpLoggingEnabled; + + /* + * Flag to use Managed Identity Creds for ACR pull + */ + @JsonProperty(value = "acrUseManagedIdentityCreds") + private Boolean acrUseManagedIdentityCreds; + + /* + * If using user managed identity, the user managed identity ClientId + */ + @JsonProperty(value = "acrUserManagedIdentityID") + private String acrUserManagedIdentityId; + + /* + * HTTP logs directory size limit. + */ + @JsonProperty(value = "logsDirectorySizeLimit") + private Integer logsDirectorySizeLimit; + + /* + * true if detailed error logging is enabled; otherwise, + * false. + */ + @JsonProperty(value = "detailedErrorLoggingEnabled") + private Boolean detailedErrorLoggingEnabled; + + /* + * Publishing user name. + */ + @JsonProperty(value = "publishingUsername") + private String publishingUsername; + + /* + * Application settings. + */ + @JsonProperty(value = "appSettings") + private List appSettings; + + /* + * Connection strings. + */ + @JsonProperty(value = "connectionStrings") + private List connectionStrings; + + /* + * Site MachineKey. + */ + @JsonProperty(value = "machineKey", access = JsonProperty.Access.WRITE_ONLY) + private SiteMachineKey machineKey; + + /* + * Handler mappings. + */ + @JsonProperty(value = "handlerMappings") + private List handlerMappings; + + /* + * Document root. + */ + @JsonProperty(value = "documentRoot") + private String documentRoot; + + /* + * SCM type. + */ + @JsonProperty(value = "scmType") + private ScmType scmType; + + /* + * true to use 32-bit worker process; otherwise, + * false. + */ + @JsonProperty(value = "use32BitWorkerProcess") + private Boolean use32BitWorkerProcess; + + /* + * true if WebSocket is enabled; otherwise, + * false. + */ + @JsonProperty(value = "webSocketsEnabled") + private Boolean webSocketsEnabled; + + /* + * true if Always On is enabled; otherwise, + * false. + */ + @JsonProperty(value = "alwaysOn") + private Boolean alwaysOn; + + /* + * Java version. + */ + @JsonProperty(value = "javaVersion") + private String javaVersion; + + /* + * Java container. + */ + @JsonProperty(value = "javaContainer") + private String javaContainer; + + /* + * Java container version. + */ + @JsonProperty(value = "javaContainerVersion") + private String javaContainerVersion; + + /* + * App command line to launch. + */ + @JsonProperty(value = "appCommandLine") + private String appCommandLine; + + /* + * Managed pipeline mode. + */ + @JsonProperty(value = "managedPipelineMode") + private ManagedPipelineMode managedPipelineMode; + + /* + * Virtual applications. + */ + @JsonProperty(value = "virtualApplications") + private List virtualApplications; + + /* + * Site load balancing. + */ + @JsonProperty(value = "loadBalancing") + private SiteLoadBalancing loadBalancing; + + /* + * This is work around for polymorphic types. + */ + @JsonProperty(value = "experiments") + private Experiments experiments; + + /* + * Site limits. + */ + @JsonProperty(value = "limits") + private SiteLimits limits; + + /* + * true if Auto Heal is enabled; otherwise, + * false. + */ + @JsonProperty(value = "autoHealEnabled") + private Boolean autoHealEnabled; + + /* + * Auto Heal rules. + */ + @JsonProperty(value = "autoHealRules") + private AutoHealRules autoHealRules; + + /* + * Tracing options. + */ + @JsonProperty(value = "tracingOptions") + private String tracingOptions; + + /* + * Virtual Network name. + */ + @JsonProperty(value = "vnetName") + private String vnetName; + + /* + * Virtual Network Route All enabled. This causes all outbound traffic to + * have Virtual Network Security Groups and User Defined Routes applied. + */ + @JsonProperty(value = "vnetRouteAllEnabled") + private Boolean vnetRouteAllEnabled; + + /* + * The number of private ports assigned to this app. These will be assigned + * dynamically on runtime. + */ + @JsonProperty(value = "vnetPrivatePortsCount") + private Integer vnetPrivatePortsCount; + + /* + * Cross-Origin Resource Sharing (CORS) settings. + */ + @JsonProperty(value = "cors") + private CorsSettings cors; + + /* + * Push endpoint settings. + */ + @JsonProperty(value = "push") + private PushSettingsInner push; + + /* + * Information about the formal API definition for the app. + */ + @JsonProperty(value = "apiDefinition") + private ApiDefinitionInfo apiDefinition; + + /* + * Azure API management settings linked to the app. + */ + @JsonProperty(value = "apiManagementConfig") + private ApiManagementConfig apiManagementConfig; + + /* + * Auto-swap slot name. + */ + @JsonProperty(value = "autoSwapSlotName") + private String autoSwapSlotName; + + /* + * true to enable local MySQL; otherwise, false. + */ + @JsonProperty(value = "localMySqlEnabled") + private Boolean localMySqlEnabled; + + /* + * Managed Service Identity Id + */ + @JsonProperty(value = "managedServiceIdentityId") + private Integer managedServiceIdentityId; + + /* + * Explicit Managed Service Identity Id + */ + @JsonProperty(value = "xManagedServiceIdentityId") + private Integer xManagedServiceIdentityId; + + /* + * Identity to use for Key Vault Reference authentication. + */ + @JsonProperty(value = "keyVaultReferenceIdentity") + private String keyVaultReferenceIdentity; + + /* + * IP security restrictions for main. + */ + @JsonProperty(value = "ipSecurityRestrictions") + private List ipSecurityRestrictions; + + /* + * IP security restrictions for scm. + */ + @JsonProperty(value = "scmIpSecurityRestrictions") + private List scmIpSecurityRestrictions; + + /* + * IP security restrictions for scm to use main. + */ + @JsonProperty(value = "scmIpSecurityRestrictionsUseMain") + private Boolean scmIpSecurityRestrictionsUseMain; + + /* + * Http20Enabled: configures a web site to allow clients to connect over + * http2.0 + */ + @JsonProperty(value = "http20Enabled") + private Boolean http20Enabled; + + /* + * MinTlsVersion: configures the minimum version of TLS required for SSL + * requests + */ + @JsonProperty(value = "minTlsVersion") + private SupportedTlsVersions minTlsVersion; + + /* + * ScmMinTlsVersion: configures the minimum version of TLS required for SSL + * requests for SCM site + */ + @JsonProperty(value = "scmMinTlsVersion") + private SupportedTlsVersions scmMinTlsVersion; + + /* + * State of FTP / FTPS service + */ + @JsonProperty(value = "ftpsState") + private FtpsState ftpsState; + + /* + * Number of preWarmed instances. + * This setting only applies to the Consumption and Elastic Plans + */ + @JsonProperty(value = "preWarmedInstanceCount") + private Integer preWarmedInstanceCount; + + /* + * Maximum number of workers that a site can scale out to. + * This setting only applies to the Consumption and Elastic Premium Plans + */ + @JsonProperty(value = "functionAppScaleLimit") + private Integer functionAppScaleLimit; + + /* + * Health check path + */ + @JsonProperty(value = "healthCheckPath") + private String healthCheckPath; + + /* + * Gets or sets a value indicating whether functions runtime scale + * monitoring is enabled. When enabled, + * the ScaleController will not monitor event sources directly, but will + * instead call to the + * runtime to get scale status. + */ + @JsonProperty(value = "functionsRuntimeScaleMonitoringEnabled") + private Boolean functionsRuntimeScaleMonitoringEnabled; + + /* + * Sets the time zone a site uses for generating timestamps. Compatible + * with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app + * setting takes precedence over this config. For Linux, expects tz + * database values https://www.iana.org/time-zones (for a quick reference + * see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For + * Windows, expects one of the time zones listed under + * HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time + * Zones + */ + @JsonProperty(value = "websiteTimeZone") + private String websiteTimeZone; + + /* + * Number of minimum instance count for a site + * This setting only applies to the Elastic Plans + */ + @JsonProperty(value = "minimumElasticInstanceCount") + private Integer minimumElasticInstanceCount; + + /* + * List of Azure Storage Accounts. + */ + @JsonProperty(value = "azureStorageAccounts") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map azureStorageAccounts; + + /* + * Property to allow or block all public traffic. + */ + @JsonProperty(value = "publicNetworkAccess") + private String publicNetworkAccess; + + /** + * Get the numberOfWorkers property: Number of workers. + * + * @return the numberOfWorkers value. + */ + public Integer numberOfWorkers() { + return this.numberOfWorkers; + } + + /** + * Set the numberOfWorkers property: Number of workers. + * + * @param numberOfWorkers the numberOfWorkers value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withNumberOfWorkers(Integer numberOfWorkers) { + this.numberOfWorkers = numberOfWorkers; + return this; + } + + /** + * Get the defaultDocuments property: Default documents. + * + * @return the defaultDocuments value. + */ + public List defaultDocuments() { + return this.defaultDocuments; + } + + /** + * Set the defaultDocuments property: Default documents. + * + * @param defaultDocuments the defaultDocuments value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withDefaultDocuments(List defaultDocuments) { + this.defaultDocuments = defaultDocuments; + return this; + } + + /** + * Get the netFrameworkVersion property: .NET Framework version. + * + * @return the netFrameworkVersion value. + */ + public String netFrameworkVersion() { + return this.netFrameworkVersion; + } + + /** + * Set the netFrameworkVersion property: .NET Framework version. + * + * @param netFrameworkVersion the netFrameworkVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withNetFrameworkVersion(String netFrameworkVersion) { + this.netFrameworkVersion = netFrameworkVersion; + return this; + } + + /** + * Get the phpVersion property: Version of PHP. + * + * @return the phpVersion value. + */ + public String phpVersion() { + return this.phpVersion; + } + + /** + * Set the phpVersion property: Version of PHP. + * + * @param phpVersion the phpVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withPhpVersion(String phpVersion) { + this.phpVersion = phpVersion; + return this; + } + + /** + * Get the pythonVersion property: Version of Python. + * + * @return the pythonVersion value. + */ + public String pythonVersion() { + return this.pythonVersion; + } + + /** + * Set the pythonVersion property: Version of Python. + * + * @param pythonVersion the pythonVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withPythonVersion(String pythonVersion) { + this.pythonVersion = pythonVersion; + return this; + } + + /** + * Get the nodeVersion property: Version of Node.js. + * + * @return the nodeVersion value. + */ + public String nodeVersion() { + return this.nodeVersion; + } + + /** + * Set the nodeVersion property: Version of Node.js. + * + * @param nodeVersion the nodeVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withNodeVersion(String nodeVersion) { + this.nodeVersion = nodeVersion; + return this; + } + + /** + * Get the powerShellVersion property: Version of PowerShell. + * + * @return the powerShellVersion value. + */ + public String powerShellVersion() { + return this.powerShellVersion; + } + + /** + * Set the powerShellVersion property: Version of PowerShell. + * + * @param powerShellVersion the powerShellVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withPowerShellVersion(String powerShellVersion) { + this.powerShellVersion = powerShellVersion; + return this; + } + + /** + * Get the linuxFxVersion property: Linux App Framework and version. + * + * @return the linuxFxVersion value. + */ + public String linuxFxVersion() { + return this.linuxFxVersion; + } + + /** + * Set the linuxFxVersion property: Linux App Framework and version. + * + * @param linuxFxVersion the linuxFxVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withLinuxFxVersion(String linuxFxVersion) { + this.linuxFxVersion = linuxFxVersion; + return this; + } + + /** + * Get the windowsFxVersion property: Xenon App Framework and version. + * + * @return the windowsFxVersion value. + */ + public String windowsFxVersion() { + return this.windowsFxVersion; + } + + /** + * Set the windowsFxVersion property: Xenon App Framework and version. + * + * @param windowsFxVersion the windowsFxVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withWindowsFxVersion(String windowsFxVersion) { + this.windowsFxVersion = windowsFxVersion; + return this; + } + + /** + * Get the requestTracingEnabled property: <code>true</code> if request tracing is enabled; otherwise, + * <code>false</code>. + * + * @return the requestTracingEnabled value. + */ + public Boolean requestTracingEnabled() { + return this.requestTracingEnabled; + } + + /** + * Set the requestTracingEnabled property: <code>true</code> if request tracing is enabled; otherwise, + * <code>false</code>. + * + * @param requestTracingEnabled the requestTracingEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withRequestTracingEnabled(Boolean requestTracingEnabled) { + this.requestTracingEnabled = requestTracingEnabled; + return this; + } + + /** + * Get the requestTracingExpirationTime property: Request tracing expiration time. + * + * @return the requestTracingExpirationTime value. + */ + public OffsetDateTime requestTracingExpirationTime() { + return this.requestTracingExpirationTime; + } + + /** + * Set the requestTracingExpirationTime property: Request tracing expiration time. + * + * @param requestTracingExpirationTime the requestTracingExpirationTime value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withRequestTracingExpirationTime(OffsetDateTime requestTracingExpirationTime) { + this.requestTracingExpirationTime = requestTracingExpirationTime; + return this; + } + + /** + * Get the remoteDebuggingEnabled property: <code>true</code> if remote debugging is enabled; otherwise, + * <code>false</code>. + * + * @return the remoteDebuggingEnabled value. + */ + public Boolean remoteDebuggingEnabled() { + return this.remoteDebuggingEnabled; + } + + /** + * Set the remoteDebuggingEnabled property: <code>true</code> if remote debugging is enabled; otherwise, + * <code>false</code>. + * + * @param remoteDebuggingEnabled the remoteDebuggingEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withRemoteDebuggingEnabled(Boolean remoteDebuggingEnabled) { + this.remoteDebuggingEnabled = remoteDebuggingEnabled; + return this; + } + + /** + * Get the remoteDebuggingVersion property: Remote debugging version. + * + * @return the remoteDebuggingVersion value. + */ + public String remoteDebuggingVersion() { + return this.remoteDebuggingVersion; + } + + /** + * Set the remoteDebuggingVersion property: Remote debugging version. + * + * @param remoteDebuggingVersion the remoteDebuggingVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withRemoteDebuggingVersion(String remoteDebuggingVersion) { + this.remoteDebuggingVersion = remoteDebuggingVersion; + return this; + } + + /** + * Get the httpLoggingEnabled property: <code>true</code> if HTTP logging is enabled; otherwise, + * <code>false</code>. + * + * @return the httpLoggingEnabled value. + */ + public Boolean httpLoggingEnabled() { + return this.httpLoggingEnabled; + } + + /** + * Set the httpLoggingEnabled property: <code>true</code> if HTTP logging is enabled; otherwise, + * <code>false</code>. + * + * @param httpLoggingEnabled the httpLoggingEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withHttpLoggingEnabled(Boolean httpLoggingEnabled) { + this.httpLoggingEnabled = httpLoggingEnabled; + return this; + } + + /** + * Get the acrUseManagedIdentityCreds property: Flag to use Managed Identity Creds for ACR pull. + * + * @return the acrUseManagedIdentityCreds value. + */ + public Boolean acrUseManagedIdentityCreds() { + return this.acrUseManagedIdentityCreds; + } + + /** + * Set the acrUseManagedIdentityCreds property: Flag to use Managed Identity Creds for ACR pull. + * + * @param acrUseManagedIdentityCreds the acrUseManagedIdentityCreds value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAcrUseManagedIdentityCreds(Boolean acrUseManagedIdentityCreds) { + this.acrUseManagedIdentityCreds = acrUseManagedIdentityCreds; + return this; + } + + /** + * Get the acrUserManagedIdentityId property: If using user managed identity, the user managed identity ClientId. + * + * @return the acrUserManagedIdentityId value. + */ + public String acrUserManagedIdentityId() { + return this.acrUserManagedIdentityId; + } + + /** + * Set the acrUserManagedIdentityId property: If using user managed identity, the user managed identity ClientId. + * + * @param acrUserManagedIdentityId the acrUserManagedIdentityId value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAcrUserManagedIdentityId(String acrUserManagedIdentityId) { + this.acrUserManagedIdentityId = acrUserManagedIdentityId; + return this; + } + + /** + * Get the logsDirectorySizeLimit property: HTTP logs directory size limit. + * + * @return the logsDirectorySizeLimit value. + */ + public Integer logsDirectorySizeLimit() { + return this.logsDirectorySizeLimit; + } + + /** + * Set the logsDirectorySizeLimit property: HTTP logs directory size limit. + * + * @param logsDirectorySizeLimit the logsDirectorySizeLimit value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withLogsDirectorySizeLimit(Integer logsDirectorySizeLimit) { + this.logsDirectorySizeLimit = logsDirectorySizeLimit; + return this; + } + + /** + * Get the detailedErrorLoggingEnabled property: <code>true</code> if detailed error logging is enabled; + * otherwise, <code>false</code>. + * + * @return the detailedErrorLoggingEnabled value. + */ + public Boolean detailedErrorLoggingEnabled() { + return this.detailedErrorLoggingEnabled; + } + + /** + * Set the detailedErrorLoggingEnabled property: <code>true</code> if detailed error logging is enabled; + * otherwise, <code>false</code>. + * + * @param detailedErrorLoggingEnabled the detailedErrorLoggingEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withDetailedErrorLoggingEnabled(Boolean detailedErrorLoggingEnabled) { + this.detailedErrorLoggingEnabled = detailedErrorLoggingEnabled; + return this; + } + + /** + * Get the publishingUsername property: Publishing user name. + * + * @return the publishingUsername value. + */ + public String publishingUsername() { + return this.publishingUsername; + } + + /** + * Set the publishingUsername property: Publishing user name. + * + * @param publishingUsername the publishingUsername value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withPublishingUsername(String publishingUsername) { + this.publishingUsername = publishingUsername; + return this; + } + + /** + * Get the appSettings property: Application settings. + * + * @return the appSettings value. + */ + public List appSettings() { + return this.appSettings; + } + + /** + * Set the appSettings property: Application settings. + * + * @param appSettings the appSettings value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAppSettings(List appSettings) { + this.appSettings = appSettings; + return this; + } + + /** + * Get the connectionStrings property: Connection strings. + * + * @return the connectionStrings value. + */ + public List connectionStrings() { + return this.connectionStrings; + } + + /** + * Set the connectionStrings property: Connection strings. + * + * @param connectionStrings the connectionStrings value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withConnectionStrings(List connectionStrings) { + this.connectionStrings = connectionStrings; + return this; + } + + /** + * Get the machineKey property: Site MachineKey. + * + * @return the machineKey value. + */ + public SiteMachineKey machineKey() { + return this.machineKey; + } + + /** + * Get the handlerMappings property: Handler mappings. + * + * @return the handlerMappings value. + */ + public List handlerMappings() { + return this.handlerMappings; + } + + /** + * Set the handlerMappings property: Handler mappings. + * + * @param handlerMappings the handlerMappings value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withHandlerMappings(List handlerMappings) { + this.handlerMappings = handlerMappings; + return this; + } + + /** + * Get the documentRoot property: Document root. + * + * @return the documentRoot value. + */ + public String documentRoot() { + return this.documentRoot; + } + + /** + * Set the documentRoot property: Document root. + * + * @param documentRoot the documentRoot value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withDocumentRoot(String documentRoot) { + this.documentRoot = documentRoot; + return this; + } + + /** + * Get the scmType property: SCM type. + * + * @return the scmType value. + */ + public ScmType scmType() { + return this.scmType; + } + + /** + * Set the scmType property: SCM type. + * + * @param scmType the scmType value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withScmType(ScmType scmType) { + this.scmType = scmType; + return this; + } + + /** + * Get the use32BitWorkerProcess property: <code>true</code> to use 32-bit worker process; otherwise, + * <code>false</code>. + * + * @return the use32BitWorkerProcess value. + */ + public Boolean use32BitWorkerProcess() { + return this.use32BitWorkerProcess; + } + + /** + * Set the use32BitWorkerProcess property: <code>true</code> to use 32-bit worker process; otherwise, + * <code>false</code>. + * + * @param use32BitWorkerProcess the use32BitWorkerProcess value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withUse32BitWorkerProcess(Boolean use32BitWorkerProcess) { + this.use32BitWorkerProcess = use32BitWorkerProcess; + return this; + } + + /** + * Get the webSocketsEnabled property: <code>true</code> if WebSocket is enabled; otherwise, + * <code>false</code>. + * + * @return the webSocketsEnabled value. + */ + public Boolean webSocketsEnabled() { + return this.webSocketsEnabled; + } + + /** + * Set the webSocketsEnabled property: <code>true</code> if WebSocket is enabled; otherwise, + * <code>false</code>. + * + * @param webSocketsEnabled the webSocketsEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withWebSocketsEnabled(Boolean webSocketsEnabled) { + this.webSocketsEnabled = webSocketsEnabled; + return this; + } + + /** + * Get the alwaysOn property: <code>true</code> if Always On is enabled; otherwise, + * <code>false</code>. + * + * @return the alwaysOn value. + */ + public Boolean alwaysOn() { + return this.alwaysOn; + } + + /** + * Set the alwaysOn property: <code>true</code> if Always On is enabled; otherwise, + * <code>false</code>. + * + * @param alwaysOn the alwaysOn value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAlwaysOn(Boolean alwaysOn) { + this.alwaysOn = alwaysOn; + return this; + } + + /** + * Get the javaVersion property: Java version. + * + * @return the javaVersion value. + */ + public String javaVersion() { + return this.javaVersion; + } + + /** + * Set the javaVersion property: Java version. + * + * @param javaVersion the javaVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withJavaVersion(String javaVersion) { + this.javaVersion = javaVersion; + return this; + } + + /** + * Get the javaContainer property: Java container. + * + * @return the javaContainer value. + */ + public String javaContainer() { + return this.javaContainer; + } + + /** + * Set the javaContainer property: Java container. + * + * @param javaContainer the javaContainer value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withJavaContainer(String javaContainer) { + this.javaContainer = javaContainer; + return this; + } + + /** + * Get the javaContainerVersion property: Java container version. + * + * @return the javaContainerVersion value. + */ + public String javaContainerVersion() { + return this.javaContainerVersion; + } + + /** + * Set the javaContainerVersion property: Java container version. + * + * @param javaContainerVersion the javaContainerVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withJavaContainerVersion(String javaContainerVersion) { + this.javaContainerVersion = javaContainerVersion; + return this; + } + + /** + * Get the appCommandLine property: App command line to launch. + * + * @return the appCommandLine value. + */ + public String appCommandLine() { + return this.appCommandLine; + } + + /** + * Set the appCommandLine property: App command line to launch. + * + * @param appCommandLine the appCommandLine value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAppCommandLine(String appCommandLine) { + this.appCommandLine = appCommandLine; + return this; + } + + /** + * Get the managedPipelineMode property: Managed pipeline mode. + * + * @return the managedPipelineMode value. + */ + public ManagedPipelineMode managedPipelineMode() { + return this.managedPipelineMode; + } + + /** + * Set the managedPipelineMode property: Managed pipeline mode. + * + * @param managedPipelineMode the managedPipelineMode value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withManagedPipelineMode(ManagedPipelineMode managedPipelineMode) { + this.managedPipelineMode = managedPipelineMode; + return this; + } + + /** + * Get the virtualApplications property: Virtual applications. + * + * @return the virtualApplications value. + */ + public List virtualApplications() { + return this.virtualApplications; + } + + /** + * Set the virtualApplications property: Virtual applications. + * + * @param virtualApplications the virtualApplications value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withVirtualApplications(List virtualApplications) { + this.virtualApplications = virtualApplications; + return this; + } + + /** + * Get the loadBalancing property: Site load balancing. + * + * @return the loadBalancing value. + */ + public SiteLoadBalancing loadBalancing() { + return this.loadBalancing; + } + + /** + * Set the loadBalancing property: Site load balancing. + * + * @param loadBalancing the loadBalancing value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withLoadBalancing(SiteLoadBalancing loadBalancing) { + this.loadBalancing = loadBalancing; + return this; + } + + /** + * Get the experiments property: This is work around for polymorphic types. + * + * @return the experiments value. + */ + public Experiments experiments() { + return this.experiments; + } + + /** + * Set the experiments property: This is work around for polymorphic types. + * + * @param experiments the experiments value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withExperiments(Experiments experiments) { + this.experiments = experiments; + return this; + } + + /** + * Get the limits property: Site limits. + * + * @return the limits value. + */ + public SiteLimits limits() { + return this.limits; + } + + /** + * Set the limits property: Site limits. + * + * @param limits the limits value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withLimits(SiteLimits limits) { + this.limits = limits; + return this; + } + + /** + * Get the autoHealEnabled property: <code>true</code> if Auto Heal is enabled; otherwise, + * <code>false</code>. + * + * @return the autoHealEnabled value. + */ + public Boolean autoHealEnabled() { + return this.autoHealEnabled; + } + + /** + * Set the autoHealEnabled property: <code>true</code> if Auto Heal is enabled; otherwise, + * <code>false</code>. + * + * @param autoHealEnabled the autoHealEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAutoHealEnabled(Boolean autoHealEnabled) { + this.autoHealEnabled = autoHealEnabled; + return this; + } + + /** + * Get the autoHealRules property: Auto Heal rules. + * + * @return the autoHealRules value. + */ + public AutoHealRules autoHealRules() { + return this.autoHealRules; + } + + /** + * Set the autoHealRules property: Auto Heal rules. + * + * @param autoHealRules the autoHealRules value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAutoHealRules(AutoHealRules autoHealRules) { + this.autoHealRules = autoHealRules; + return this; + } + + /** + * Get the tracingOptions property: Tracing options. + * + * @return the tracingOptions value. + */ + public String tracingOptions() { + return this.tracingOptions; + } + + /** + * Set the tracingOptions property: Tracing options. + * + * @param tracingOptions the tracingOptions value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withTracingOptions(String tracingOptions) { + this.tracingOptions = tracingOptions; + return this; + } + + /** + * Get the vnetName property: Virtual Network name. + * + * @return the vnetName value. + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName property: Virtual Network name. + * + * @param vnetName the vnetName value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the vnetRouteAllEnabled property: Virtual Network Route All enabled. This causes all outbound traffic to have + * Virtual Network Security Groups and User Defined Routes applied. + * + * @return the vnetRouteAllEnabled value. + */ + public Boolean vnetRouteAllEnabled() { + return this.vnetRouteAllEnabled; + } + + /** + * Set the vnetRouteAllEnabled property: Virtual Network Route All enabled. This causes all outbound traffic to have + * Virtual Network Security Groups and User Defined Routes applied. + * + * @param vnetRouteAllEnabled the vnetRouteAllEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withVnetRouteAllEnabled(Boolean vnetRouteAllEnabled) { + this.vnetRouteAllEnabled = vnetRouteAllEnabled; + return this; + } + + /** + * Get the vnetPrivatePortsCount property: The number of private ports assigned to this app. These will be assigned + * dynamically on runtime. + * + * @return the vnetPrivatePortsCount value. + */ + public Integer vnetPrivatePortsCount() { + return this.vnetPrivatePortsCount; + } + + /** + * Set the vnetPrivatePortsCount property: The number of private ports assigned to this app. These will be assigned + * dynamically on runtime. + * + * @param vnetPrivatePortsCount the vnetPrivatePortsCount value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withVnetPrivatePortsCount(Integer vnetPrivatePortsCount) { + this.vnetPrivatePortsCount = vnetPrivatePortsCount; + return this; + } + + /** + * Get the cors property: Cross-Origin Resource Sharing (CORS) settings. + * + * @return the cors value. + */ + public CorsSettings cors() { + return this.cors; + } + + /** + * Set the cors property: Cross-Origin Resource Sharing (CORS) settings. + * + * @param cors the cors value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withCors(CorsSettings cors) { + this.cors = cors; + return this; + } + + /** + * Get the push property: Push endpoint settings. + * + * @return the push value. + */ + public PushSettingsInner push() { + return this.push; + } + + /** + * Set the push property: Push endpoint settings. + * + * @param push the push value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withPush(PushSettingsInner push) { + this.push = push; + return this; + } + + /** + * Get the apiDefinition property: Information about the formal API definition for the app. + * + * @return the apiDefinition value. + */ + public ApiDefinitionInfo apiDefinition() { + return this.apiDefinition; + } + + /** + * Set the apiDefinition property: Information about the formal API definition for the app. + * + * @param apiDefinition the apiDefinition value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withApiDefinition(ApiDefinitionInfo apiDefinition) { + this.apiDefinition = apiDefinition; + return this; + } + + /** + * Get the apiManagementConfig property: Azure API management settings linked to the app. + * + * @return the apiManagementConfig value. + */ + public ApiManagementConfig apiManagementConfig() { + return this.apiManagementConfig; + } + + /** + * Set the apiManagementConfig property: Azure API management settings linked to the app. + * + * @param apiManagementConfig the apiManagementConfig value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withApiManagementConfig(ApiManagementConfig apiManagementConfig) { + this.apiManagementConfig = apiManagementConfig; + return this; + } + + /** + * Get the autoSwapSlotName property: Auto-swap slot name. + * + * @return the autoSwapSlotName value. + */ + public String autoSwapSlotName() { + return this.autoSwapSlotName; + } + + /** + * Set the autoSwapSlotName property: Auto-swap slot name. + * + * @param autoSwapSlotName the autoSwapSlotName value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAutoSwapSlotName(String autoSwapSlotName) { + this.autoSwapSlotName = autoSwapSlotName; + return this; + } + + /** + * Get the localMySqlEnabled property: <code>true</code> to enable local MySQL; otherwise, + * <code>false</code>. + * + * @return the localMySqlEnabled value. + */ + public Boolean localMySqlEnabled() { + return this.localMySqlEnabled; + } + + /** + * Set the localMySqlEnabled property: <code>true</code> to enable local MySQL; otherwise, + * <code>false</code>. + * + * @param localMySqlEnabled the localMySqlEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withLocalMySqlEnabled(Boolean localMySqlEnabled) { + this.localMySqlEnabled = localMySqlEnabled; + return this; + } + + /** + * Get the managedServiceIdentityId property: Managed Service Identity Id. + * + * @return the managedServiceIdentityId value. + */ + public Integer managedServiceIdentityId() { + return this.managedServiceIdentityId; + } + + /** + * Set the managedServiceIdentityId property: Managed Service Identity Id. + * + * @param managedServiceIdentityId the managedServiceIdentityId value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withManagedServiceIdentityId(Integer managedServiceIdentityId) { + this.managedServiceIdentityId = managedServiceIdentityId; + return this; + } + + /** + * Get the xManagedServiceIdentityId property: Explicit Managed Service Identity Id. + * + * @return the xManagedServiceIdentityId value. + */ + public Integer xManagedServiceIdentityId() { + return this.xManagedServiceIdentityId; + } + + /** + * Set the xManagedServiceIdentityId property: Explicit Managed Service Identity Id. + * + * @param xManagedServiceIdentityId the xManagedServiceIdentityId value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withXManagedServiceIdentityId(Integer xManagedServiceIdentityId) { + this.xManagedServiceIdentityId = xManagedServiceIdentityId; + return this; + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.keyVaultReferenceIdentity; + } + + /** + * Set the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @param keyVaultReferenceIdentity the keyVaultReferenceIdentity value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity) { + this.keyVaultReferenceIdentity = keyVaultReferenceIdentity; + return this; + } + + /** + * Get the ipSecurityRestrictions property: IP security restrictions for main. + * + * @return the ipSecurityRestrictions value. + */ + public List ipSecurityRestrictions() { + return this.ipSecurityRestrictions; + } + + /** + * Set the ipSecurityRestrictions property: IP security restrictions for main. + * + * @param ipSecurityRestrictions the ipSecurityRestrictions value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withIpSecurityRestrictions(List ipSecurityRestrictions) { + this.ipSecurityRestrictions = ipSecurityRestrictions; + return this; + } + + /** + * Get the scmIpSecurityRestrictions property: IP security restrictions for scm. + * + * @return the scmIpSecurityRestrictions value. + */ + public List scmIpSecurityRestrictions() { + return this.scmIpSecurityRestrictions; + } + + /** + * Set the scmIpSecurityRestrictions property: IP security restrictions for scm. + * + * @param scmIpSecurityRestrictions the scmIpSecurityRestrictions value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withScmIpSecurityRestrictions(List scmIpSecurityRestrictions) { + this.scmIpSecurityRestrictions = scmIpSecurityRestrictions; + return this; + } + + /** + * Get the scmIpSecurityRestrictionsUseMain property: IP security restrictions for scm to use main. + * + * @return the scmIpSecurityRestrictionsUseMain value. + */ + public Boolean scmIpSecurityRestrictionsUseMain() { + return this.scmIpSecurityRestrictionsUseMain; + } + + /** + * Set the scmIpSecurityRestrictionsUseMain property: IP security restrictions for scm to use main. + * + * @param scmIpSecurityRestrictionsUseMain the scmIpSecurityRestrictionsUseMain value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withScmIpSecurityRestrictionsUseMain(Boolean scmIpSecurityRestrictionsUseMain) { + this.scmIpSecurityRestrictionsUseMain = scmIpSecurityRestrictionsUseMain; + return this; + } + + /** + * Get the http20Enabled property: Http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @return the http20Enabled value. + */ + public Boolean http20Enabled() { + return this.http20Enabled; + } + + /** + * Set the http20Enabled property: Http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @param http20Enabled the http20Enabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withHttp20Enabled(Boolean http20Enabled) { + this.http20Enabled = http20Enabled; + return this; + } + + /** + * Get the minTlsVersion property: MinTlsVersion: configures the minimum version of TLS required for SSL requests. + * + * @return the minTlsVersion value. + */ + public SupportedTlsVersions minTlsVersion() { + return this.minTlsVersion; + } + + /** + * Set the minTlsVersion property: MinTlsVersion: configures the minimum version of TLS required for SSL requests. + * + * @param minTlsVersion the minTlsVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withMinTlsVersion(SupportedTlsVersions minTlsVersion) { + this.minTlsVersion = minTlsVersion; + return this; + } + + /** + * Get the scmMinTlsVersion property: ScmMinTlsVersion: configures the minimum version of TLS required for SSL + * requests for SCM site. + * + * @return the scmMinTlsVersion value. + */ + public SupportedTlsVersions scmMinTlsVersion() { + return this.scmMinTlsVersion; + } + + /** + * Set the scmMinTlsVersion property: ScmMinTlsVersion: configures the minimum version of TLS required for SSL + * requests for SCM site. + * + * @param scmMinTlsVersion the scmMinTlsVersion value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withScmMinTlsVersion(SupportedTlsVersions scmMinTlsVersion) { + this.scmMinTlsVersion = scmMinTlsVersion; + return this; + } + + /** + * Get the ftpsState property: State of FTP / FTPS service. + * + * @return the ftpsState value. + */ + public FtpsState ftpsState() { + return this.ftpsState; + } + + /** + * Set the ftpsState property: State of FTP / FTPS service. + * + * @param ftpsState the ftpsState value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withFtpsState(FtpsState ftpsState) { + this.ftpsState = ftpsState; + return this; + } + + /** + * Get the preWarmedInstanceCount property: Number of preWarmed instances. This setting only applies to the + * Consumption and Elastic Plans. + * + * @return the preWarmedInstanceCount value. + */ + public Integer preWarmedInstanceCount() { + return this.preWarmedInstanceCount; + } + + /** + * Set the preWarmedInstanceCount property: Number of preWarmed instances. This setting only applies to the + * Consumption and Elastic Plans. + * + * @param preWarmedInstanceCount the preWarmedInstanceCount value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withPreWarmedInstanceCount(Integer preWarmedInstanceCount) { + this.preWarmedInstanceCount = preWarmedInstanceCount; + return this; + } + + /** + * Get the functionAppScaleLimit property: Maximum number of workers that a site can scale out to. This setting only + * applies to the Consumption and Elastic Premium Plans. + * + * @return the functionAppScaleLimit value. + */ + public Integer functionAppScaleLimit() { + return this.functionAppScaleLimit; + } + + /** + * Set the functionAppScaleLimit property: Maximum number of workers that a site can scale out to. This setting only + * applies to the Consumption and Elastic Premium Plans. + * + * @param functionAppScaleLimit the functionAppScaleLimit value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withFunctionAppScaleLimit(Integer functionAppScaleLimit) { + this.functionAppScaleLimit = functionAppScaleLimit; + return this; + } + + /** + * Get the healthCheckPath property: Health check path. + * + * @return the healthCheckPath value. + */ + public String healthCheckPath() { + return this.healthCheckPath; + } + + /** + * Set the healthCheckPath property: Health check path. + * + * @param healthCheckPath the healthCheckPath value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withHealthCheckPath(String healthCheckPath) { + this.healthCheckPath = healthCheckPath; + return this; + } + + /** + * Get the functionsRuntimeScaleMonitoringEnabled property: Gets or sets a value indicating whether functions + * runtime scale monitoring is enabled. When enabled, the ScaleController will not monitor event sources directly, + * but will instead call to the runtime to get scale status. + * + * @return the functionsRuntimeScaleMonitoringEnabled value. + */ + public Boolean functionsRuntimeScaleMonitoringEnabled() { + return this.functionsRuntimeScaleMonitoringEnabled; + } + + /** + * Set the functionsRuntimeScaleMonitoringEnabled property: Gets or sets a value indicating whether functions + * runtime scale monitoring is enabled. When enabled, the ScaleController will not monitor event sources directly, + * but will instead call to the runtime to get scale status. + * + * @param functionsRuntimeScaleMonitoringEnabled the functionsRuntimeScaleMonitoringEnabled value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withFunctionsRuntimeScaleMonitoringEnabled(Boolean functionsRuntimeScaleMonitoringEnabled) { + this.functionsRuntimeScaleMonitoringEnabled = functionsRuntimeScaleMonitoringEnabled; + return this; + } + + /** + * Get the websiteTimeZone property: Sets the time zone a site uses for generating timestamps. Compatible with Linux + * and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, + * expects tz database values https://www.iana.org/time-zones (for a quick reference see + * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed + * under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * + * @return the websiteTimeZone value. + */ + public String websiteTimeZone() { + return this.websiteTimeZone; + } + + /** + * Set the websiteTimeZone property: Sets the time zone a site uses for generating timestamps. Compatible with Linux + * and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, + * expects tz database values https://www.iana.org/time-zones (for a quick reference see + * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed + * under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * + * @param websiteTimeZone the websiteTimeZone value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withWebsiteTimeZone(String websiteTimeZone) { + this.websiteTimeZone = websiteTimeZone; + return this; + } + + /** + * Get the minimumElasticInstanceCount property: Number of minimum instance count for a site This setting only + * applies to the Elastic Plans. + * + * @return the minimumElasticInstanceCount value. + */ + public Integer minimumElasticInstanceCount() { + return this.minimumElasticInstanceCount; + } + + /** + * Set the minimumElasticInstanceCount property: Number of minimum instance count for a site This setting only + * applies to the Elastic Plans. + * + * @param minimumElasticInstanceCount the minimumElasticInstanceCount value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withMinimumElasticInstanceCount(Integer minimumElasticInstanceCount) { + this.minimumElasticInstanceCount = minimumElasticInstanceCount; + return this; + } + + /** + * Get the azureStorageAccounts property: List of Azure Storage Accounts. + * + * @return the azureStorageAccounts value. + */ + public Map azureStorageAccounts() { + return this.azureStorageAccounts; + } + + /** + * Set the azureStorageAccounts property: List of Azure Storage Accounts. + * + * @param azureStorageAccounts the azureStorageAccounts value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withAzureStorageAccounts(Map azureStorageAccounts) { + this.azureStorageAccounts = azureStorageAccounts; + return this; + } + + /** + * Get the publicNetworkAccess property: Property to allow or block all public traffic. + * + * @return the publicNetworkAccess value. + */ + public String publicNetworkAccess() { + return this.publicNetworkAccess; + } + + /** + * Set the publicNetworkAccess property: Property to allow or block all public traffic. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the SiteConfigInner object itself. + */ + public SiteConfigInner withPublicNetworkAccess(String publicNetworkAccess) { + this.publicNetworkAccess = publicNetworkAccess; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (appSettings() != null) { + appSettings().forEach(e -> e.validate()); + } + if (connectionStrings() != null) { + connectionStrings().forEach(e -> e.validate()); + } + if (machineKey() != null) { + machineKey().validate(); + } + if (handlerMappings() != null) { + handlerMappings().forEach(e -> e.validate()); + } + if (virtualApplications() != null) { + virtualApplications().forEach(e -> e.validate()); + } + if (experiments() != null) { + experiments().validate(); + } + if (limits() != null) { + limits().validate(); + } + if (autoHealRules() != null) { + autoHealRules().validate(); + } + if (cors() != null) { + cors().validate(); + } + if (push() != null) { + push().validate(); + } + if (apiDefinition() != null) { + apiDefinition().validate(); + } + if (apiManagementConfig() != null) { + apiManagementConfig().validate(); + } + if (ipSecurityRestrictions() != null) { + ipSecurityRestrictions().forEach(e -> e.validate()); + } + if (scmIpSecurityRestrictions() != null) { + scmIpSecurityRestrictions().forEach(e -> e.validate()); + } + if (azureStorageAccounts() != null) { + azureStorageAccounts() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigResourceInner.java new file mode 100644 index 0000000000000..87e1b92eb3861 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigResourceInner.java @@ -0,0 +1,1644 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ApiDefinitionInfo; +import com.azure.resourcemanager.appservice.generated.models.ApiManagementConfig; +import com.azure.resourcemanager.appservice.generated.models.AutoHealRules; +import com.azure.resourcemanager.appservice.generated.models.AzureStorageInfoValue; +import com.azure.resourcemanager.appservice.generated.models.ConnStringInfo; +import com.azure.resourcemanager.appservice.generated.models.CorsSettings; +import com.azure.resourcemanager.appservice.generated.models.Experiments; +import com.azure.resourcemanager.appservice.generated.models.FtpsState; +import com.azure.resourcemanager.appservice.generated.models.HandlerMapping; +import com.azure.resourcemanager.appservice.generated.models.IpSecurityRestriction; +import com.azure.resourcemanager.appservice.generated.models.ManagedPipelineMode; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.ScmType; +import com.azure.resourcemanager.appservice.generated.models.SiteLimits; +import com.azure.resourcemanager.appservice.generated.models.SiteLoadBalancing; +import com.azure.resourcemanager.appservice.generated.models.SiteMachineKey; +import com.azure.resourcemanager.appservice.generated.models.SupportedTlsVersions; +import com.azure.resourcemanager.appservice.generated.models.VirtualApplication; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** Web app configuration ARM resource. */ +@Fluent +public final class SiteConfigResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteConfigResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private SiteConfigInner innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private SiteConfigInner innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SiteConfigResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the numberOfWorkers property: Number of workers. + * + * @return the numberOfWorkers value. + */ + public Integer numberOfWorkers() { + return this.innerProperties() == null ? null : this.innerProperties().numberOfWorkers(); + } + + /** + * Set the numberOfWorkers property: Number of workers. + * + * @param numberOfWorkers the numberOfWorkers value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNumberOfWorkers(Integer numberOfWorkers) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withNumberOfWorkers(numberOfWorkers); + return this; + } + + /** + * Get the defaultDocuments property: Default documents. + * + * @return the defaultDocuments value. + */ + public List defaultDocuments() { + return this.innerProperties() == null ? null : this.innerProperties().defaultDocuments(); + } + + /** + * Set the defaultDocuments property: Default documents. + * + * @param defaultDocuments the defaultDocuments value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDefaultDocuments(List defaultDocuments) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withDefaultDocuments(defaultDocuments); + return this; + } + + /** + * Get the netFrameworkVersion property: .NET Framework version. + * + * @return the netFrameworkVersion value. + */ + public String netFrameworkVersion() { + return this.innerProperties() == null ? null : this.innerProperties().netFrameworkVersion(); + } + + /** + * Set the netFrameworkVersion property: .NET Framework version. + * + * @param netFrameworkVersion the netFrameworkVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNetFrameworkVersion(String netFrameworkVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withNetFrameworkVersion(netFrameworkVersion); + return this; + } + + /** + * Get the phpVersion property: Version of PHP. + * + * @return the phpVersion value. + */ + public String phpVersion() { + return this.innerProperties() == null ? null : this.innerProperties().phpVersion(); + } + + /** + * Set the phpVersion property: Version of PHP. + * + * @param phpVersion the phpVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPhpVersion(String phpVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withPhpVersion(phpVersion); + return this; + } + + /** + * Get the pythonVersion property: Version of Python. + * + * @return the pythonVersion value. + */ + public String pythonVersion() { + return this.innerProperties() == null ? null : this.innerProperties().pythonVersion(); + } + + /** + * Set the pythonVersion property: Version of Python. + * + * @param pythonVersion the pythonVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPythonVersion(String pythonVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withPythonVersion(pythonVersion); + return this; + } + + /** + * Get the nodeVersion property: Version of Node.js. + * + * @return the nodeVersion value. + */ + public String nodeVersion() { + return this.innerProperties() == null ? null : this.innerProperties().nodeVersion(); + } + + /** + * Set the nodeVersion property: Version of Node.js. + * + * @param nodeVersion the nodeVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withNodeVersion(String nodeVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withNodeVersion(nodeVersion); + return this; + } + + /** + * Get the powerShellVersion property: Version of PowerShell. + * + * @return the powerShellVersion value. + */ + public String powerShellVersion() { + return this.innerProperties() == null ? null : this.innerProperties().powerShellVersion(); + } + + /** + * Set the powerShellVersion property: Version of PowerShell. + * + * @param powerShellVersion the powerShellVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPowerShellVersion(String powerShellVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withPowerShellVersion(powerShellVersion); + return this; + } + + /** + * Get the linuxFxVersion property: Linux App Framework and version. + * + * @return the linuxFxVersion value. + */ + public String linuxFxVersion() { + return this.innerProperties() == null ? null : this.innerProperties().linuxFxVersion(); + } + + /** + * Set the linuxFxVersion property: Linux App Framework and version. + * + * @param linuxFxVersion the linuxFxVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLinuxFxVersion(String linuxFxVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withLinuxFxVersion(linuxFxVersion); + return this; + } + + /** + * Get the windowsFxVersion property: Xenon App Framework and version. + * + * @return the windowsFxVersion value. + */ + public String windowsFxVersion() { + return this.innerProperties() == null ? null : this.innerProperties().windowsFxVersion(); + } + + /** + * Set the windowsFxVersion property: Xenon App Framework and version. + * + * @param windowsFxVersion the windowsFxVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withWindowsFxVersion(String windowsFxVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withWindowsFxVersion(windowsFxVersion); + return this; + } + + /** + * Get the requestTracingEnabled property: <code>true</code> if request tracing is enabled; otherwise, + * <code>false</code>. + * + * @return the requestTracingEnabled value. + */ + public Boolean requestTracingEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().requestTracingEnabled(); + } + + /** + * Set the requestTracingEnabled property: <code>true</code> if request tracing is enabled; otherwise, + * <code>false</code>. + * + * @param requestTracingEnabled the requestTracingEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRequestTracingEnabled(Boolean requestTracingEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withRequestTracingEnabled(requestTracingEnabled); + return this; + } + + /** + * Get the requestTracingExpirationTime property: Request tracing expiration time. + * + * @return the requestTracingExpirationTime value. + */ + public OffsetDateTime requestTracingExpirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().requestTracingExpirationTime(); + } + + /** + * Set the requestTracingExpirationTime property: Request tracing expiration time. + * + * @param requestTracingExpirationTime the requestTracingExpirationTime value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRequestTracingExpirationTime(OffsetDateTime requestTracingExpirationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withRequestTracingExpirationTime(requestTracingExpirationTime); + return this; + } + + /** + * Get the remoteDebuggingEnabled property: <code>true</code> if remote debugging is enabled; otherwise, + * <code>false</code>. + * + * @return the remoteDebuggingEnabled value. + */ + public Boolean remoteDebuggingEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().remoteDebuggingEnabled(); + } + + /** + * Set the remoteDebuggingEnabled property: <code>true</code> if remote debugging is enabled; otherwise, + * <code>false</code>. + * + * @param remoteDebuggingEnabled the remoteDebuggingEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRemoteDebuggingEnabled(Boolean remoteDebuggingEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withRemoteDebuggingEnabled(remoteDebuggingEnabled); + return this; + } + + /** + * Get the remoteDebuggingVersion property: Remote debugging version. + * + * @return the remoteDebuggingVersion value. + */ + public String remoteDebuggingVersion() { + return this.innerProperties() == null ? null : this.innerProperties().remoteDebuggingVersion(); + } + + /** + * Set the remoteDebuggingVersion property: Remote debugging version. + * + * @param remoteDebuggingVersion the remoteDebuggingVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withRemoteDebuggingVersion(String remoteDebuggingVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withRemoteDebuggingVersion(remoteDebuggingVersion); + return this; + } + + /** + * Get the httpLoggingEnabled property: <code>true</code> if HTTP logging is enabled; otherwise, + * <code>false</code>. + * + * @return the httpLoggingEnabled value. + */ + public Boolean httpLoggingEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().httpLoggingEnabled(); + } + + /** + * Set the httpLoggingEnabled property: <code>true</code> if HTTP logging is enabled; otherwise, + * <code>false</code>. + * + * @param httpLoggingEnabled the httpLoggingEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHttpLoggingEnabled(Boolean httpLoggingEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withHttpLoggingEnabled(httpLoggingEnabled); + return this; + } + + /** + * Get the acrUseManagedIdentityCreds property: Flag to use Managed Identity Creds for ACR pull. + * + * @return the acrUseManagedIdentityCreds value. + */ + public Boolean acrUseManagedIdentityCreds() { + return this.innerProperties() == null ? null : this.innerProperties().acrUseManagedIdentityCreds(); + } + + /** + * Set the acrUseManagedIdentityCreds property: Flag to use Managed Identity Creds for ACR pull. + * + * @param acrUseManagedIdentityCreds the acrUseManagedIdentityCreds value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAcrUseManagedIdentityCreds(Boolean acrUseManagedIdentityCreds) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAcrUseManagedIdentityCreds(acrUseManagedIdentityCreds); + return this; + } + + /** + * Get the acrUserManagedIdentityId property: If using user managed identity, the user managed identity ClientId. + * + * @return the acrUserManagedIdentityId value. + */ + public String acrUserManagedIdentityId() { + return this.innerProperties() == null ? null : this.innerProperties().acrUserManagedIdentityId(); + } + + /** + * Set the acrUserManagedIdentityId property: If using user managed identity, the user managed identity ClientId. + * + * @param acrUserManagedIdentityId the acrUserManagedIdentityId value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAcrUserManagedIdentityId(String acrUserManagedIdentityId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAcrUserManagedIdentityId(acrUserManagedIdentityId); + return this; + } + + /** + * Get the logsDirectorySizeLimit property: HTTP logs directory size limit. + * + * @return the logsDirectorySizeLimit value. + */ + public Integer logsDirectorySizeLimit() { + return this.innerProperties() == null ? null : this.innerProperties().logsDirectorySizeLimit(); + } + + /** + * Set the logsDirectorySizeLimit property: HTTP logs directory size limit. + * + * @param logsDirectorySizeLimit the logsDirectorySizeLimit value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLogsDirectorySizeLimit(Integer logsDirectorySizeLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withLogsDirectorySizeLimit(logsDirectorySizeLimit); + return this; + } + + /** + * Get the detailedErrorLoggingEnabled property: <code>true</code> if detailed error logging is enabled; + * otherwise, <code>false</code>. + * + * @return the detailedErrorLoggingEnabled value. + */ + public Boolean detailedErrorLoggingEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().detailedErrorLoggingEnabled(); + } + + /** + * Set the detailedErrorLoggingEnabled property: <code>true</code> if detailed error logging is enabled; + * otherwise, <code>false</code>. + * + * @param detailedErrorLoggingEnabled the detailedErrorLoggingEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDetailedErrorLoggingEnabled(Boolean detailedErrorLoggingEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withDetailedErrorLoggingEnabled(detailedErrorLoggingEnabled); + return this; + } + + /** + * Get the publishingUsername property: Publishing user name. + * + * @return the publishingUsername value. + */ + public String publishingUsername() { + return this.innerProperties() == null ? null : this.innerProperties().publishingUsername(); + } + + /** + * Set the publishingUsername property: Publishing user name. + * + * @param publishingUsername the publishingUsername value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPublishingUsername(String publishingUsername) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withPublishingUsername(publishingUsername); + return this; + } + + /** + * Get the appSettings property: Application settings. + * + * @return the appSettings value. + */ + public List appSettings() { + return this.innerProperties() == null ? null : this.innerProperties().appSettings(); + } + + /** + * Set the appSettings property: Application settings. + * + * @param appSettings the appSettings value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAppSettings(List appSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAppSettings(appSettings); + return this; + } + + /** + * Get the connectionStrings property: Connection strings. + * + * @return the connectionStrings value. + */ + public List connectionStrings() { + return this.innerProperties() == null ? null : this.innerProperties().connectionStrings(); + } + + /** + * Set the connectionStrings property: Connection strings. + * + * @param connectionStrings the connectionStrings value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withConnectionStrings(List connectionStrings) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withConnectionStrings(connectionStrings); + return this; + } + + /** + * Get the machineKey property: Site MachineKey. + * + * @return the machineKey value. + */ + public SiteMachineKey machineKey() { + return this.innerProperties() == null ? null : this.innerProperties().machineKey(); + } + + /** + * Get the handlerMappings property: Handler mappings. + * + * @return the handlerMappings value. + */ + public List handlerMappings() { + return this.innerProperties() == null ? null : this.innerProperties().handlerMappings(); + } + + /** + * Set the handlerMappings property: Handler mappings. + * + * @param handlerMappings the handlerMappings value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHandlerMappings(List handlerMappings) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withHandlerMappings(handlerMappings); + return this; + } + + /** + * Get the documentRoot property: Document root. + * + * @return the documentRoot value. + */ + public String documentRoot() { + return this.innerProperties() == null ? null : this.innerProperties().documentRoot(); + } + + /** + * Set the documentRoot property: Document root. + * + * @param documentRoot the documentRoot value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withDocumentRoot(String documentRoot) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withDocumentRoot(documentRoot); + return this; + } + + /** + * Get the scmType property: SCM type. + * + * @return the scmType value. + */ + public ScmType scmType() { + return this.innerProperties() == null ? null : this.innerProperties().scmType(); + } + + /** + * Set the scmType property: SCM type. + * + * @param scmType the scmType value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withScmType(ScmType scmType) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withScmType(scmType); + return this; + } + + /** + * Get the use32BitWorkerProcess property: <code>true</code> to use 32-bit worker process; otherwise, + * <code>false</code>. + * + * @return the use32BitWorkerProcess value. + */ + public Boolean use32BitWorkerProcess() { + return this.innerProperties() == null ? null : this.innerProperties().use32BitWorkerProcess(); + } + + /** + * Set the use32BitWorkerProcess property: <code>true</code> to use 32-bit worker process; otherwise, + * <code>false</code>. + * + * @param use32BitWorkerProcess the use32BitWorkerProcess value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withUse32BitWorkerProcess(Boolean use32BitWorkerProcess) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withUse32BitWorkerProcess(use32BitWorkerProcess); + return this; + } + + /** + * Get the webSocketsEnabled property: <code>true</code> if WebSocket is enabled; otherwise, + * <code>false</code>. + * + * @return the webSocketsEnabled value. + */ + public Boolean webSocketsEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().webSocketsEnabled(); + } + + /** + * Set the webSocketsEnabled property: <code>true</code> if WebSocket is enabled; otherwise, + * <code>false</code>. + * + * @param webSocketsEnabled the webSocketsEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withWebSocketsEnabled(Boolean webSocketsEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withWebSocketsEnabled(webSocketsEnabled); + return this; + } + + /** + * Get the alwaysOn property: <code>true</code> if Always On is enabled; otherwise, + * <code>false</code>. + * + * @return the alwaysOn value. + */ + public Boolean alwaysOn() { + return this.innerProperties() == null ? null : this.innerProperties().alwaysOn(); + } + + /** + * Set the alwaysOn property: <code>true</code> if Always On is enabled; otherwise, + * <code>false</code>. + * + * @param alwaysOn the alwaysOn value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAlwaysOn(Boolean alwaysOn) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAlwaysOn(alwaysOn); + return this; + } + + /** + * Get the javaVersion property: Java version. + * + * @return the javaVersion value. + */ + public String javaVersion() { + return this.innerProperties() == null ? null : this.innerProperties().javaVersion(); + } + + /** + * Set the javaVersion property: Java version. + * + * @param javaVersion the javaVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaVersion(String javaVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withJavaVersion(javaVersion); + return this; + } + + /** + * Get the javaContainer property: Java container. + * + * @return the javaContainer value. + */ + public String javaContainer() { + return this.innerProperties() == null ? null : this.innerProperties().javaContainer(); + } + + /** + * Set the javaContainer property: Java container. + * + * @param javaContainer the javaContainer value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaContainer(String javaContainer) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withJavaContainer(javaContainer); + return this; + } + + /** + * Get the javaContainerVersion property: Java container version. + * + * @return the javaContainerVersion value. + */ + public String javaContainerVersion() { + return this.innerProperties() == null ? null : this.innerProperties().javaContainerVersion(); + } + + /** + * Set the javaContainerVersion property: Java container version. + * + * @param javaContainerVersion the javaContainerVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withJavaContainerVersion(String javaContainerVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withJavaContainerVersion(javaContainerVersion); + return this; + } + + /** + * Get the appCommandLine property: App command line to launch. + * + * @return the appCommandLine value. + */ + public String appCommandLine() { + return this.innerProperties() == null ? null : this.innerProperties().appCommandLine(); + } + + /** + * Set the appCommandLine property: App command line to launch. + * + * @param appCommandLine the appCommandLine value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAppCommandLine(String appCommandLine) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAppCommandLine(appCommandLine); + return this; + } + + /** + * Get the managedPipelineMode property: Managed pipeline mode. + * + * @return the managedPipelineMode value. + */ + public ManagedPipelineMode managedPipelineMode() { + return this.innerProperties() == null ? null : this.innerProperties().managedPipelineMode(); + } + + /** + * Set the managedPipelineMode property: Managed pipeline mode. + * + * @param managedPipelineMode the managedPipelineMode value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withManagedPipelineMode(ManagedPipelineMode managedPipelineMode) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withManagedPipelineMode(managedPipelineMode); + return this; + } + + /** + * Get the virtualApplications property: Virtual applications. + * + * @return the virtualApplications value. + */ + public List virtualApplications() { + return this.innerProperties() == null ? null : this.innerProperties().virtualApplications(); + } + + /** + * Set the virtualApplications property: Virtual applications. + * + * @param virtualApplications the virtualApplications value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withVirtualApplications(List virtualApplications) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withVirtualApplications(virtualApplications); + return this; + } + + /** + * Get the loadBalancing property: Site load balancing. + * + * @return the loadBalancing value. + */ + public SiteLoadBalancing loadBalancing() { + return this.innerProperties() == null ? null : this.innerProperties().loadBalancing(); + } + + /** + * Set the loadBalancing property: Site load balancing. + * + * @param loadBalancing the loadBalancing value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLoadBalancing(SiteLoadBalancing loadBalancing) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withLoadBalancing(loadBalancing); + return this; + } + + /** + * Get the experiments property: This is work around for polymorphic types. + * + * @return the experiments value. + */ + public Experiments experiments() { + return this.innerProperties() == null ? null : this.innerProperties().experiments(); + } + + /** + * Set the experiments property: This is work around for polymorphic types. + * + * @param experiments the experiments value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withExperiments(Experiments experiments) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withExperiments(experiments); + return this; + } + + /** + * Get the limits property: Site limits. + * + * @return the limits value. + */ + public SiteLimits limits() { + return this.innerProperties() == null ? null : this.innerProperties().limits(); + } + + /** + * Set the limits property: Site limits. + * + * @param limits the limits value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLimits(SiteLimits limits) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withLimits(limits); + return this; + } + + /** + * Get the autoHealEnabled property: <code>true</code> if Auto Heal is enabled; otherwise, + * <code>false</code>. + * + * @return the autoHealEnabled value. + */ + public Boolean autoHealEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().autoHealEnabled(); + } + + /** + * Set the autoHealEnabled property: <code>true</code> if Auto Heal is enabled; otherwise, + * <code>false</code>. + * + * @param autoHealEnabled the autoHealEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoHealEnabled(Boolean autoHealEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAutoHealEnabled(autoHealEnabled); + return this; + } + + /** + * Get the autoHealRules property: Auto Heal rules. + * + * @return the autoHealRules value. + */ + public AutoHealRules autoHealRules() { + return this.innerProperties() == null ? null : this.innerProperties().autoHealRules(); + } + + /** + * Set the autoHealRules property: Auto Heal rules. + * + * @param autoHealRules the autoHealRules value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoHealRules(AutoHealRules autoHealRules) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAutoHealRules(autoHealRules); + return this; + } + + /** + * Get the tracingOptions property: Tracing options. + * + * @return the tracingOptions value. + */ + public String tracingOptions() { + return this.innerProperties() == null ? null : this.innerProperties().tracingOptions(); + } + + /** + * Set the tracingOptions property: Tracing options. + * + * @param tracingOptions the tracingOptions value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withTracingOptions(String tracingOptions) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withTracingOptions(tracingOptions); + return this; + } + + /** + * Get the vnetName property: Virtual Network name. + * + * @return the vnetName value. + */ + public String vnetName() { + return this.innerProperties() == null ? null : this.innerProperties().vnetName(); + } + + /** + * Set the vnetName property: Virtual Network name. + * + * @param vnetName the vnetName value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withVnetName(String vnetName) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withVnetName(vnetName); + return this; + } + + /** + * Get the vnetRouteAllEnabled property: Virtual Network Route All enabled. This causes all outbound traffic to have + * Virtual Network Security Groups and User Defined Routes applied. + * + * @return the vnetRouteAllEnabled value. + */ + public Boolean vnetRouteAllEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().vnetRouteAllEnabled(); + } + + /** + * Set the vnetRouteAllEnabled property: Virtual Network Route All enabled. This causes all outbound traffic to have + * Virtual Network Security Groups and User Defined Routes applied. + * + * @param vnetRouteAllEnabled the vnetRouteAllEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withVnetRouteAllEnabled(Boolean vnetRouteAllEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withVnetRouteAllEnabled(vnetRouteAllEnabled); + return this; + } + + /** + * Get the vnetPrivatePortsCount property: The number of private ports assigned to this app. These will be assigned + * dynamically on runtime. + * + * @return the vnetPrivatePortsCount value. + */ + public Integer vnetPrivatePortsCount() { + return this.innerProperties() == null ? null : this.innerProperties().vnetPrivatePortsCount(); + } + + /** + * Set the vnetPrivatePortsCount property: The number of private ports assigned to this app. These will be assigned + * dynamically on runtime. + * + * @param vnetPrivatePortsCount the vnetPrivatePortsCount value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withVnetPrivatePortsCount(Integer vnetPrivatePortsCount) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withVnetPrivatePortsCount(vnetPrivatePortsCount); + return this; + } + + /** + * Get the cors property: Cross-Origin Resource Sharing (CORS) settings. + * + * @return the cors value. + */ + public CorsSettings cors() { + return this.innerProperties() == null ? null : this.innerProperties().cors(); + } + + /** + * Set the cors property: Cross-Origin Resource Sharing (CORS) settings. + * + * @param cors the cors value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withCors(CorsSettings cors) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withCors(cors); + return this; + } + + /** + * Get the push property: Push endpoint settings. + * + * @return the push value. + */ + public PushSettingsInner push() { + return this.innerProperties() == null ? null : this.innerProperties().push(); + } + + /** + * Set the push property: Push endpoint settings. + * + * @param push the push value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPush(PushSettingsInner push) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withPush(push); + return this; + } + + /** + * Get the apiDefinition property: Information about the formal API definition for the app. + * + * @return the apiDefinition value. + */ + public ApiDefinitionInfo apiDefinition() { + return this.innerProperties() == null ? null : this.innerProperties().apiDefinition(); + } + + /** + * Set the apiDefinition property: Information about the formal API definition for the app. + * + * @param apiDefinition the apiDefinition value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withApiDefinition(ApiDefinitionInfo apiDefinition) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withApiDefinition(apiDefinition); + return this; + } + + /** + * Get the apiManagementConfig property: Azure API management settings linked to the app. + * + * @return the apiManagementConfig value. + */ + public ApiManagementConfig apiManagementConfig() { + return this.innerProperties() == null ? null : this.innerProperties().apiManagementConfig(); + } + + /** + * Set the apiManagementConfig property: Azure API management settings linked to the app. + * + * @param apiManagementConfig the apiManagementConfig value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withApiManagementConfig(ApiManagementConfig apiManagementConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withApiManagementConfig(apiManagementConfig); + return this; + } + + /** + * Get the autoSwapSlotName property: Auto-swap slot name. + * + * @return the autoSwapSlotName value. + */ + public String autoSwapSlotName() { + return this.innerProperties() == null ? null : this.innerProperties().autoSwapSlotName(); + } + + /** + * Set the autoSwapSlotName property: Auto-swap slot name. + * + * @param autoSwapSlotName the autoSwapSlotName value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAutoSwapSlotName(String autoSwapSlotName) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAutoSwapSlotName(autoSwapSlotName); + return this; + } + + /** + * Get the localMySqlEnabled property: <code>true</code> to enable local MySQL; otherwise, + * <code>false</code>. + * + * @return the localMySqlEnabled value. + */ + public Boolean localMySqlEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().localMySqlEnabled(); + } + + /** + * Set the localMySqlEnabled property: <code>true</code> to enable local MySQL; otherwise, + * <code>false</code>. + * + * @param localMySqlEnabled the localMySqlEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withLocalMySqlEnabled(Boolean localMySqlEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withLocalMySqlEnabled(localMySqlEnabled); + return this; + } + + /** + * Get the managedServiceIdentityId property: Managed Service Identity Id. + * + * @return the managedServiceIdentityId value. + */ + public Integer managedServiceIdentityId() { + return this.innerProperties() == null ? null : this.innerProperties().managedServiceIdentityId(); + } + + /** + * Set the managedServiceIdentityId property: Managed Service Identity Id. + * + * @param managedServiceIdentityId the managedServiceIdentityId value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withManagedServiceIdentityId(Integer managedServiceIdentityId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withManagedServiceIdentityId(managedServiceIdentityId); + return this; + } + + /** + * Get the xManagedServiceIdentityId property: Explicit Managed Service Identity Id. + * + * @return the xManagedServiceIdentityId value. + */ + public Integer xManagedServiceIdentityId() { + return this.innerProperties() == null ? null : this.innerProperties().xManagedServiceIdentityId(); + } + + /** + * Set the xManagedServiceIdentityId property: Explicit Managed Service Identity Id. + * + * @param xManagedServiceIdentityId the xManagedServiceIdentityId value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withXManagedServiceIdentityId(Integer xManagedServiceIdentityId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withXManagedServiceIdentityId(xManagedServiceIdentityId); + return this; + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultReferenceIdentity(); + } + + /** + * Set the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @param keyVaultReferenceIdentity the keyVaultReferenceIdentity value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withKeyVaultReferenceIdentity(keyVaultReferenceIdentity); + return this; + } + + /** + * Get the ipSecurityRestrictions property: IP security restrictions for main. + * + * @return the ipSecurityRestrictions value. + */ + public List ipSecurityRestrictions() { + return this.innerProperties() == null ? null : this.innerProperties().ipSecurityRestrictions(); + } + + /** + * Set the ipSecurityRestrictions property: IP security restrictions for main. + * + * @param ipSecurityRestrictions the ipSecurityRestrictions value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withIpSecurityRestrictions(List ipSecurityRestrictions) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withIpSecurityRestrictions(ipSecurityRestrictions); + return this; + } + + /** + * Get the scmIpSecurityRestrictions property: IP security restrictions for scm. + * + * @return the scmIpSecurityRestrictions value. + */ + public List scmIpSecurityRestrictions() { + return this.innerProperties() == null ? null : this.innerProperties().scmIpSecurityRestrictions(); + } + + /** + * Set the scmIpSecurityRestrictions property: IP security restrictions for scm. + * + * @param scmIpSecurityRestrictions the scmIpSecurityRestrictions value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withScmIpSecurityRestrictions( + List scmIpSecurityRestrictions) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withScmIpSecurityRestrictions(scmIpSecurityRestrictions); + return this; + } + + /** + * Get the scmIpSecurityRestrictionsUseMain property: IP security restrictions for scm to use main. + * + * @return the scmIpSecurityRestrictionsUseMain value. + */ + public Boolean scmIpSecurityRestrictionsUseMain() { + return this.innerProperties() == null ? null : this.innerProperties().scmIpSecurityRestrictionsUseMain(); + } + + /** + * Set the scmIpSecurityRestrictionsUseMain property: IP security restrictions for scm to use main. + * + * @param scmIpSecurityRestrictionsUseMain the scmIpSecurityRestrictionsUseMain value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withScmIpSecurityRestrictionsUseMain(Boolean scmIpSecurityRestrictionsUseMain) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withScmIpSecurityRestrictionsUseMain(scmIpSecurityRestrictionsUseMain); + return this; + } + + /** + * Get the http20Enabled property: Http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @return the http20Enabled value. + */ + public Boolean http20Enabled() { + return this.innerProperties() == null ? null : this.innerProperties().http20Enabled(); + } + + /** + * Set the http20Enabled property: Http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @param http20Enabled the http20Enabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHttp20Enabled(Boolean http20Enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withHttp20Enabled(http20Enabled); + return this; + } + + /** + * Get the minTlsVersion property: MinTlsVersion: configures the minimum version of TLS required for SSL requests. + * + * @return the minTlsVersion value. + */ + public SupportedTlsVersions minTlsVersion() { + return this.innerProperties() == null ? null : this.innerProperties().minTlsVersion(); + } + + /** + * Set the minTlsVersion property: MinTlsVersion: configures the minimum version of TLS required for SSL requests. + * + * @param minTlsVersion the minTlsVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withMinTlsVersion(SupportedTlsVersions minTlsVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withMinTlsVersion(minTlsVersion); + return this; + } + + /** + * Get the scmMinTlsVersion property: ScmMinTlsVersion: configures the minimum version of TLS required for SSL + * requests for SCM site. + * + * @return the scmMinTlsVersion value. + */ + public SupportedTlsVersions scmMinTlsVersion() { + return this.innerProperties() == null ? null : this.innerProperties().scmMinTlsVersion(); + } + + /** + * Set the scmMinTlsVersion property: ScmMinTlsVersion: configures the minimum version of TLS required for SSL + * requests for SCM site. + * + * @param scmMinTlsVersion the scmMinTlsVersion value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withScmMinTlsVersion(SupportedTlsVersions scmMinTlsVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withScmMinTlsVersion(scmMinTlsVersion); + return this; + } + + /** + * Get the ftpsState property: State of FTP / FTPS service. + * + * @return the ftpsState value. + */ + public FtpsState ftpsState() { + return this.innerProperties() == null ? null : this.innerProperties().ftpsState(); + } + + /** + * Set the ftpsState property: State of FTP / FTPS service. + * + * @param ftpsState the ftpsState value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withFtpsState(FtpsState ftpsState) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withFtpsState(ftpsState); + return this; + } + + /** + * Get the preWarmedInstanceCount property: Number of preWarmed instances. This setting only applies to the + * Consumption and Elastic Plans. + * + * @return the preWarmedInstanceCount value. + */ + public Integer preWarmedInstanceCount() { + return this.innerProperties() == null ? null : this.innerProperties().preWarmedInstanceCount(); + } + + /** + * Set the preWarmedInstanceCount property: Number of preWarmed instances. This setting only applies to the + * Consumption and Elastic Plans. + * + * @param preWarmedInstanceCount the preWarmedInstanceCount value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPreWarmedInstanceCount(Integer preWarmedInstanceCount) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withPreWarmedInstanceCount(preWarmedInstanceCount); + return this; + } + + /** + * Get the functionAppScaleLimit property: Maximum number of workers that a site can scale out to. This setting only + * applies to the Consumption and Elastic Premium Plans. + * + * @return the functionAppScaleLimit value. + */ + public Integer functionAppScaleLimit() { + return this.innerProperties() == null ? null : this.innerProperties().functionAppScaleLimit(); + } + + /** + * Set the functionAppScaleLimit property: Maximum number of workers that a site can scale out to. This setting only + * applies to the Consumption and Elastic Premium Plans. + * + * @param functionAppScaleLimit the functionAppScaleLimit value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withFunctionAppScaleLimit(Integer functionAppScaleLimit) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withFunctionAppScaleLimit(functionAppScaleLimit); + return this; + } + + /** + * Get the healthCheckPath property: Health check path. + * + * @return the healthCheckPath value. + */ + public String healthCheckPath() { + return this.innerProperties() == null ? null : this.innerProperties().healthCheckPath(); + } + + /** + * Set the healthCheckPath property: Health check path. + * + * @param healthCheckPath the healthCheckPath value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withHealthCheckPath(String healthCheckPath) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withHealthCheckPath(healthCheckPath); + return this; + } + + /** + * Get the functionsRuntimeScaleMonitoringEnabled property: Gets or sets a value indicating whether functions + * runtime scale monitoring is enabled. When enabled, the ScaleController will not monitor event sources directly, + * but will instead call to the runtime to get scale status. + * + * @return the functionsRuntimeScaleMonitoringEnabled value. + */ + public Boolean functionsRuntimeScaleMonitoringEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().functionsRuntimeScaleMonitoringEnabled(); + } + + /** + * Set the functionsRuntimeScaleMonitoringEnabled property: Gets or sets a value indicating whether functions + * runtime scale monitoring is enabled. When enabled, the ScaleController will not monitor event sources directly, + * but will instead call to the runtime to get scale status. + * + * @param functionsRuntimeScaleMonitoringEnabled the functionsRuntimeScaleMonitoringEnabled value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withFunctionsRuntimeScaleMonitoringEnabled( + Boolean functionsRuntimeScaleMonitoringEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withFunctionsRuntimeScaleMonitoringEnabled(functionsRuntimeScaleMonitoringEnabled); + return this; + } + + /** + * Get the websiteTimeZone property: Sets the time zone a site uses for generating timestamps. Compatible with Linux + * and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, + * expects tz database values https://www.iana.org/time-zones (for a quick reference see + * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed + * under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * + * @return the websiteTimeZone value. + */ + public String websiteTimeZone() { + return this.innerProperties() == null ? null : this.innerProperties().websiteTimeZone(); + } + + /** + * Set the websiteTimeZone property: Sets the time zone a site uses for generating timestamps. Compatible with Linux + * and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, + * expects tz database values https://www.iana.org/time-zones (for a quick reference see + * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed + * under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * + * @param websiteTimeZone the websiteTimeZone value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withWebsiteTimeZone(String websiteTimeZone) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withWebsiteTimeZone(websiteTimeZone); + return this; + } + + /** + * Get the minimumElasticInstanceCount property: Number of minimum instance count for a site This setting only + * applies to the Elastic Plans. + * + * @return the minimumElasticInstanceCount value. + */ + public Integer minimumElasticInstanceCount() { + return this.innerProperties() == null ? null : this.innerProperties().minimumElasticInstanceCount(); + } + + /** + * Set the minimumElasticInstanceCount property: Number of minimum instance count for a site This setting only + * applies to the Elastic Plans. + * + * @param minimumElasticInstanceCount the minimumElasticInstanceCount value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withMinimumElasticInstanceCount(Integer minimumElasticInstanceCount) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withMinimumElasticInstanceCount(minimumElasticInstanceCount); + return this; + } + + /** + * Get the azureStorageAccounts property: List of Azure Storage Accounts. + * + * @return the azureStorageAccounts value. + */ + public Map azureStorageAccounts() { + return this.innerProperties() == null ? null : this.innerProperties().azureStorageAccounts(); + } + + /** + * Set the azureStorageAccounts property: List of Azure Storage Accounts. + * + * @param azureStorageAccounts the azureStorageAccounts value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withAzureStorageAccounts(Map azureStorageAccounts) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withAzureStorageAccounts(azureStorageAccounts); + return this; + } + + /** + * Get the publicNetworkAccess property: Property to allow or block all public traffic. + * + * @return the publicNetworkAccess value. + */ + public String publicNetworkAccess() { + return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + } + + /** + * Set the publicNetworkAccess property: Property to allow or block all public traffic. + * + * @param publicNetworkAccess the publicNetworkAccess value to set. + * @return the SiteConfigResourceInner object itself. + */ + public SiteConfigResourceInner withPublicNetworkAccess(String publicNetworkAccess) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteConfigInner(); + } + this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigurationSnapshotInfoInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigurationSnapshotInfoInner.java new file mode 100644 index 0000000000000..85ac5b9f79f54 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigurationSnapshotInfoInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** A snapshot of a web app configuration. */ +@Fluent +public final class SiteConfigurationSnapshotInfoInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteConfigurationSnapshotInfoInner.class); + + /* + * SiteConfigurationSnapshotInfo resource specific properties + */ + @JsonProperty(value = "properties") + private SiteConfigurationSnapshotInfoProperties innerProperties; + + /** + * Get the innerProperties property: SiteConfigurationSnapshotInfo resource specific properties. + * + * @return the innerProperties value. + */ + private SiteConfigurationSnapshotInfoProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SiteConfigurationSnapshotInfoInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the time property: The time the snapshot was taken. + * + * @return the time value. + */ + public OffsetDateTime time() { + return this.innerProperties() == null ? null : this.innerProperties().time(); + } + + /** + * Get the snapshotId property: The id of the snapshot. + * + * @return the snapshotId value. + */ + public Integer snapshotId() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotId(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigurationSnapshotInfoProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigurationSnapshotInfoProperties.java new file mode 100644 index 0000000000000..ddc54ed46c05c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteConfigurationSnapshotInfoProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** SiteConfigurationSnapshotInfo resource specific properties. */ +@Immutable +public final class SiteConfigurationSnapshotInfoProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteConfigurationSnapshotInfoProperties.class); + + /* + * The time the snapshot was taken. + */ + @JsonProperty(value = "time", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime time; + + /* + * The id of the snapshot + */ + @JsonProperty(value = "snapshotId", access = JsonProperty.Access.WRITE_ONLY) + private Integer snapshotId; + + /** + * Get the time property: The time the snapshot was taken. + * + * @return the time value. + */ + public OffsetDateTime time() { + return this.time; + } + + /** + * Get the snapshotId property: The id of the snapshot. + * + * @return the snapshotId value. + */ + public Integer snapshotId() { + return this.snapshotId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteExtensionInfoInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteExtensionInfoInner.java new file mode 100644 index 0000000000000..a63c2889f4e97 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteExtensionInfoInner.java @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.SiteExtensionType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Site Extension Information. */ +@Fluent +public final class SiteExtensionInfoInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteExtensionInfoInner.class); + + /* + * SiteExtensionInfo resource specific properties + */ + @JsonProperty(value = "properties") + private SiteExtensionInfoProperties innerProperties; + + /** + * Get the innerProperties property: SiteExtensionInfo resource specific properties. + * + * @return the innerProperties value. + */ + private SiteExtensionInfoProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SiteExtensionInfoInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the extensionId property: Site extension ID. + * + * @return the extensionId value. + */ + public String extensionId() { + return this.innerProperties() == null ? null : this.innerProperties().extensionId(); + } + + /** + * Set the extensionId property: Site extension ID. + * + * @param extensionId the extensionId value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withExtensionId(String extensionId) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withExtensionId(extensionId); + return this; + } + + /** + * Get the title property: The title property. + * + * @return the title value. + */ + public String title() { + return this.innerProperties() == null ? null : this.innerProperties().title(); + } + + /** + * Set the title property: The title property. + * + * @param title the title value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withTitle(String title) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withTitle(title); + return this; + } + + /** + * Get the extensionType property: Site extension type. + * + * @return the extensionType value. + */ + public SiteExtensionType extensionType() { + return this.innerProperties() == null ? null : this.innerProperties().extensionType(); + } + + /** + * Set the extensionType property: Site extension type. + * + * @param extensionType the extensionType value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withExtensionType(SiteExtensionType extensionType) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withExtensionType(extensionType); + return this; + } + + /** + * Get the summary property: Summary description. + * + * @return the summary value. + */ + public String summary() { + return this.innerProperties() == null ? null : this.innerProperties().summary(); + } + + /** + * Set the summary property: Summary description. + * + * @param summary the summary value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withSummary(String summary) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withSummary(summary); + return this; + } + + /** + * Get the description property: Detailed description. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Set the description property: Detailed description. + * + * @param description the description value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withDescription(String description) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withDescription(description); + return this; + } + + /** + * Get the version property: Version information. + * + * @return the version value. + */ + public String version() { + return this.innerProperties() == null ? null : this.innerProperties().version(); + } + + /** + * Set the version property: Version information. + * + * @param version the version value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withVersion(String version) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withVersion(version); + return this; + } + + /** + * Get the extensionUrl property: Extension URL. + * + * @return the extensionUrl value. + */ + public String extensionUrl() { + return this.innerProperties() == null ? null : this.innerProperties().extensionUrl(); + } + + /** + * Set the extensionUrl property: Extension URL. + * + * @param extensionUrl the extensionUrl value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withExtensionUrl(String extensionUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withExtensionUrl(extensionUrl); + return this; + } + + /** + * Get the projectUrl property: Project URL. + * + * @return the projectUrl value. + */ + public String projectUrl() { + return this.innerProperties() == null ? null : this.innerProperties().projectUrl(); + } + + /** + * Set the projectUrl property: Project URL. + * + * @param projectUrl the projectUrl value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withProjectUrl(String projectUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withProjectUrl(projectUrl); + return this; + } + + /** + * Get the iconUrl property: Icon URL. + * + * @return the iconUrl value. + */ + public String iconUrl() { + return this.innerProperties() == null ? null : this.innerProperties().iconUrl(); + } + + /** + * Set the iconUrl property: Icon URL. + * + * @param iconUrl the iconUrl value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withIconUrl(String iconUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withIconUrl(iconUrl); + return this; + } + + /** + * Get the licenseUrl property: License URL. + * + * @return the licenseUrl value. + */ + public String licenseUrl() { + return this.innerProperties() == null ? null : this.innerProperties().licenseUrl(); + } + + /** + * Set the licenseUrl property: License URL. + * + * @param licenseUrl the licenseUrl value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLicenseUrl(String licenseUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withLicenseUrl(licenseUrl); + return this; + } + + /** + * Get the feedUrl property: Feed URL. + * + * @return the feedUrl value. + */ + public String feedUrl() { + return this.innerProperties() == null ? null : this.innerProperties().feedUrl(); + } + + /** + * Set the feedUrl property: Feed URL. + * + * @param feedUrl the feedUrl value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withFeedUrl(String feedUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withFeedUrl(feedUrl); + return this; + } + + /** + * Get the authors property: List of authors. + * + * @return the authors value. + */ + public List authors() { + return this.innerProperties() == null ? null : this.innerProperties().authors(); + } + + /** + * Set the authors property: List of authors. + * + * @param authors the authors value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withAuthors(List authors) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withAuthors(authors); + return this; + } + + /** + * Get the installerCommandLineParams property: Installer command line parameters. + * + * @return the installerCommandLineParams value. + */ + public String installerCommandLineParams() { + return this.innerProperties() == null ? null : this.innerProperties().installerCommandLineParams(); + } + + /** + * Set the installerCommandLineParams property: Installer command line parameters. + * + * @param installerCommandLineParams the installerCommandLineParams value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withInstallerCommandLineParams(String installerCommandLineParams) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withInstallerCommandLineParams(installerCommandLineParams); + return this; + } + + /** + * Get the publishedDateTime property: Published timestamp. + * + * @return the publishedDateTime value. + */ + public OffsetDateTime publishedDateTime() { + return this.innerProperties() == null ? null : this.innerProperties().publishedDateTime(); + } + + /** + * Set the publishedDateTime property: Published timestamp. + * + * @param publishedDateTime the publishedDateTime value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withPublishedDateTime(OffsetDateTime publishedDateTime) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withPublishedDateTime(publishedDateTime); + return this; + } + + /** + * Get the downloadCount property: Count of downloads. + * + * @return the downloadCount value. + */ + public Integer downloadCount() { + return this.innerProperties() == null ? null : this.innerProperties().downloadCount(); + } + + /** + * Set the downloadCount property: Count of downloads. + * + * @param downloadCount the downloadCount value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withDownloadCount(Integer downloadCount) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withDownloadCount(downloadCount); + return this; + } + + /** + * Get the localIsLatestVersion property: <code>true</code> if the local version is the latest version; + * <code>false</code> otherwise. + * + * @return the localIsLatestVersion value. + */ + public Boolean localIsLatestVersion() { + return this.innerProperties() == null ? null : this.innerProperties().localIsLatestVersion(); + } + + /** + * Set the localIsLatestVersion property: <code>true</code> if the local version is the latest version; + * <code>false</code> otherwise. + * + * @param localIsLatestVersion the localIsLatestVersion value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLocalIsLatestVersion(Boolean localIsLatestVersion) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withLocalIsLatestVersion(localIsLatestVersion); + return this; + } + + /** + * Get the localPath property: Local path. + * + * @return the localPath value. + */ + public String localPath() { + return this.innerProperties() == null ? null : this.innerProperties().localPath(); + } + + /** + * Set the localPath property: Local path. + * + * @param localPath the localPath value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withLocalPath(String localPath) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withLocalPath(localPath); + return this; + } + + /** + * Get the installedDateTime property: Installed timestamp. + * + * @return the installedDateTime value. + */ + public OffsetDateTime installedDateTime() { + return this.innerProperties() == null ? null : this.innerProperties().installedDateTime(); + } + + /** + * Set the installedDateTime property: Installed timestamp. + * + * @param installedDateTime the installedDateTime value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withInstalledDateTime(OffsetDateTime installedDateTime) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withInstalledDateTime(installedDateTime); + return this; + } + + /** + * Get the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Set the provisioningState property: Provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withProvisioningState(String provisioningState) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withProvisioningState(provisioningState); + return this; + } + + /** + * Get the comment property: Site Extension comment. + * + * @return the comment value. + */ + public String comment() { + return this.innerProperties() == null ? null : this.innerProperties().comment(); + } + + /** + * Set the comment property: Site Extension comment. + * + * @param comment the comment value to set. + * @return the SiteExtensionInfoInner object itself. + */ + public SiteExtensionInfoInner withComment(String comment) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteExtensionInfoProperties(); + } + this.innerProperties().withComment(comment); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteExtensionInfoProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteExtensionInfoProperties.java new file mode 100644 index 0000000000000..dc12f40d4726e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteExtensionInfoProperties.java @@ -0,0 +1,550 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.SiteExtensionType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** SiteExtensionInfo resource specific properties. */ +@Fluent +public final class SiteExtensionInfoProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteExtensionInfoProperties.class); + + /* + * Site extension ID. + */ + @JsonProperty(value = "extension_id") + private String extensionId; + + /* + * The title property. + */ + @JsonProperty(value = "title") + private String title; + + /* + * Site extension type. + */ + @JsonProperty(value = "extension_type") + private SiteExtensionType extensionType; + + /* + * Summary description. + */ + @JsonProperty(value = "summary") + private String summary; + + /* + * Detailed description. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Version information. + */ + @JsonProperty(value = "version") + private String version; + + /* + * Extension URL. + */ + @JsonProperty(value = "extension_url") + private String extensionUrl; + + /* + * Project URL. + */ + @JsonProperty(value = "project_url") + private String projectUrl; + + /* + * Icon URL. + */ + @JsonProperty(value = "icon_url") + private String iconUrl; + + /* + * License URL. + */ + @JsonProperty(value = "license_url") + private String licenseUrl; + + /* + * Feed URL. + */ + @JsonProperty(value = "feed_url") + private String feedUrl; + + /* + * List of authors. + */ + @JsonProperty(value = "authors") + private List authors; + + /* + * Installer command line parameters. + */ + @JsonProperty(value = "installer_command_line_params") + private String installerCommandLineParams; + + /* + * Published timestamp. + */ + @JsonProperty(value = "published_date_time") + private OffsetDateTime publishedDateTime; + + /* + * Count of downloads. + */ + @JsonProperty(value = "download_count") + private Integer downloadCount; + + /* + * true if the local version is the latest version; + * false otherwise. + */ + @JsonProperty(value = "local_is_latest_version") + private Boolean localIsLatestVersion; + + /* + * Local path. + */ + @JsonProperty(value = "local_path") + private String localPath; + + /* + * Installed timestamp. + */ + @JsonProperty(value = "installed_date_time") + private OffsetDateTime installedDateTime; + + /* + * Provisioning state. + */ + @JsonProperty(value = "provisioningState") + private String provisioningState; + + /* + * Site Extension comment. + */ + @JsonProperty(value = "comment") + private String comment; + + /** + * Get the extensionId property: Site extension ID. + * + * @return the extensionId value. + */ + public String extensionId() { + return this.extensionId; + } + + /** + * Set the extensionId property: Site extension ID. + * + * @param extensionId the extensionId value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withExtensionId(String extensionId) { + this.extensionId = extensionId; + return this; + } + + /** + * Get the title property: The title property. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: The title property. + * + * @param title the title value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the extensionType property: Site extension type. + * + * @return the extensionType value. + */ + public SiteExtensionType extensionType() { + return this.extensionType; + } + + /** + * Set the extensionType property: Site extension type. + * + * @param extensionType the extensionType value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withExtensionType(SiteExtensionType extensionType) { + this.extensionType = extensionType; + return this; + } + + /** + * Get the summary property: Summary description. + * + * @return the summary value. + */ + public String summary() { + return this.summary; + } + + /** + * Set the summary property: Summary description. + * + * @param summary the summary value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withSummary(String summary) { + this.summary = summary; + return this; + } + + /** + * Get the description property: Detailed description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Detailed description. + * + * @param description the description value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the version property: Version information. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version information. + * + * @param version the version value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the extensionUrl property: Extension URL. + * + * @return the extensionUrl value. + */ + public String extensionUrl() { + return this.extensionUrl; + } + + /** + * Set the extensionUrl property: Extension URL. + * + * @param extensionUrl the extensionUrl value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withExtensionUrl(String extensionUrl) { + this.extensionUrl = extensionUrl; + return this; + } + + /** + * Get the projectUrl property: Project URL. + * + * @return the projectUrl value. + */ + public String projectUrl() { + return this.projectUrl; + } + + /** + * Set the projectUrl property: Project URL. + * + * @param projectUrl the projectUrl value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withProjectUrl(String projectUrl) { + this.projectUrl = projectUrl; + return this; + } + + /** + * Get the iconUrl property: Icon URL. + * + * @return the iconUrl value. + */ + public String iconUrl() { + return this.iconUrl; + } + + /** + * Set the iconUrl property: Icon URL. + * + * @param iconUrl the iconUrl value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withIconUrl(String iconUrl) { + this.iconUrl = iconUrl; + return this; + } + + /** + * Get the licenseUrl property: License URL. + * + * @return the licenseUrl value. + */ + public String licenseUrl() { + return this.licenseUrl; + } + + /** + * Set the licenseUrl property: License URL. + * + * @param licenseUrl the licenseUrl value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withLicenseUrl(String licenseUrl) { + this.licenseUrl = licenseUrl; + return this; + } + + /** + * Get the feedUrl property: Feed URL. + * + * @return the feedUrl value. + */ + public String feedUrl() { + return this.feedUrl; + } + + /** + * Set the feedUrl property: Feed URL. + * + * @param feedUrl the feedUrl value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withFeedUrl(String feedUrl) { + this.feedUrl = feedUrl; + return this; + } + + /** + * Get the authors property: List of authors. + * + * @return the authors value. + */ + public List authors() { + return this.authors; + } + + /** + * Set the authors property: List of authors. + * + * @param authors the authors value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withAuthors(List authors) { + this.authors = authors; + return this; + } + + /** + * Get the installerCommandLineParams property: Installer command line parameters. + * + * @return the installerCommandLineParams value. + */ + public String installerCommandLineParams() { + return this.installerCommandLineParams; + } + + /** + * Set the installerCommandLineParams property: Installer command line parameters. + * + * @param installerCommandLineParams the installerCommandLineParams value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withInstallerCommandLineParams(String installerCommandLineParams) { + this.installerCommandLineParams = installerCommandLineParams; + return this; + } + + /** + * Get the publishedDateTime property: Published timestamp. + * + * @return the publishedDateTime value. + */ + public OffsetDateTime publishedDateTime() { + return this.publishedDateTime; + } + + /** + * Set the publishedDateTime property: Published timestamp. + * + * @param publishedDateTime the publishedDateTime value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withPublishedDateTime(OffsetDateTime publishedDateTime) { + this.publishedDateTime = publishedDateTime; + return this; + } + + /** + * Get the downloadCount property: Count of downloads. + * + * @return the downloadCount value. + */ + public Integer downloadCount() { + return this.downloadCount; + } + + /** + * Set the downloadCount property: Count of downloads. + * + * @param downloadCount the downloadCount value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withDownloadCount(Integer downloadCount) { + this.downloadCount = downloadCount; + return this; + } + + /** + * Get the localIsLatestVersion property: <code>true</code> if the local version is the latest version; + * <code>false</code> otherwise. + * + * @return the localIsLatestVersion value. + */ + public Boolean localIsLatestVersion() { + return this.localIsLatestVersion; + } + + /** + * Set the localIsLatestVersion property: <code>true</code> if the local version is the latest version; + * <code>false</code> otherwise. + * + * @param localIsLatestVersion the localIsLatestVersion value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withLocalIsLatestVersion(Boolean localIsLatestVersion) { + this.localIsLatestVersion = localIsLatestVersion; + return this; + } + + /** + * Get the localPath property: Local path. + * + * @return the localPath value. + */ + public String localPath() { + return this.localPath; + } + + /** + * Set the localPath property: Local path. + * + * @param localPath the localPath value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withLocalPath(String localPath) { + this.localPath = localPath; + return this; + } + + /** + * Get the installedDateTime property: Installed timestamp. + * + * @return the installedDateTime value. + */ + public OffsetDateTime installedDateTime() { + return this.installedDateTime; + } + + /** + * Set the installedDateTime property: Installed timestamp. + * + * @param installedDateTime the installedDateTime value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withInstalledDateTime(OffsetDateTime installedDateTime) { + this.installedDateTime = installedDateTime; + return this; + } + + /** + * Get the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.provisioningState; + } + + /** + * Set the provisioningState property: Provisioning state. + * + * @param provisioningState the provisioningState value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withProvisioningState(String provisioningState) { + this.provisioningState = provisioningState; + return this; + } + + /** + * Get the comment property: Site Extension comment. + * + * @return the comment value. + */ + public String comment() { + return this.comment; + } + + /** + * Set the comment property: Site Extension comment. + * + * @param comment the comment value to set. + * @return the SiteExtensionInfoProperties object itself. + */ + public SiteExtensionInfoProperties withComment(String comment) { + this.comment = comment; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteInner.java new file mode 100644 index 0000000000000..888c4dd6b24ce --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteInner.java @@ -0,0 +1,882 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ClientCertMode; +import com.azure.resourcemanager.appservice.generated.models.CloningInfo; +import com.azure.resourcemanager.appservice.generated.models.ExtendedLocation; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.HostnameSslState; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.RedundancyMode; +import com.azure.resourcemanager.appservice.generated.models.SiteAvailabilityState; +import com.azure.resourcemanager.appservice.generated.models.SlotSwapStatus; +import com.azure.resourcemanager.appservice.generated.models.UsageState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** A web app, a mobile app backend, or an API app. */ +@Fluent +public final class SiteInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteInner.class); + + /* + * Site resource specific properties + */ + @JsonProperty(value = "properties") + private SitePropertiesInner innerProperties; + + /* + * Managed service identity. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Extended Location. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: Site resource specific properties. + * + * @return the innerProperties value. + */ + private SitePropertiesInner innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: Managed service identity. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity. + * + * @param identity the identity value to set. + * @return the SiteInner object itself. + */ + public SiteInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the extendedLocation property: Extended Location. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: Extended Location. + * + * @param extendedLocation the extendedLocation value to set. + * @return the SiteInner object itself. + */ + public SiteInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the SiteInner object itself. + */ + public SiteInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public SiteInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public SiteInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the state property: Current state of the app. + * + * @return the state value. + */ + public String state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Get the hostNames property: Hostnames associated with the app. + * + * @return the hostNames value. + */ + public List hostNames() { + return this.innerProperties() == null ? null : this.innerProperties().hostNames(); + } + + /** + * Get the repositorySiteName property: Name of the repository site. + * + * @return the repositorySiteName value. + */ + public String repositorySiteName() { + return this.innerProperties() == null ? null : this.innerProperties().repositorySiteName(); + } + + /** + * Get the usageState property: State indicating whether the app has exceeded its quota usage. Read-only. + * + * @return the usageState value. + */ + public UsageState usageState() { + return this.innerProperties() == null ? null : this.innerProperties().usageState(); + } + + /** + * Get the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @param enabled the enabled value to set. + * @return the SiteInner object itself. + */ + public SiteInner withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the enabledHostNames property: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) + * AND enabled. Otherwise, the app is not served on those hostnames. + * + * @return the enabledHostNames value. + */ + public List enabledHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().enabledHostNames(); + } + + /** + * Get the availabilityState property: Management information availability state for the app. + * + * @return the availabilityState value. + */ + public SiteAvailabilityState availabilityState() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityState(); + } + + /** + * Get the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostnameSslStates value. + */ + public List hostnameSslStates() { + return this.innerProperties() == null ? null : this.innerProperties().hostnameSslStates(); + } + + /** + * Set the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @param hostnameSslStates the hostnameSslStates value to set. + * @return the SiteInner object itself. + */ + public SiteInner withHostnameSslStates(List hostnameSslStates) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withHostnameSslStates(hostnameSslStates); + return this; + } + + /** + * Get the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.innerProperties() == null ? null : this.innerProperties().serverFarmId(); + } + + /** + * Set the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set. + * @return the SiteInner object itself. + */ + public SiteInner withServerFarmId(String serverFarmId) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withServerFarmId(serverFarmId); + return this; + } + + /** + * Get the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value. + */ + public Boolean reserved() { + return this.innerProperties() == null ? null : this.innerProperties().reserved(); + } + + /** + * Set the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @param reserved the reserved value to set. + * @return the SiteInner object itself. + */ + public SiteInner withReserved(Boolean reserved) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withReserved(reserved); + return this; + } + + /** + * Get the isXenon property: Obsolete: Hyper-V sandbox. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.innerProperties() == null ? null : this.innerProperties().isXenon(); + } + + /** + * Set the isXenon property: Obsolete: Hyper-V sandbox. + * + * @param isXenon the isXenon value to set. + * @return the SiteInner object itself. + */ + public SiteInner withIsXenon(Boolean isXenon) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withIsXenon(isXenon); + return this; + } + + /** + * Get the hyperV property: Hyper-V sandbox. + * + * @return the hyperV value. + */ + public Boolean hyperV() { + return this.innerProperties() == null ? null : this.innerProperties().hyperV(); + } + + /** + * Set the hyperV property: Hyper-V sandbox. + * + * @param hyperV the hyperV value to set. + * @return the SiteInner object itself. + */ + public SiteInner withHyperV(Boolean hyperV) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withHyperV(hyperV); + return this; + } + + /** + * Get the lastModifiedTimeUtc property: Last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); + } + + /** + * Get the siteConfig property: Configuration of the app. + * + * @return the siteConfig value. + */ + public SiteConfigInner siteConfig() { + return this.innerProperties() == null ? null : this.innerProperties().siteConfig(); + } + + /** + * Set the siteConfig property: Configuration of the app. + * + * @param siteConfig the siteConfig value to set. + * @return the SiteInner object itself. + */ + public SiteInner withSiteConfig(SiteConfigInner siteConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withSiteConfig(siteConfig); + return this; + } + + /** + * Get the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value. + */ + public List trafficManagerHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().trafficManagerHostNames(); + } + + /** + * Get the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value. + */ + public Boolean scmSiteAlsoStopped() { + return this.innerProperties() == null ? null : this.innerProperties().scmSiteAlsoStopped(); + } + + /** + * Set the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @param scmSiteAlsoStopped the scmSiteAlsoStopped value to set. + * @return the SiteInner object itself. + */ + public SiteInner withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withScmSiteAlsoStopped(scmSiteAlsoStopped); + return this; + } + + /** + * Get the targetSwapSlot property: Specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value. + */ + public String targetSwapSlot() { + return this.innerProperties() == null ? null : this.innerProperties().targetSwapSlot(); + } + + /** + * Get the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerProperties() == null ? null : this.innerProperties().hostingEnvironmentProfile(); + } + + /** + * Set the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set. + * @return the SiteInner object itself. + */ + public SiteInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withHostingEnvironmentProfile(hostingEnvironmentProfile); + return this; + } + + /** + * Get the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @return the clientAffinityEnabled value. + */ + public Boolean clientAffinityEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().clientAffinityEnabled(); + } + + /** + * Set the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @param clientAffinityEnabled the clientAffinityEnabled value to set. + * @return the SiteInner object itself. + */ + public SiteInner withClientAffinityEnabled(Boolean clientAffinityEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withClientAffinityEnabled(clientAffinityEnabled); + return this; + } + + /** + * Get the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @return the clientCertEnabled value. + */ + public Boolean clientCertEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().clientCertEnabled(); + } + + /** + * Set the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @param clientCertEnabled the clientCertEnabled value to set. + * @return the SiteInner object itself. + */ + public SiteInner withClientCertEnabled(Boolean clientCertEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withClientCertEnabled(clientCertEnabled); + return this; + } + + /** + * Get the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @return the clientCertMode value. + */ + public ClientCertMode clientCertMode() { + return this.innerProperties() == null ? null : this.innerProperties().clientCertMode(); + } + + /** + * Set the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @param clientCertMode the clientCertMode value to set. + * @return the SiteInner object itself. + */ + public SiteInner withClientCertMode(ClientCertMode clientCertMode) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withClientCertMode(clientCertMode); + return this; + } + + /** + * Get the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value. + */ + public String clientCertExclusionPaths() { + return this.innerProperties() == null ? null : this.innerProperties().clientCertExclusionPaths(); + } + + /** + * Set the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @param clientCertExclusionPaths the clientCertExclusionPaths value to set. + * @return the SiteInner object itself. + */ + public SiteInner withClientCertExclusionPaths(String clientCertExclusionPaths) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withClientCertExclusionPaths(clientCertExclusionPaths); + return this; + } + + /** + * Get the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @return the hostNamesDisabled value. + */ + public Boolean hostNamesDisabled() { + return this.innerProperties() == null ? null : this.innerProperties().hostNamesDisabled(); + } + + /** + * Set the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @param hostNamesDisabled the hostNamesDisabled value to set. + * @return the SiteInner object itself. + */ + public SiteInner withHostNamesDisabled(Boolean hostNamesDisabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withHostNamesDisabled(hostNamesDisabled); + return this; + } + + /** + * Get the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @return the customDomainVerificationId value. + */ + public String customDomainVerificationId() { + return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationId(); + } + + /** + * Set the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @param customDomainVerificationId the customDomainVerificationId value to set. + * @return the SiteInner object itself. + */ + public SiteInner withCustomDomainVerificationId(String customDomainVerificationId) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withCustomDomainVerificationId(customDomainVerificationId); + return this; + } + + /** + * Get the outboundIpAddresses property: List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + * + * @return the outboundIpAddresses value. + */ + public String outboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().outboundIpAddresses(); + } + + /** + * Get the possibleOutboundIpAddresses property: List of IP addresses that the app uses for outbound connections + * (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value. + */ + public String possibleOutboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().possibleOutboundIpAddresses(); + } + + /** + * Get the containerSize property: Size of the function container. + * + * @return the containerSize value. + */ + public Integer containerSize() { + return this.innerProperties() == null ? null : this.innerProperties().containerSize(); + } + + /** + * Set the containerSize property: Size of the function container. + * + * @param containerSize the containerSize value to set. + * @return the SiteInner object itself. + */ + public SiteInner withContainerSize(Integer containerSize) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withContainerSize(containerSize); + return this; + } + + /** + * Get the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @return the dailyMemoryTimeQuota value. + */ + public Integer dailyMemoryTimeQuota() { + return this.innerProperties() == null ? null : this.innerProperties().dailyMemoryTimeQuota(); + } + + /** + * Set the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @param dailyMemoryTimeQuota the dailyMemoryTimeQuota value to set. + * @return the SiteInner object itself. + */ + public SiteInner withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withDailyMemoryTimeQuota(dailyMemoryTimeQuota); + return this; + } + + /** + * Get the suspendedTill property: App suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value. + */ + public OffsetDateTime suspendedTill() { + return this.innerProperties() == null ? null : this.innerProperties().suspendedTill(); + } + + /** + * Get the maxNumberOfWorkers property: Maximum number of workers. This only applies to Functions container. + * + * @return the maxNumberOfWorkers value. + */ + public Integer maxNumberOfWorkers() { + return this.innerProperties() == null ? null : this.innerProperties().maxNumberOfWorkers(); + } + + /** + * Get the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value. + */ + public CloningInfo cloningInfo() { + return this.innerProperties() == null ? null : this.innerProperties().cloningInfo(); + } + + /** + * Set the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @param cloningInfo the cloningInfo value to set. + * @return the SiteInner object itself. + */ + public SiteInner withCloningInfo(CloningInfo cloningInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withCloningInfo(cloningInfo); + return this; + } + + /** + * Get the resourceGroup property: Name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().resourceGroup(); + } + + /** + * Get the isDefaultContainer property: <code>true</code> if the app is a default container; otherwise, + * <code>false</code>. + * + * @return the isDefaultContainer value. + */ + public Boolean isDefaultContainer() { + return this.innerProperties() == null ? null : this.innerProperties().isDefaultContainer(); + } + + /** + * Get the defaultHostname property: Default hostname of the app. Read-only. + * + * @return the defaultHostname value. + */ + public String defaultHostname() { + return this.innerProperties() == null ? null : this.innerProperties().defaultHostname(); + } + + /** + * Get the slotSwapStatus property: Status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value. + */ + public SlotSwapStatus slotSwapStatus() { + return this.innerProperties() == null ? null : this.innerProperties().slotSwapStatus(); + } + + /** + * Get the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @return the httpsOnly value. + */ + public Boolean httpsOnly() { + return this.innerProperties() == null ? null : this.innerProperties().httpsOnly(); + } + + /** + * Set the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @param httpsOnly the httpsOnly value to set. + * @return the SiteInner object itself. + */ + public SiteInner withHttpsOnly(Boolean httpsOnly) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withHttpsOnly(httpsOnly); + return this; + } + + /** + * Get the redundancyMode property: Site redundancy mode. + * + * @return the redundancyMode value. + */ + public RedundancyMode redundancyMode() { + return this.innerProperties() == null ? null : this.innerProperties().redundancyMode(); + } + + /** + * Set the redundancyMode property: Site redundancy mode. + * + * @param redundancyMode the redundancyMode value to set. + * @return the SiteInner object itself. + */ + public SiteInner withRedundancyMode(RedundancyMode redundancyMode) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withRedundancyMode(redundancyMode); + return this; + } + + /** + * Get the inProgressOperationId property: Specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value. + */ + public UUID inProgressOperationId() { + return this.innerProperties() == null ? null : this.innerProperties().inProgressOperationId(); + } + + /** + * Get the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @return the storageAccountRequired value. + */ + public Boolean storageAccountRequired() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountRequired(); + } + + /** + * Set the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @param storageAccountRequired the storageAccountRequired value to set. + * @return the SiteInner object itself. + */ + public SiteInner withStorageAccountRequired(Boolean storageAccountRequired) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withStorageAccountRequired(storageAccountRequired); + return this; + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultReferenceIdentity(); + } + + /** + * Set the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @param keyVaultReferenceIdentity the keyVaultReferenceIdentity value to set. + * @return the SiteInner object itself. + */ + public SiteInner withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withKeyVaultReferenceIdentity(keyVaultReferenceIdentity); + return this; + } + + /** + * Get the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkSubnetId value. + */ + public String virtualNetworkSubnetId() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkSubnetId(); + } + + /** + * Set the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param virtualNetworkSubnetId the virtualNetworkSubnetId value to set. + * @return the SiteInner object itself. + */ + public SiteInner withVirtualNetworkSubnetId(String virtualNetworkSubnetId) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePropertiesInner(); + } + this.innerProperties().withVirtualNetworkSubnetId(virtualNetworkSubnetId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + if (extendedLocation() != null) { + extendedLocation().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteLogsConfigInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteLogsConfigInner.java new file mode 100644 index 0000000000000..0f40790a481ef --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteLogsConfigInner.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ApplicationLogsConfig; +import com.azure.resourcemanager.appservice.generated.models.EnabledConfig; +import com.azure.resourcemanager.appservice.generated.models.HttpLogsConfig; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration of App Service site logs. */ +@Fluent +public final class SiteLogsConfigInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteLogsConfigInner.class); + + /* + * SiteLogsConfig resource specific properties + */ + @JsonProperty(value = "properties") + private SiteLogsConfigProperties innerProperties; + + /** + * Get the innerProperties property: SiteLogsConfig resource specific properties. + * + * @return the innerProperties value. + */ + private SiteLogsConfigProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SiteLogsConfigInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the applicationLogs property: Application logs configuration. + * + * @return the applicationLogs value. + */ + public ApplicationLogsConfig applicationLogs() { + return this.innerProperties() == null ? null : this.innerProperties().applicationLogs(); + } + + /** + * Set the applicationLogs property: Application logs configuration. + * + * @param applicationLogs the applicationLogs value to set. + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withApplicationLogs(ApplicationLogsConfig applicationLogs) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteLogsConfigProperties(); + } + this.innerProperties().withApplicationLogs(applicationLogs); + return this; + } + + /** + * Get the httpLogs property: HTTP logs configuration. + * + * @return the httpLogs value. + */ + public HttpLogsConfig httpLogs() { + return this.innerProperties() == null ? null : this.innerProperties().httpLogs(); + } + + /** + * Set the httpLogs property: HTTP logs configuration. + * + * @param httpLogs the httpLogs value to set. + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withHttpLogs(HttpLogsConfig httpLogs) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteLogsConfigProperties(); + } + this.innerProperties().withHttpLogs(httpLogs); + return this; + } + + /** + * Get the failedRequestsTracing property: Failed requests tracing configuration. + * + * @return the failedRequestsTracing value. + */ + public EnabledConfig failedRequestsTracing() { + return this.innerProperties() == null ? null : this.innerProperties().failedRequestsTracing(); + } + + /** + * Set the failedRequestsTracing property: Failed requests tracing configuration. + * + * @param failedRequestsTracing the failedRequestsTracing value to set. + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withFailedRequestsTracing(EnabledConfig failedRequestsTracing) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteLogsConfigProperties(); + } + this.innerProperties().withFailedRequestsTracing(failedRequestsTracing); + return this; + } + + /** + * Get the detailedErrorMessages property: Detailed error messages configuration. + * + * @return the detailedErrorMessages value. + */ + public EnabledConfig detailedErrorMessages() { + return this.innerProperties() == null ? null : this.innerProperties().detailedErrorMessages(); + } + + /** + * Set the detailedErrorMessages property: Detailed error messages configuration. + * + * @param detailedErrorMessages the detailedErrorMessages value to set. + * @return the SiteLogsConfigInner object itself. + */ + public SiteLogsConfigInner withDetailedErrorMessages(EnabledConfig detailedErrorMessages) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteLogsConfigProperties(); + } + this.innerProperties().withDetailedErrorMessages(detailedErrorMessages); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteLogsConfigProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteLogsConfigProperties.java new file mode 100644 index 0000000000000..c3f9ba1ac16f1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteLogsConfigProperties.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ApplicationLogsConfig; +import com.azure.resourcemanager.appservice.generated.models.EnabledConfig; +import com.azure.resourcemanager.appservice.generated.models.HttpLogsConfig; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SiteLogsConfig resource specific properties. */ +@Fluent +public final class SiteLogsConfigProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteLogsConfigProperties.class); + + /* + * Application logs configuration. + */ + @JsonProperty(value = "applicationLogs") + private ApplicationLogsConfig applicationLogs; + + /* + * HTTP logs configuration. + */ + @JsonProperty(value = "httpLogs") + private HttpLogsConfig httpLogs; + + /* + * Failed requests tracing configuration. + */ + @JsonProperty(value = "failedRequestsTracing") + private EnabledConfig failedRequestsTracing; + + /* + * Detailed error messages configuration. + */ + @JsonProperty(value = "detailedErrorMessages") + private EnabledConfig detailedErrorMessages; + + /** + * Get the applicationLogs property: Application logs configuration. + * + * @return the applicationLogs value. + */ + public ApplicationLogsConfig applicationLogs() { + return this.applicationLogs; + } + + /** + * Set the applicationLogs property: Application logs configuration. + * + * @param applicationLogs the applicationLogs value to set. + * @return the SiteLogsConfigProperties object itself. + */ + public SiteLogsConfigProperties withApplicationLogs(ApplicationLogsConfig applicationLogs) { + this.applicationLogs = applicationLogs; + return this; + } + + /** + * Get the httpLogs property: HTTP logs configuration. + * + * @return the httpLogs value. + */ + public HttpLogsConfig httpLogs() { + return this.httpLogs; + } + + /** + * Set the httpLogs property: HTTP logs configuration. + * + * @param httpLogs the httpLogs value to set. + * @return the SiteLogsConfigProperties object itself. + */ + public SiteLogsConfigProperties withHttpLogs(HttpLogsConfig httpLogs) { + this.httpLogs = httpLogs; + return this; + } + + /** + * Get the failedRequestsTracing property: Failed requests tracing configuration. + * + * @return the failedRequestsTracing value. + */ + public EnabledConfig failedRequestsTracing() { + return this.failedRequestsTracing; + } + + /** + * Set the failedRequestsTracing property: Failed requests tracing configuration. + * + * @param failedRequestsTracing the failedRequestsTracing value to set. + * @return the SiteLogsConfigProperties object itself. + */ + public SiteLogsConfigProperties withFailedRequestsTracing(EnabledConfig failedRequestsTracing) { + this.failedRequestsTracing = failedRequestsTracing; + return this; + } + + /** + * Get the detailedErrorMessages property: Detailed error messages configuration. + * + * @return the detailedErrorMessages value. + */ + public EnabledConfig detailedErrorMessages() { + return this.detailedErrorMessages; + } + + /** + * Set the detailedErrorMessages property: Detailed error messages configuration. + * + * @param detailedErrorMessages the detailedErrorMessages value to set. + * @return the SiteLogsConfigProperties object itself. + */ + public SiteLogsConfigProperties withDetailedErrorMessages(EnabledConfig detailedErrorMessages) { + this.detailedErrorMessages = detailedErrorMessages; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (applicationLogs() != null) { + applicationLogs().validate(); + } + if (httpLogs() != null) { + httpLogs().validate(); + } + if (failedRequestsTracing() != null) { + failedRequestsTracing().validate(); + } + if (detailedErrorMessages() != null) { + detailedErrorMessages().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePatchResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePatchResourceInner.java new file mode 100644 index 0000000000000..880ef447760fb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePatchResourceInner.java @@ -0,0 +1,820 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ClientCertMode; +import com.azure.resourcemanager.appservice.generated.models.CloningInfo; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.HostnameSslState; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.RedundancyMode; +import com.azure.resourcemanager.appservice.generated.models.SiteAvailabilityState; +import com.azure.resourcemanager.appservice.generated.models.SlotSwapStatus; +import com.azure.resourcemanager.appservice.generated.models.UsageState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** ARM resource for a site. */ +@Fluent +public final class SitePatchResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SitePatchResourceInner.class); + + /* + * SitePatchResource resource specific properties + */ + @JsonProperty(value = "properties") + private SitePatchResourcePropertiesInner innerProperties; + + /* + * Managed service identity. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /** + * Get the innerProperties property: SitePatchResource resource specific properties. + * + * @return the innerProperties value. + */ + private SitePatchResourcePropertiesInner innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: Managed service identity. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity. + * + * @param identity the identity value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** {@inheritDoc} */ + @Override + public SitePatchResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the state property: Current state of the app. + * + * @return the state value. + */ + public String state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Get the hostNames property: Hostnames associated with the app. + * + * @return the hostNames value. + */ + public List hostNames() { + return this.innerProperties() == null ? null : this.innerProperties().hostNames(); + } + + /** + * Get the repositorySiteName property: Name of the repository site. + * + * @return the repositorySiteName value. + */ + public String repositorySiteName() { + return this.innerProperties() == null ? null : this.innerProperties().repositorySiteName(); + } + + /** + * Get the usageState property: State indicating whether the app has exceeded its quota usage. Read-only. + * + * @return the usageState value. + */ + public UsageState usageState() { + return this.innerProperties() == null ? null : this.innerProperties().usageState(); + } + + /** + * Get the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.innerProperties() == null ? null : this.innerProperties().enabled(); + } + + /** + * Set the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @param enabled the enabled value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withEnabled(Boolean enabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withEnabled(enabled); + return this; + } + + /** + * Get the enabledHostNames property: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) + * AND enabled. Otherwise, the app is not served on those hostnames. + * + * @return the enabledHostNames value. + */ + public List enabledHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().enabledHostNames(); + } + + /** + * Get the availabilityState property: Management information availability state for the app. + * + * @return the availabilityState value. + */ + public SiteAvailabilityState availabilityState() { + return this.innerProperties() == null ? null : this.innerProperties().availabilityState(); + } + + /** + * Get the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostnameSslStates value. + */ + public List hostnameSslStates() { + return this.innerProperties() == null ? null : this.innerProperties().hostnameSslStates(); + } + + /** + * Set the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @param hostnameSslStates the hostnameSslStates value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHostnameSslStates(List hostnameSslStates) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withHostnameSslStates(hostnameSslStates); + return this; + } + + /** + * Get the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.innerProperties() == null ? null : this.innerProperties().serverFarmId(); + } + + /** + * Set the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withServerFarmId(String serverFarmId) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withServerFarmId(serverFarmId); + return this; + } + + /** + * Get the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value. + */ + public Boolean reserved() { + return this.innerProperties() == null ? null : this.innerProperties().reserved(); + } + + /** + * Set the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @param reserved the reserved value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withReserved(Boolean reserved) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withReserved(reserved); + return this; + } + + /** + * Get the isXenon property: Obsolete: Hyper-V sandbox. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.innerProperties() == null ? null : this.innerProperties().isXenon(); + } + + /** + * Set the isXenon property: Obsolete: Hyper-V sandbox. + * + * @param isXenon the isXenon value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withIsXenon(Boolean isXenon) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withIsXenon(isXenon); + return this; + } + + /** + * Get the hyperV property: Hyper-V sandbox. + * + * @return the hyperV value. + */ + public Boolean hyperV() { + return this.innerProperties() == null ? null : this.innerProperties().hyperV(); + } + + /** + * Set the hyperV property: Hyper-V sandbox. + * + * @param hyperV the hyperV value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHyperV(Boolean hyperV) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withHyperV(hyperV); + return this; + } + + /** + * Get the lastModifiedTimeUtc property: Last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().lastModifiedTimeUtc(); + } + + /** + * Get the siteConfig property: Configuration of the app. + * + * @return the siteConfig value. + */ + public SiteConfigInner siteConfig() { + return this.innerProperties() == null ? null : this.innerProperties().siteConfig(); + } + + /** + * Set the siteConfig property: Configuration of the app. + * + * @param siteConfig the siteConfig value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withSiteConfig(SiteConfigInner siteConfig) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withSiteConfig(siteConfig); + return this; + } + + /** + * Get the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value. + */ + public List trafficManagerHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().trafficManagerHostNames(); + } + + /** + * Get the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value. + */ + public Boolean scmSiteAlsoStopped() { + return this.innerProperties() == null ? null : this.innerProperties().scmSiteAlsoStopped(); + } + + /** + * Set the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @param scmSiteAlsoStopped the scmSiteAlsoStopped value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withScmSiteAlsoStopped(scmSiteAlsoStopped); + return this; + } + + /** + * Get the targetSwapSlot property: Specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value. + */ + public String targetSwapSlot() { + return this.innerProperties() == null ? null : this.innerProperties().targetSwapSlot(); + } + + /** + * Get the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerProperties() == null ? null : this.innerProperties().hostingEnvironmentProfile(); + } + + /** + * Set the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withHostingEnvironmentProfile(hostingEnvironmentProfile); + return this; + } + + /** + * Get the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @return the clientAffinityEnabled value. + */ + public Boolean clientAffinityEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().clientAffinityEnabled(); + } + + /** + * Set the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @param clientAffinityEnabled the clientAffinityEnabled value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withClientAffinityEnabled(Boolean clientAffinityEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withClientAffinityEnabled(clientAffinityEnabled); + return this; + } + + /** + * Get the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @return the clientCertEnabled value. + */ + public Boolean clientCertEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().clientCertEnabled(); + } + + /** + * Set the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @param clientCertEnabled the clientCertEnabled value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withClientCertEnabled(Boolean clientCertEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withClientCertEnabled(clientCertEnabled); + return this; + } + + /** + * Get the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @return the clientCertMode value. + */ + public ClientCertMode clientCertMode() { + return this.innerProperties() == null ? null : this.innerProperties().clientCertMode(); + } + + /** + * Set the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @param clientCertMode the clientCertMode value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withClientCertMode(ClientCertMode clientCertMode) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withClientCertMode(clientCertMode); + return this; + } + + /** + * Get the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value. + */ + public String clientCertExclusionPaths() { + return this.innerProperties() == null ? null : this.innerProperties().clientCertExclusionPaths(); + } + + /** + * Set the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @param clientCertExclusionPaths the clientCertExclusionPaths value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withClientCertExclusionPaths(String clientCertExclusionPaths) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withClientCertExclusionPaths(clientCertExclusionPaths); + return this; + } + + /** + * Get the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @return the hostNamesDisabled value. + */ + public Boolean hostNamesDisabled() { + return this.innerProperties() == null ? null : this.innerProperties().hostNamesDisabled(); + } + + /** + * Set the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @param hostNamesDisabled the hostNamesDisabled value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHostNamesDisabled(Boolean hostNamesDisabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withHostNamesDisabled(hostNamesDisabled); + return this; + } + + /** + * Get the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @return the customDomainVerificationId value. + */ + public String customDomainVerificationId() { + return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationId(); + } + + /** + * Set the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @param customDomainVerificationId the customDomainVerificationId value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withCustomDomainVerificationId(String customDomainVerificationId) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withCustomDomainVerificationId(customDomainVerificationId); + return this; + } + + /** + * Get the outboundIpAddresses property: List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + * + * @return the outboundIpAddresses value. + */ + public String outboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().outboundIpAddresses(); + } + + /** + * Get the possibleOutboundIpAddresses property: List of IP addresses that the app uses for outbound connections + * (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value. + */ + public String possibleOutboundIpAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().possibleOutboundIpAddresses(); + } + + /** + * Get the containerSize property: Size of the function container. + * + * @return the containerSize value. + */ + public Integer containerSize() { + return this.innerProperties() == null ? null : this.innerProperties().containerSize(); + } + + /** + * Set the containerSize property: Size of the function container. + * + * @param containerSize the containerSize value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withContainerSize(Integer containerSize) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withContainerSize(containerSize); + return this; + } + + /** + * Get the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @return the dailyMemoryTimeQuota value. + */ + public Integer dailyMemoryTimeQuota() { + return this.innerProperties() == null ? null : this.innerProperties().dailyMemoryTimeQuota(); + } + + /** + * Set the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @param dailyMemoryTimeQuota the dailyMemoryTimeQuota value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withDailyMemoryTimeQuota(dailyMemoryTimeQuota); + return this; + } + + /** + * Get the suspendedTill property: App suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value. + */ + public OffsetDateTime suspendedTill() { + return this.innerProperties() == null ? null : this.innerProperties().suspendedTill(); + } + + /** + * Get the maxNumberOfWorkers property: Maximum number of workers. This only applies to Functions container. + * + * @return the maxNumberOfWorkers value. + */ + public Integer maxNumberOfWorkers() { + return this.innerProperties() == null ? null : this.innerProperties().maxNumberOfWorkers(); + } + + /** + * Get the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value. + */ + public CloningInfo cloningInfo() { + return this.innerProperties() == null ? null : this.innerProperties().cloningInfo(); + } + + /** + * Set the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @param cloningInfo the cloningInfo value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withCloningInfo(CloningInfo cloningInfo) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withCloningInfo(cloningInfo); + return this; + } + + /** + * Get the resourceGroup property: Name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().resourceGroup(); + } + + /** + * Get the isDefaultContainer property: <code>true</code> if the app is a default container; otherwise, + * <code>false</code>. + * + * @return the isDefaultContainer value. + */ + public Boolean isDefaultContainer() { + return this.innerProperties() == null ? null : this.innerProperties().isDefaultContainer(); + } + + /** + * Get the defaultHostname property: Default hostname of the app. Read-only. + * + * @return the defaultHostname value. + */ + public String defaultHostname() { + return this.innerProperties() == null ? null : this.innerProperties().defaultHostname(); + } + + /** + * Get the slotSwapStatus property: Status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value. + */ + public SlotSwapStatus slotSwapStatus() { + return this.innerProperties() == null ? null : this.innerProperties().slotSwapStatus(); + } + + /** + * Get the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @return the httpsOnly value. + */ + public Boolean httpsOnly() { + return this.innerProperties() == null ? null : this.innerProperties().httpsOnly(); + } + + /** + * Set the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @param httpsOnly the httpsOnly value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withHttpsOnly(Boolean httpsOnly) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withHttpsOnly(httpsOnly); + return this; + } + + /** + * Get the redundancyMode property: Site redundancy mode. + * + * @return the redundancyMode value. + */ + public RedundancyMode redundancyMode() { + return this.innerProperties() == null ? null : this.innerProperties().redundancyMode(); + } + + /** + * Set the redundancyMode property: Site redundancy mode. + * + * @param redundancyMode the redundancyMode value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withRedundancyMode(RedundancyMode redundancyMode) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withRedundancyMode(redundancyMode); + return this; + } + + /** + * Get the inProgressOperationId property: Specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value. + */ + public UUID inProgressOperationId() { + return this.innerProperties() == null ? null : this.innerProperties().inProgressOperationId(); + } + + /** + * Get the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @return the storageAccountRequired value. + */ + public Boolean storageAccountRequired() { + return this.innerProperties() == null ? null : this.innerProperties().storageAccountRequired(); + } + + /** + * Set the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @param storageAccountRequired the storageAccountRequired value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withStorageAccountRequired(Boolean storageAccountRequired) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withStorageAccountRequired(storageAccountRequired); + return this; + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultReferenceIdentity(); + } + + /** + * Set the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @param keyVaultReferenceIdentity the keyVaultReferenceIdentity value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withKeyVaultReferenceIdentity(keyVaultReferenceIdentity); + return this; + } + + /** + * Get the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkSubnetId value. + */ + public String virtualNetworkSubnetId() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkSubnetId(); + } + + /** + * Set the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param virtualNetworkSubnetId the virtualNetworkSubnetId value to set. + * @return the SitePatchResourceInner object itself. + */ + public SitePatchResourceInner withVirtualNetworkSubnetId(String virtualNetworkSubnetId) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePatchResourcePropertiesInner(); + } + this.innerProperties().withVirtualNetworkSubnetId(virtualNetworkSubnetId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePatchResourcePropertiesInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePatchResourcePropertiesInner.java new file mode 100644 index 0000000000000..fcbcd3ba87763 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePatchResourcePropertiesInner.java @@ -0,0 +1,988 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ClientCertMode; +import com.azure.resourcemanager.appservice.generated.models.CloningInfo; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.HostnameSslState; +import com.azure.resourcemanager.appservice.generated.models.RedundancyMode; +import com.azure.resourcemanager.appservice.generated.models.SiteAvailabilityState; +import com.azure.resourcemanager.appservice.generated.models.SlotSwapStatus; +import com.azure.resourcemanager.appservice.generated.models.UsageState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** SitePatchResource resource specific properties. */ +@Fluent +public final class SitePatchResourcePropertiesInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SitePatchResourcePropertiesInner.class); + + /* + * Current state of the app. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /* + * Hostnames associated with the app. + */ + @JsonProperty(value = "hostNames", access = JsonProperty.Access.WRITE_ONLY) + private List hostNames; + + /* + * Name of the repository site. + */ + @JsonProperty(value = "repositorySiteName", access = JsonProperty.Access.WRITE_ONLY) + private String repositorySiteName; + + /* + * State indicating whether the app has exceeded its quota usage. + * Read-only. + */ + @JsonProperty(value = "usageState", access = JsonProperty.Access.WRITE_ONLY) + private UsageState usageState; + + /* + * true if the app is enabled; otherwise, false. + * Setting this value to false disables the app (takes the app offline). + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Enabled hostnames for the app.Hostnames need to be assigned (see + * HostNames) AND enabled. Otherwise, + * the app is not served on those hostnames. + */ + @JsonProperty(value = "enabledHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List enabledHostNames; + + /* + * Management information availability state for the app. + */ + @JsonProperty(value = "availabilityState", access = JsonProperty.Access.WRITE_ONLY) + private SiteAvailabilityState availabilityState; + + /* + * Hostname SSL states are used to manage the SSL bindings for app's + * hostnames. + */ + @JsonProperty(value = "hostNameSslStates") + private List hostnameSslStates; + + /* + * Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + */ + @JsonProperty(value = "serverFarmId") + private String serverFarmId; + + /* + * true if reserved; otherwise, false. + */ + @JsonProperty(value = "reserved") + private Boolean reserved; + + /* + * Obsolete: Hyper-V sandbox. + */ + @JsonProperty(value = "isXenon") + private Boolean isXenon; + + /* + * Hyper-V sandbox. + */ + @JsonProperty(value = "hyperV") + private Boolean hyperV; + + /* + * Last time the app was modified, in UTC. Read-only. + */ + @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedTimeUtc; + + /* + * Configuration of the app. + */ + @JsonProperty(value = "siteConfig") + private SiteConfigInner siteConfig; + + /* + * Azure Traffic Manager hostnames associated with the app. Read-only. + */ + @JsonProperty(value = "trafficManagerHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List trafficManagerHostNames; + + /* + * true to stop SCM (KUDU) site when the app is stopped; + * otherwise, false. The default is false. + */ + @JsonProperty(value = "scmSiteAlsoStopped") + private Boolean scmSiteAlsoStopped; + + /* + * Specifies which deployment slot this app will swap into. Read-only. + */ + @JsonProperty(value = "targetSwapSlot", access = JsonProperty.Access.WRITE_ONLY) + private String targetSwapSlot; + + /* + * App Service Environment to use for the app. + */ + @JsonProperty(value = "hostingEnvironmentProfile") + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /* + * true to enable client affinity; false to stop + * sending session affinity cookies, which route client requests in the + * same session to the same instance. Default is true. + */ + @JsonProperty(value = "clientAffinityEnabled") + private Boolean clientAffinityEnabled; + + /* + * true to enable client certificate authentication (TLS + * mutual authentication); otherwise, false. Default is + * false. + */ + @JsonProperty(value = "clientCertEnabled") + private Boolean clientCertEnabled; + + /* + * This composes with ClientCertEnabled setting. + * - ClientCertEnabled: false means ClientCert is ignored. + * - ClientCertEnabled: true and ClientCertMode: Required means ClientCert + * is required. + * - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert + * is optional or accepted. + */ + @JsonProperty(value = "clientCertMode") + private ClientCertMode clientCertMode; + + /* + * client certificate authentication comma-separated exclusion paths + */ + @JsonProperty(value = "clientCertExclusionPaths") + private String clientCertExclusionPaths; + + /* + * true to disable the public hostnames of the app; otherwise, + * false. + * If true, the app is only accessible via API management + * process. + */ + @JsonProperty(value = "hostNamesDisabled") + private Boolean hostNamesDisabled; + + /* + * Unique identifier that verifies the custom domains assigned to the app. + * Customer will add this id to a txt record for verification. + */ + @JsonProperty(value = "customDomainVerificationId") + private String customDomainVerificationId; + + /* + * List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted + * with current settings. Read-only. + */ + @JsonProperty(value = "outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private String outboundIpAddresses; + + /* + * List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from all tenants except dataComponent. + * Read-only. + */ + @JsonProperty(value = "possibleOutboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private String possibleOutboundIpAddresses; + + /* + * Size of the function container. + */ + @JsonProperty(value = "containerSize") + private Integer containerSize; + + /* + * Maximum allowed daily memory-time quota (applicable on dynamic apps + * only). + */ + @JsonProperty(value = "dailyMemoryTimeQuota") + private Integer dailyMemoryTimeQuota; + + /* + * App suspended till in case memory-time quota is exceeded. + */ + @JsonProperty(value = "suspendedTill", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime suspendedTill; + + /* + * Maximum number of workers. + * This only applies to Functions container. + */ + @JsonProperty(value = "maxNumberOfWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxNumberOfWorkers; + + /* + * If specified during app creation, the app is cloned from a source app. + */ + @JsonProperty(value = "cloningInfo") + private CloningInfo cloningInfo; + + /* + * Name of the resource group the app belongs to. Read-only. + */ + @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /* + * true if the app is a default container; otherwise, + * false. + */ + @JsonProperty(value = "isDefaultContainer", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultContainer; + + /* + * Default hostname of the app. Read-only. + */ + @JsonProperty(value = "defaultHostName", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostname; + + /* + * Status of the last deployment slot swap operation. + */ + @JsonProperty(value = "slotSwapStatus", access = JsonProperty.Access.WRITE_ONLY) + private SlotSwapStatus slotSwapStatus; + + /* + * HttpsOnly: configures a web site to accept only https requests. Issues + * redirect for + * http requests + */ + @JsonProperty(value = "httpsOnly") + private Boolean httpsOnly; + + /* + * Site redundancy mode + */ + @JsonProperty(value = "redundancyMode") + private RedundancyMode redundancyMode; + + /* + * Specifies an operation id if this site has a pending operation. + */ + @JsonProperty(value = "inProgressOperationId", access = JsonProperty.Access.WRITE_ONLY) + private UUID inProgressOperationId; + + /* + * Checks if Customer provided storage account is required + */ + @JsonProperty(value = "storageAccountRequired") + private Boolean storageAccountRequired; + + /* + * Identity to use for Key Vault Reference authentication. + */ + @JsonProperty(value = "keyVaultReferenceIdentity") + private String keyVaultReferenceIdentity; + + /* + * Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. + * This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + */ + @JsonProperty(value = "virtualNetworkSubnetId") + private String virtualNetworkSubnetId; + + /** + * Get the state property: Current state of the app. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Get the hostNames property: Hostnames associated with the app. + * + * @return the hostNames value. + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Get the repositorySiteName property: Name of the repository site. + * + * @return the repositorySiteName value. + */ + public String repositorySiteName() { + return this.repositorySiteName; + } + + /** + * Get the usageState property: State indicating whether the app has exceeded its quota usage. Read-only. + * + * @return the usageState value. + */ + public UsageState usageState() { + return this.usageState; + } + + /** + * Get the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @param enabled the enabled value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the enabledHostNames property: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) + * AND enabled. Otherwise, the app is not served on those hostnames. + * + * @return the enabledHostNames value. + */ + public List enabledHostNames() { + return this.enabledHostNames; + } + + /** + * Get the availabilityState property: Management information availability state for the app. + * + * @return the availabilityState value. + */ + public SiteAvailabilityState availabilityState() { + return this.availabilityState; + } + + /** + * Get the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostnameSslStates value. + */ + public List hostnameSslStates() { + return this.hostnameSslStates; + } + + /** + * Set the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @param hostnameSslStates the hostnameSslStates value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withHostnameSslStates(List hostnameSslStates) { + this.hostnameSslStates = hostnameSslStates; + return this; + } + + /** + * Get the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value. + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @param reserved the reserved value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get the isXenon property: Obsolete: Hyper-V sandbox. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set the isXenon property: Obsolete: Hyper-V sandbox. + * + * @param isXenon the isXenon value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get the hyperV property: Hyper-V sandbox. + * + * @return the hyperV value. + */ + public Boolean hyperV() { + return this.hyperV; + } + + /** + * Set the hyperV property: Hyper-V sandbox. + * + * @param hyperV the hyperV value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withHyperV(Boolean hyperV) { + this.hyperV = hyperV; + return this; + } + + /** + * Get the lastModifiedTimeUtc property: Last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + + /** + * Get the siteConfig property: Configuration of the app. + * + * @return the siteConfig value. + */ + public SiteConfigInner siteConfig() { + return this.siteConfig; + } + + /** + * Set the siteConfig property: Configuration of the app. + * + * @param siteConfig the siteConfig value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withSiteConfig(SiteConfigInner siteConfig) { + this.siteConfig = siteConfig; + return this; + } + + /** + * Get the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value. + */ + public List trafficManagerHostNames() { + return this.trafficManagerHostNames; + } + + /** + * Get the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value. + */ + public Boolean scmSiteAlsoStopped() { + return this.scmSiteAlsoStopped; + } + + /** + * Set the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @param scmSiteAlsoStopped the scmSiteAlsoStopped value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + this.scmSiteAlsoStopped = scmSiteAlsoStopped; + return this; + } + + /** + * Get the targetSwapSlot property: Specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value. + */ + public String targetSwapSlot() { + return this.targetSwapSlot; + } + + /** + * Get the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withHostingEnvironmentProfile( + HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @return the clientAffinityEnabled value. + */ + public Boolean clientAffinityEnabled() { + return this.clientAffinityEnabled; + } + + /** + * Set the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @param clientAffinityEnabled the clientAffinityEnabled value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withClientAffinityEnabled(Boolean clientAffinityEnabled) { + this.clientAffinityEnabled = clientAffinityEnabled; + return this; + } + + /** + * Get the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @return the clientCertEnabled value. + */ + public Boolean clientCertEnabled() { + return this.clientCertEnabled; + } + + /** + * Set the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @param clientCertEnabled the clientCertEnabled value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withClientCertEnabled(Boolean clientCertEnabled) { + this.clientCertEnabled = clientCertEnabled; + return this; + } + + /** + * Get the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @return the clientCertMode value. + */ + public ClientCertMode clientCertMode() { + return this.clientCertMode; + } + + /** + * Set the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @param clientCertMode the clientCertMode value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withClientCertMode(ClientCertMode clientCertMode) { + this.clientCertMode = clientCertMode; + return this; + } + + /** + * Get the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value. + */ + public String clientCertExclusionPaths() { + return this.clientCertExclusionPaths; + } + + /** + * Set the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @param clientCertExclusionPaths the clientCertExclusionPaths value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withClientCertExclusionPaths(String clientCertExclusionPaths) { + this.clientCertExclusionPaths = clientCertExclusionPaths; + return this; + } + + /** + * Get the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @return the hostNamesDisabled value. + */ + public Boolean hostNamesDisabled() { + return this.hostNamesDisabled; + } + + /** + * Set the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @param hostNamesDisabled the hostNamesDisabled value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withHostNamesDisabled(Boolean hostNamesDisabled) { + this.hostNamesDisabled = hostNamesDisabled; + return this; + } + + /** + * Get the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @return the customDomainVerificationId value. + */ + public String customDomainVerificationId() { + return this.customDomainVerificationId; + } + + /** + * Set the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @param customDomainVerificationId the customDomainVerificationId value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withCustomDomainVerificationId(String customDomainVerificationId) { + this.customDomainVerificationId = customDomainVerificationId; + return this; + } + + /** + * Get the outboundIpAddresses property: List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + * + * @return the outboundIpAddresses value. + */ + public String outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Get the possibleOutboundIpAddresses property: List of IP addresses that the app uses for outbound connections + * (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value. + */ + public String possibleOutboundIpAddresses() { + return this.possibleOutboundIpAddresses; + } + + /** + * Get the containerSize property: Size of the function container. + * + * @return the containerSize value. + */ + public Integer containerSize() { + return this.containerSize; + } + + /** + * Set the containerSize property: Size of the function container. + * + * @param containerSize the containerSize value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withContainerSize(Integer containerSize) { + this.containerSize = containerSize; + return this; + } + + /** + * Get the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @return the dailyMemoryTimeQuota value. + */ + public Integer dailyMemoryTimeQuota() { + return this.dailyMemoryTimeQuota; + } + + /** + * Set the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @param dailyMemoryTimeQuota the dailyMemoryTimeQuota value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + this.dailyMemoryTimeQuota = dailyMemoryTimeQuota; + return this; + } + + /** + * Get the suspendedTill property: App suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value. + */ + public OffsetDateTime suspendedTill() { + return this.suspendedTill; + } + + /** + * Get the maxNumberOfWorkers property: Maximum number of workers. This only applies to Functions container. + * + * @return the maxNumberOfWorkers value. + */ + public Integer maxNumberOfWorkers() { + return this.maxNumberOfWorkers; + } + + /** + * Get the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value. + */ + public CloningInfo cloningInfo() { + return this.cloningInfo; + } + + /** + * Set the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @param cloningInfo the cloningInfo value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withCloningInfo(CloningInfo cloningInfo) { + this.cloningInfo = cloningInfo; + return this; + } + + /** + * Get the resourceGroup property: Name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the isDefaultContainer property: <code>true</code> if the app is a default container; otherwise, + * <code>false</code>. + * + * @return the isDefaultContainer value. + */ + public Boolean isDefaultContainer() { + return this.isDefaultContainer; + } + + /** + * Get the defaultHostname property: Default hostname of the app. Read-only. + * + * @return the defaultHostname value. + */ + public String defaultHostname() { + return this.defaultHostname; + } + + /** + * Get the slotSwapStatus property: Status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value. + */ + public SlotSwapStatus slotSwapStatus() { + return this.slotSwapStatus; + } + + /** + * Get the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @return the httpsOnly value. + */ + public Boolean httpsOnly() { + return this.httpsOnly; + } + + /** + * Set the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @param httpsOnly the httpsOnly value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withHttpsOnly(Boolean httpsOnly) { + this.httpsOnly = httpsOnly; + return this; + } + + /** + * Get the redundancyMode property: Site redundancy mode. + * + * @return the redundancyMode value. + */ + public RedundancyMode redundancyMode() { + return this.redundancyMode; + } + + /** + * Set the redundancyMode property: Site redundancy mode. + * + * @param redundancyMode the redundancyMode value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withRedundancyMode(RedundancyMode redundancyMode) { + this.redundancyMode = redundancyMode; + return this; + } + + /** + * Get the inProgressOperationId property: Specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value. + */ + public UUID inProgressOperationId() { + return this.inProgressOperationId; + } + + /** + * Get the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @return the storageAccountRequired value. + */ + public Boolean storageAccountRequired() { + return this.storageAccountRequired; + } + + /** + * Set the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @param storageAccountRequired the storageAccountRequired value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withStorageAccountRequired(Boolean storageAccountRequired) { + this.storageAccountRequired = storageAccountRequired; + return this; + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.keyVaultReferenceIdentity; + } + + /** + * Set the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @param keyVaultReferenceIdentity the keyVaultReferenceIdentity value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity) { + this.keyVaultReferenceIdentity = keyVaultReferenceIdentity; + return this; + } + + /** + * Get the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkSubnetId value. + */ + public String virtualNetworkSubnetId() { + return this.virtualNetworkSubnetId; + } + + /** + * Set the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param virtualNetworkSubnetId the virtualNetworkSubnetId value to set. + * @return the SitePatchResourcePropertiesInner object itself. + */ + public SitePatchResourcePropertiesInner withVirtualNetworkSubnetId(String virtualNetworkSubnetId) { + this.virtualNetworkSubnetId = virtualNetworkSubnetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hostnameSslStates() != null) { + hostnameSslStates().forEach(e -> e.validate()); + } + if (siteConfig() != null) { + siteConfig().validate(); + } + if (hostingEnvironmentProfile() != null) { + hostingEnvironmentProfile().validate(); + } + if (cloningInfo() != null) { + cloningInfo().validate(); + } + if (slotSwapStatus() != null) { + slotSwapStatus().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePhpErrorLogFlagInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePhpErrorLogFlagInner.java new file mode 100644 index 0000000000000..60c2ce49abe93 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePhpErrorLogFlagInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Used for getting PHP error logging flag. */ +@Fluent +public final class SitePhpErrorLogFlagInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SitePhpErrorLogFlagInner.class); + + /* + * SitePhpErrorLogFlag resource specific properties + */ + @JsonProperty(value = "properties") + private SitePhpErrorLogFlagProperties innerProperties; + + /** + * Get the innerProperties property: SitePhpErrorLogFlag resource specific properties. + * + * @return the innerProperties value. + */ + private SitePhpErrorLogFlagProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SitePhpErrorLogFlagInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the localLogErrors property: Local log_errors setting. + * + * @return the localLogErrors value. + */ + public String localLogErrors() { + return this.innerProperties() == null ? null : this.innerProperties().localLogErrors(); + } + + /** + * Set the localLogErrors property: Local log_errors setting. + * + * @param localLogErrors the localLogErrors value to set. + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withLocalLogErrors(String localLogErrors) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePhpErrorLogFlagProperties(); + } + this.innerProperties().withLocalLogErrors(localLogErrors); + return this; + } + + /** + * Get the masterLogErrors property: Master log_errors setting. + * + * @return the masterLogErrors value. + */ + public String masterLogErrors() { + return this.innerProperties() == null ? null : this.innerProperties().masterLogErrors(); + } + + /** + * Set the masterLogErrors property: Master log_errors setting. + * + * @param masterLogErrors the masterLogErrors value to set. + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withMasterLogErrors(String masterLogErrors) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePhpErrorLogFlagProperties(); + } + this.innerProperties().withMasterLogErrors(masterLogErrors); + return this; + } + + /** + * Get the localLogErrorsMaxLength property: Local log_errors_max_len setting. + * + * @return the localLogErrorsMaxLength value. + */ + public String localLogErrorsMaxLength() { + return this.innerProperties() == null ? null : this.innerProperties().localLogErrorsMaxLength(); + } + + /** + * Set the localLogErrorsMaxLength property: Local log_errors_max_len setting. + * + * @param localLogErrorsMaxLength the localLogErrorsMaxLength value to set. + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withLocalLogErrorsMaxLength(String localLogErrorsMaxLength) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePhpErrorLogFlagProperties(); + } + this.innerProperties().withLocalLogErrorsMaxLength(localLogErrorsMaxLength); + return this; + } + + /** + * Get the masterLogErrorsMaxLength property: Master log_errors_max_len setting. + * + * @return the masterLogErrorsMaxLength value. + */ + public String masterLogErrorsMaxLength() { + return this.innerProperties() == null ? null : this.innerProperties().masterLogErrorsMaxLength(); + } + + /** + * Set the masterLogErrorsMaxLength property: Master log_errors_max_len setting. + * + * @param masterLogErrorsMaxLength the masterLogErrorsMaxLength value to set. + * @return the SitePhpErrorLogFlagInner object itself. + */ + public SitePhpErrorLogFlagInner withMasterLogErrorsMaxLength(String masterLogErrorsMaxLength) { + if (this.innerProperties() == null) { + this.innerProperties = new SitePhpErrorLogFlagProperties(); + } + this.innerProperties().withMasterLogErrorsMaxLength(masterLogErrorsMaxLength); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePhpErrorLogFlagProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePhpErrorLogFlagProperties.java new file mode 100644 index 0000000000000..e3e040e07b2e3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePhpErrorLogFlagProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SitePhpErrorLogFlag resource specific properties. */ +@Fluent +public final class SitePhpErrorLogFlagProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SitePhpErrorLogFlagProperties.class); + + /* + * Local log_errors setting. + */ + @JsonProperty(value = "localLogErrors") + private String localLogErrors; + + /* + * Master log_errors setting. + */ + @JsonProperty(value = "masterLogErrors") + private String masterLogErrors; + + /* + * Local log_errors_max_len setting. + */ + @JsonProperty(value = "localLogErrorsMaxLength") + private String localLogErrorsMaxLength; + + /* + * Master log_errors_max_len setting. + */ + @JsonProperty(value = "masterLogErrorsMaxLength") + private String masterLogErrorsMaxLength; + + /** + * Get the localLogErrors property: Local log_errors setting. + * + * @return the localLogErrors value. + */ + public String localLogErrors() { + return this.localLogErrors; + } + + /** + * Set the localLogErrors property: Local log_errors setting. + * + * @param localLogErrors the localLogErrors value to set. + * @return the SitePhpErrorLogFlagProperties object itself. + */ + public SitePhpErrorLogFlagProperties withLocalLogErrors(String localLogErrors) { + this.localLogErrors = localLogErrors; + return this; + } + + /** + * Get the masterLogErrors property: Master log_errors setting. + * + * @return the masterLogErrors value. + */ + public String masterLogErrors() { + return this.masterLogErrors; + } + + /** + * Set the masterLogErrors property: Master log_errors setting. + * + * @param masterLogErrors the masterLogErrors value to set. + * @return the SitePhpErrorLogFlagProperties object itself. + */ + public SitePhpErrorLogFlagProperties withMasterLogErrors(String masterLogErrors) { + this.masterLogErrors = masterLogErrors; + return this; + } + + /** + * Get the localLogErrorsMaxLength property: Local log_errors_max_len setting. + * + * @return the localLogErrorsMaxLength value. + */ + public String localLogErrorsMaxLength() { + return this.localLogErrorsMaxLength; + } + + /** + * Set the localLogErrorsMaxLength property: Local log_errors_max_len setting. + * + * @param localLogErrorsMaxLength the localLogErrorsMaxLength value to set. + * @return the SitePhpErrorLogFlagProperties object itself. + */ + public SitePhpErrorLogFlagProperties withLocalLogErrorsMaxLength(String localLogErrorsMaxLength) { + this.localLogErrorsMaxLength = localLogErrorsMaxLength; + return this; + } + + /** + * Get the masterLogErrorsMaxLength property: Master log_errors_max_len setting. + * + * @return the masterLogErrorsMaxLength value. + */ + public String masterLogErrorsMaxLength() { + return this.masterLogErrorsMaxLength; + } + + /** + * Set the masterLogErrorsMaxLength property: Master log_errors_max_len setting. + * + * @param masterLogErrorsMaxLength the masterLogErrorsMaxLength value to set. + * @return the SitePhpErrorLogFlagProperties object itself. + */ + public SitePhpErrorLogFlagProperties withMasterLogErrorsMaxLength(String masterLogErrorsMaxLength) { + this.masterLogErrorsMaxLength = masterLogErrorsMaxLength; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePropertiesInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePropertiesInner.java new file mode 100644 index 0000000000000..5ecce2542231b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SitePropertiesInner.java @@ -0,0 +1,987 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ClientCertMode; +import com.azure.resourcemanager.appservice.generated.models.CloningInfo; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.HostnameSslState; +import com.azure.resourcemanager.appservice.generated.models.RedundancyMode; +import com.azure.resourcemanager.appservice.generated.models.SiteAvailabilityState; +import com.azure.resourcemanager.appservice.generated.models.SlotSwapStatus; +import com.azure.resourcemanager.appservice.generated.models.UsageState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** Site resource specific properties. */ +@Fluent +public final class SitePropertiesInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SitePropertiesInner.class); + + /* + * Current state of the app. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private String state; + + /* + * Hostnames associated with the app. + */ + @JsonProperty(value = "hostNames", access = JsonProperty.Access.WRITE_ONLY) + private List hostNames; + + /* + * Name of the repository site. + */ + @JsonProperty(value = "repositorySiteName", access = JsonProperty.Access.WRITE_ONLY) + private String repositorySiteName; + + /* + * State indicating whether the app has exceeded its quota usage. + * Read-only. + */ + @JsonProperty(value = "usageState", access = JsonProperty.Access.WRITE_ONLY) + private UsageState usageState; + + /* + * true if the app is enabled; otherwise, false. + * Setting this value to false disables the app (takes the app offline). + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Enabled hostnames for the app.Hostnames need to be assigned (see + * HostNames) AND enabled. Otherwise, + * the app is not served on those hostnames. + */ + @JsonProperty(value = "enabledHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List enabledHostNames; + + /* + * Management information availability state for the app. + */ + @JsonProperty(value = "availabilityState", access = JsonProperty.Access.WRITE_ONLY) + private SiteAvailabilityState availabilityState; + + /* + * Hostname SSL states are used to manage the SSL bindings for app's + * hostnames. + */ + @JsonProperty(value = "hostNameSslStates") + private List hostnameSslStates; + + /* + * Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + */ + @JsonProperty(value = "serverFarmId") + private String serverFarmId; + + /* + * true if reserved; otherwise, false. + */ + @JsonProperty(value = "reserved") + private Boolean reserved; + + /* + * Obsolete: Hyper-V sandbox. + */ + @JsonProperty(value = "isXenon") + private Boolean isXenon; + + /* + * Hyper-V sandbox. + */ + @JsonProperty(value = "hyperV") + private Boolean hyperV; + + /* + * Last time the app was modified, in UTC. Read-only. + */ + @JsonProperty(value = "lastModifiedTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedTimeUtc; + + /* + * Configuration of the app. + */ + @JsonProperty(value = "siteConfig") + private SiteConfigInner siteConfig; + + /* + * Azure Traffic Manager hostnames associated with the app. Read-only. + */ + @JsonProperty(value = "trafficManagerHostNames", access = JsonProperty.Access.WRITE_ONLY) + private List trafficManagerHostNames; + + /* + * true to stop SCM (KUDU) site when the app is stopped; + * otherwise, false. The default is false. + */ + @JsonProperty(value = "scmSiteAlsoStopped") + private Boolean scmSiteAlsoStopped; + + /* + * Specifies which deployment slot this app will swap into. Read-only. + */ + @JsonProperty(value = "targetSwapSlot", access = JsonProperty.Access.WRITE_ONLY) + private String targetSwapSlot; + + /* + * App Service Environment to use for the app. + */ + @JsonProperty(value = "hostingEnvironmentProfile") + private HostingEnvironmentProfile hostingEnvironmentProfile; + + /* + * true to enable client affinity; false to stop + * sending session affinity cookies, which route client requests in the + * same session to the same instance. Default is true. + */ + @JsonProperty(value = "clientAffinityEnabled") + private Boolean clientAffinityEnabled; + + /* + * true to enable client certificate authentication (TLS + * mutual authentication); otherwise, false. Default is + * false. + */ + @JsonProperty(value = "clientCertEnabled") + private Boolean clientCertEnabled; + + /* + * This composes with ClientCertEnabled setting. + * - ClientCertEnabled: false means ClientCert is ignored. + * - ClientCertEnabled: true and ClientCertMode: Required means ClientCert + * is required. + * - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert + * is optional or accepted. + */ + @JsonProperty(value = "clientCertMode") + private ClientCertMode clientCertMode; + + /* + * client certificate authentication comma-separated exclusion paths + */ + @JsonProperty(value = "clientCertExclusionPaths") + private String clientCertExclusionPaths; + + /* + * true to disable the public hostnames of the app; otherwise, + * false. + * If true, the app is only accessible via API management + * process. + */ + @JsonProperty(value = "hostNamesDisabled") + private Boolean hostNamesDisabled; + + /* + * Unique identifier that verifies the custom domains assigned to the app. + * Customer will add this id to a txt record for verification. + */ + @JsonProperty(value = "customDomainVerificationId") + private String customDomainVerificationId; + + /* + * List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted + * with current settings. Read-only. + */ + @JsonProperty(value = "outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private String outboundIpAddresses; + + /* + * List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from all tenants except dataComponent. + * Read-only. + */ + @JsonProperty(value = "possibleOutboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) + private String possibleOutboundIpAddresses; + + /* + * Size of the function container. + */ + @JsonProperty(value = "containerSize") + private Integer containerSize; + + /* + * Maximum allowed daily memory-time quota (applicable on dynamic apps + * only). + */ + @JsonProperty(value = "dailyMemoryTimeQuota") + private Integer dailyMemoryTimeQuota; + + /* + * App suspended till in case memory-time quota is exceeded. + */ + @JsonProperty(value = "suspendedTill", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime suspendedTill; + + /* + * Maximum number of workers. + * This only applies to Functions container. + */ + @JsonProperty(value = "maxNumberOfWorkers", access = JsonProperty.Access.WRITE_ONLY) + private Integer maxNumberOfWorkers; + + /* + * If specified during app creation, the app is cloned from a source app. + */ + @JsonProperty(value = "cloningInfo") + private CloningInfo cloningInfo; + + /* + * Name of the resource group the app belongs to. Read-only. + */ + @JsonProperty(value = "resourceGroup", access = JsonProperty.Access.WRITE_ONLY) + private String resourceGroup; + + /* + * true if the app is a default container; otherwise, + * false. + */ + @JsonProperty(value = "isDefaultContainer", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultContainer; + + /* + * Default hostname of the app. Read-only. + */ + @JsonProperty(value = "defaultHostName", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostname; + + /* + * Status of the last deployment slot swap operation. + */ + @JsonProperty(value = "slotSwapStatus", access = JsonProperty.Access.WRITE_ONLY) + private SlotSwapStatus slotSwapStatus; + + /* + * HttpsOnly: configures a web site to accept only https requests. Issues + * redirect for + * http requests + */ + @JsonProperty(value = "httpsOnly") + private Boolean httpsOnly; + + /* + * Site redundancy mode + */ + @JsonProperty(value = "redundancyMode") + private RedundancyMode redundancyMode; + + /* + * Specifies an operation id if this site has a pending operation. + */ + @JsonProperty(value = "inProgressOperationId", access = JsonProperty.Access.WRITE_ONLY) + private UUID inProgressOperationId; + + /* + * Checks if Customer provided storage account is required + */ + @JsonProperty(value = "storageAccountRequired") + private Boolean storageAccountRequired; + + /* + * Identity to use for Key Vault Reference authentication. + */ + @JsonProperty(value = "keyVaultReferenceIdentity") + private String keyVaultReferenceIdentity; + + /* + * Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. + * This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} + */ + @JsonProperty(value = "virtualNetworkSubnetId") + private String virtualNetworkSubnetId; + + /** + * Get the state property: Current state of the app. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Get the hostNames property: Hostnames associated with the app. + * + * @return the hostNames value. + */ + public List hostNames() { + return this.hostNames; + } + + /** + * Get the repositorySiteName property: Name of the repository site. + * + * @return the repositorySiteName value. + */ + public String repositorySiteName() { + return this.repositorySiteName; + } + + /** + * Get the usageState property: State indicating whether the app has exceeded its quota usage. Read-only. + * + * @return the usageState value. + */ + public UsageState usageState() { + return this.usageState; + } + + /** + * Get the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @param enabled the enabled value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the enabledHostNames property: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) + * AND enabled. Otherwise, the app is not served on those hostnames. + * + * @return the enabledHostNames value. + */ + public List enabledHostNames() { + return this.enabledHostNames; + } + + /** + * Get the availabilityState property: Management information availability state for the app. + * + * @return the availabilityState value. + */ + public SiteAvailabilityState availabilityState() { + return this.availabilityState; + } + + /** + * Get the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostnameSslStates value. + */ + public List hostnameSslStates() { + return this.hostnameSslStates; + } + + /** + * Set the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @param hostnameSslStates the hostnameSslStates value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withHostnameSslStates(List hostnameSslStates) { + this.hostnameSslStates = hostnameSslStates; + return this; + } + + /** + * Get the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value. + */ + public Boolean reserved() { + return this.reserved; + } + + /** + * Set the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @param reserved the reserved value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withReserved(Boolean reserved) { + this.reserved = reserved; + return this; + } + + /** + * Get the isXenon property: Obsolete: Hyper-V sandbox. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set the isXenon property: Obsolete: Hyper-V sandbox. + * + * @param isXenon the isXenon value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get the hyperV property: Hyper-V sandbox. + * + * @return the hyperV value. + */ + public Boolean hyperV() { + return this.hyperV; + } + + /** + * Set the hyperV property: Hyper-V sandbox. + * + * @param hyperV the hyperV value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withHyperV(Boolean hyperV) { + this.hyperV = hyperV; + return this; + } + + /** + * Get the lastModifiedTimeUtc property: Last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value. + */ + public OffsetDateTime lastModifiedTimeUtc() { + return this.lastModifiedTimeUtc; + } + + /** + * Get the siteConfig property: Configuration of the app. + * + * @return the siteConfig value. + */ + public SiteConfigInner siteConfig() { + return this.siteConfig; + } + + /** + * Set the siteConfig property: Configuration of the app. + * + * @param siteConfig the siteConfig value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withSiteConfig(SiteConfigInner siteConfig) { + this.siteConfig = siteConfig; + return this; + } + + /** + * Get the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value. + */ + public List trafficManagerHostNames() { + return this.trafficManagerHostNames; + } + + /** + * Get the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value. + */ + public Boolean scmSiteAlsoStopped() { + return this.scmSiteAlsoStopped; + } + + /** + * Set the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @param scmSiteAlsoStopped the scmSiteAlsoStopped value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + this.scmSiteAlsoStopped = scmSiteAlsoStopped; + return this; + } + + /** + * Get the targetSwapSlot property: Specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value. + */ + public String targetSwapSlot() { + return this.targetSwapSlot; + } + + /** + * Get the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.hostingEnvironmentProfile; + } + + /** + * Set the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.hostingEnvironmentProfile = hostingEnvironmentProfile; + return this; + } + + /** + * Get the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @return the clientAffinityEnabled value. + */ + public Boolean clientAffinityEnabled() { + return this.clientAffinityEnabled; + } + + /** + * Set the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @param clientAffinityEnabled the clientAffinityEnabled value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withClientAffinityEnabled(Boolean clientAffinityEnabled) { + this.clientAffinityEnabled = clientAffinityEnabled; + return this; + } + + /** + * Get the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @return the clientCertEnabled value. + */ + public Boolean clientCertEnabled() { + return this.clientCertEnabled; + } + + /** + * Set the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @param clientCertEnabled the clientCertEnabled value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withClientCertEnabled(Boolean clientCertEnabled) { + this.clientCertEnabled = clientCertEnabled; + return this; + } + + /** + * Get the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @return the clientCertMode value. + */ + public ClientCertMode clientCertMode() { + return this.clientCertMode; + } + + /** + * Set the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @param clientCertMode the clientCertMode value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withClientCertMode(ClientCertMode clientCertMode) { + this.clientCertMode = clientCertMode; + return this; + } + + /** + * Get the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value. + */ + public String clientCertExclusionPaths() { + return this.clientCertExclusionPaths; + } + + /** + * Set the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @param clientCertExclusionPaths the clientCertExclusionPaths value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withClientCertExclusionPaths(String clientCertExclusionPaths) { + this.clientCertExclusionPaths = clientCertExclusionPaths; + return this; + } + + /** + * Get the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @return the hostNamesDisabled value. + */ + public Boolean hostNamesDisabled() { + return this.hostNamesDisabled; + } + + /** + * Set the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @param hostNamesDisabled the hostNamesDisabled value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withHostNamesDisabled(Boolean hostNamesDisabled) { + this.hostNamesDisabled = hostNamesDisabled; + return this; + } + + /** + * Get the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @return the customDomainVerificationId value. + */ + public String customDomainVerificationId() { + return this.customDomainVerificationId; + } + + /** + * Set the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @param customDomainVerificationId the customDomainVerificationId value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withCustomDomainVerificationId(String customDomainVerificationId) { + this.customDomainVerificationId = customDomainVerificationId; + return this; + } + + /** + * Get the outboundIpAddresses property: List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + * + * @return the outboundIpAddresses value. + */ + public String outboundIpAddresses() { + return this.outboundIpAddresses; + } + + /** + * Get the possibleOutboundIpAddresses property: List of IP addresses that the app uses for outbound connections + * (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value. + */ + public String possibleOutboundIpAddresses() { + return this.possibleOutboundIpAddresses; + } + + /** + * Get the containerSize property: Size of the function container. + * + * @return the containerSize value. + */ + public Integer containerSize() { + return this.containerSize; + } + + /** + * Set the containerSize property: Size of the function container. + * + * @param containerSize the containerSize value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withContainerSize(Integer containerSize) { + this.containerSize = containerSize; + return this; + } + + /** + * Get the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @return the dailyMemoryTimeQuota value. + */ + public Integer dailyMemoryTimeQuota() { + return this.dailyMemoryTimeQuota; + } + + /** + * Set the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * + * @param dailyMemoryTimeQuota the dailyMemoryTimeQuota value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + this.dailyMemoryTimeQuota = dailyMemoryTimeQuota; + return this; + } + + /** + * Get the suspendedTill property: App suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value. + */ + public OffsetDateTime suspendedTill() { + return this.suspendedTill; + } + + /** + * Get the maxNumberOfWorkers property: Maximum number of workers. This only applies to Functions container. + * + * @return the maxNumberOfWorkers value. + */ + public Integer maxNumberOfWorkers() { + return this.maxNumberOfWorkers; + } + + /** + * Get the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value. + */ + public CloningInfo cloningInfo() { + return this.cloningInfo; + } + + /** + * Set the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @param cloningInfo the cloningInfo value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withCloningInfo(CloningInfo cloningInfo) { + this.cloningInfo = cloningInfo; + return this; + } + + /** + * Get the resourceGroup property: Name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.resourceGroup; + } + + /** + * Get the isDefaultContainer property: <code>true</code> if the app is a default container; otherwise, + * <code>false</code>. + * + * @return the isDefaultContainer value. + */ + public Boolean isDefaultContainer() { + return this.isDefaultContainer; + } + + /** + * Get the defaultHostname property: Default hostname of the app. Read-only. + * + * @return the defaultHostname value. + */ + public String defaultHostname() { + return this.defaultHostname; + } + + /** + * Get the slotSwapStatus property: Status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value. + */ + public SlotSwapStatus slotSwapStatus() { + return this.slotSwapStatus; + } + + /** + * Get the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @return the httpsOnly value. + */ + public Boolean httpsOnly() { + return this.httpsOnly; + } + + /** + * Set the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @param httpsOnly the httpsOnly value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withHttpsOnly(Boolean httpsOnly) { + this.httpsOnly = httpsOnly; + return this; + } + + /** + * Get the redundancyMode property: Site redundancy mode. + * + * @return the redundancyMode value. + */ + public RedundancyMode redundancyMode() { + return this.redundancyMode; + } + + /** + * Set the redundancyMode property: Site redundancy mode. + * + * @param redundancyMode the redundancyMode value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withRedundancyMode(RedundancyMode redundancyMode) { + this.redundancyMode = redundancyMode; + return this; + } + + /** + * Get the inProgressOperationId property: Specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value. + */ + public UUID inProgressOperationId() { + return this.inProgressOperationId; + } + + /** + * Get the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @return the storageAccountRequired value. + */ + public Boolean storageAccountRequired() { + return this.storageAccountRequired; + } + + /** + * Set the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @param storageAccountRequired the storageAccountRequired value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withStorageAccountRequired(Boolean storageAccountRequired) { + this.storageAccountRequired = storageAccountRequired; + return this; + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.keyVaultReferenceIdentity; + } + + /** + * Set the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @param keyVaultReferenceIdentity the keyVaultReferenceIdentity value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity) { + this.keyVaultReferenceIdentity = keyVaultReferenceIdentity; + return this; + } + + /** + * Get the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkSubnetId value. + */ + public String virtualNetworkSubnetId() { + return this.virtualNetworkSubnetId; + } + + /** + * Set the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be joined + * by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param virtualNetworkSubnetId the virtualNetworkSubnetId value to set. + * @return the SitePropertiesInner object itself. + */ + public SitePropertiesInner withVirtualNetworkSubnetId(String virtualNetworkSubnetId) { + this.virtualNetworkSubnetId = virtualNetworkSubnetId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (hostnameSslStates() != null) { + hostnameSslStates().forEach(e -> e.validate()); + } + if (siteConfig() != null) { + siteConfig().validate(); + } + if (hostingEnvironmentProfile() != null) { + hostingEnvironmentProfile().validate(); + } + if (cloningInfo() != null) { + cloningInfo().validate(); + } + if (slotSwapStatus() != null) { + slotSwapStatus().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSealInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSealInner.java new file mode 100644 index 0000000000000..df331e0a98734 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSealInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Site seal. */ +@Fluent +public final class SiteSealInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteSealInner.class); + + /* + * HTML snippet + */ + @JsonProperty(value = "html", required = true) + private String html; + + /** + * Get the html property: HTML snippet. + * + * @return the html value. + */ + public String html() { + return this.html; + } + + /** + * Set the html property: HTML snippet. + * + * @param html the html value to set. + * @return the SiteSealInner object itself. + */ + public SiteSealInner withHtml(String html) { + this.html = html; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (html() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property html in model SiteSealInner")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSourceControlInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSourceControlInner.java new file mode 100644 index 0000000000000..9b38f00abe780 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSourceControlInner.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.GitHubActionConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Source control configuration for an app. */ +@Fluent +public final class SiteSourceControlInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteSourceControlInner.class); + + /* + * SiteSourceControl resource specific properties + */ + @JsonProperty(value = "properties") + private SiteSourceControlProperties innerProperties; + + /** + * Get the innerProperties property: SiteSourceControl resource specific properties. + * + * @return the innerProperties value. + */ + private SiteSourceControlProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SiteSourceControlInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the repoUrl property: Repository or source control URL. + * + * @return the repoUrl value. + */ + public String repoUrl() { + return this.innerProperties() == null ? null : this.innerProperties().repoUrl(); + } + + /** + * Set the repoUrl property: Repository or source control URL. + * + * @param repoUrl the repoUrl value to set. + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withRepoUrl(String repoUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteSourceControlProperties(); + } + this.innerProperties().withRepoUrl(repoUrl); + return this; + } + + /** + * Get the branch property: Name of branch to use for deployment. + * + * @return the branch value. + */ + public String branch() { + return this.innerProperties() == null ? null : this.innerProperties().branch(); + } + + /** + * Set the branch property: Name of branch to use for deployment. + * + * @param branch the branch value to set. + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withBranch(String branch) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteSourceControlProperties(); + } + this.innerProperties().withBranch(branch); + return this; + } + + /** + * Get the isManualIntegration property: <code>true</code> to limit to manual integration; + * <code>false</code> to enable continuous integration (which configures webhooks into online repos like + * GitHub). + * + * @return the isManualIntegration value. + */ + public Boolean isManualIntegration() { + return this.innerProperties() == null ? null : this.innerProperties().isManualIntegration(); + } + + /** + * Set the isManualIntegration property: <code>true</code> to limit to manual integration; + * <code>false</code> to enable continuous integration (which configures webhooks into online repos like + * GitHub). + * + * @param isManualIntegration the isManualIntegration value to set. + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withIsManualIntegration(Boolean isManualIntegration) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteSourceControlProperties(); + } + this.innerProperties().withIsManualIntegration(isManualIntegration); + return this; + } + + /** + * Get the isGitHubAction property: <code>true</code> if this is deployed via GitHub action. + * + * @return the isGitHubAction value. + */ + public Boolean isGitHubAction() { + return this.innerProperties() == null ? null : this.innerProperties().isGitHubAction(); + } + + /** + * Set the isGitHubAction property: <code>true</code> if this is deployed via GitHub action. + * + * @param isGitHubAction the isGitHubAction value to set. + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withIsGitHubAction(Boolean isGitHubAction) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteSourceControlProperties(); + } + this.innerProperties().withIsGitHubAction(isGitHubAction); + return this; + } + + /** + * Get the deploymentRollbackEnabled property: <code>true</code> to enable deployment rollback; + * otherwise, <code>false</code>. + * + * @return the deploymentRollbackEnabled value. + */ + public Boolean deploymentRollbackEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentRollbackEnabled(); + } + + /** + * Set the deploymentRollbackEnabled property: <code>true</code> to enable deployment rollback; + * otherwise, <code>false</code>. + * + * @param deploymentRollbackEnabled the deploymentRollbackEnabled value to set. + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withDeploymentRollbackEnabled(Boolean deploymentRollbackEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteSourceControlProperties(); + } + this.innerProperties().withDeploymentRollbackEnabled(deploymentRollbackEnabled); + return this; + } + + /** + * Get the isMercurial property: <code>true</code> for a Mercurial repository; + * <code>false</code> for a Git repository. + * + * @return the isMercurial value. + */ + public Boolean isMercurial() { + return this.innerProperties() == null ? null : this.innerProperties().isMercurial(); + } + + /** + * Set the isMercurial property: <code>true</code> for a Mercurial repository; + * <code>false</code> for a Git repository. + * + * @param isMercurial the isMercurial value to set. + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withIsMercurial(Boolean isMercurial) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteSourceControlProperties(); + } + this.innerProperties().withIsMercurial(isMercurial); + return this; + } + + /** + * Get the gitHubActionConfiguration property: If GitHub Action is selected, than the associated configuration. + * + * @return the gitHubActionConfiguration value. + */ + public GitHubActionConfiguration gitHubActionConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().gitHubActionConfiguration(); + } + + /** + * Set the gitHubActionConfiguration property: If GitHub Action is selected, than the associated configuration. + * + * @param gitHubActionConfiguration the gitHubActionConfiguration value to set. + * @return the SiteSourceControlInner object itself. + */ + public SiteSourceControlInner withGitHubActionConfiguration(GitHubActionConfiguration gitHubActionConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SiteSourceControlProperties(); + } + this.innerProperties().withGitHubActionConfiguration(gitHubActionConfiguration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSourceControlProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSourceControlProperties.java new file mode 100644 index 0000000000000..2e7e8314cd9ce --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SiteSourceControlProperties.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.GitHubActionConfiguration; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SiteSourceControl resource specific properties. */ +@Fluent +public final class SiteSourceControlProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteSourceControlProperties.class); + + /* + * Repository or source control URL. + */ + @JsonProperty(value = "repoUrl") + private String repoUrl; + + /* + * Name of branch to use for deployment. + */ + @JsonProperty(value = "branch") + private String branch; + + /* + * true to limit to manual integration; false to + * enable continuous integration (which configures webhooks into online + * repos like GitHub). + */ + @JsonProperty(value = "isManualIntegration") + private Boolean isManualIntegration; + + /* + * true if this is deployed via GitHub action. + */ + @JsonProperty(value = "isGitHubAction") + private Boolean isGitHubAction; + + /* + * true to enable deployment rollback; otherwise, + * false. + */ + @JsonProperty(value = "deploymentRollbackEnabled") + private Boolean deploymentRollbackEnabled; + + /* + * true for a Mercurial repository; false for a + * Git repository. + */ + @JsonProperty(value = "isMercurial") + private Boolean isMercurial; + + /* + * If GitHub Action is selected, than the associated configuration. + */ + @JsonProperty(value = "gitHubActionConfiguration") + private GitHubActionConfiguration gitHubActionConfiguration; + + /** + * Get the repoUrl property: Repository or source control URL. + * + * @return the repoUrl value. + */ + public String repoUrl() { + return this.repoUrl; + } + + /** + * Set the repoUrl property: Repository or source control URL. + * + * @param repoUrl the repoUrl value to set. + * @return the SiteSourceControlProperties object itself. + */ + public SiteSourceControlProperties withRepoUrl(String repoUrl) { + this.repoUrl = repoUrl; + return this; + } + + /** + * Get the branch property: Name of branch to use for deployment. + * + * @return the branch value. + */ + public String branch() { + return this.branch; + } + + /** + * Set the branch property: Name of branch to use for deployment. + * + * @param branch the branch value to set. + * @return the SiteSourceControlProperties object itself. + */ + public SiteSourceControlProperties withBranch(String branch) { + this.branch = branch; + return this; + } + + /** + * Get the isManualIntegration property: <code>true</code> to limit to manual integration; + * <code>false</code> to enable continuous integration (which configures webhooks into online repos like + * GitHub). + * + * @return the isManualIntegration value. + */ + public Boolean isManualIntegration() { + return this.isManualIntegration; + } + + /** + * Set the isManualIntegration property: <code>true</code> to limit to manual integration; + * <code>false</code> to enable continuous integration (which configures webhooks into online repos like + * GitHub). + * + * @param isManualIntegration the isManualIntegration value to set. + * @return the SiteSourceControlProperties object itself. + */ + public SiteSourceControlProperties withIsManualIntegration(Boolean isManualIntegration) { + this.isManualIntegration = isManualIntegration; + return this; + } + + /** + * Get the isGitHubAction property: <code>true</code> if this is deployed via GitHub action. + * + * @return the isGitHubAction value. + */ + public Boolean isGitHubAction() { + return this.isGitHubAction; + } + + /** + * Set the isGitHubAction property: <code>true</code> if this is deployed via GitHub action. + * + * @param isGitHubAction the isGitHubAction value to set. + * @return the SiteSourceControlProperties object itself. + */ + public SiteSourceControlProperties withIsGitHubAction(Boolean isGitHubAction) { + this.isGitHubAction = isGitHubAction; + return this; + } + + /** + * Get the deploymentRollbackEnabled property: <code>true</code> to enable deployment rollback; + * otherwise, <code>false</code>. + * + * @return the deploymentRollbackEnabled value. + */ + public Boolean deploymentRollbackEnabled() { + return this.deploymentRollbackEnabled; + } + + /** + * Set the deploymentRollbackEnabled property: <code>true</code> to enable deployment rollback; + * otherwise, <code>false</code>. + * + * @param deploymentRollbackEnabled the deploymentRollbackEnabled value to set. + * @return the SiteSourceControlProperties object itself. + */ + public SiteSourceControlProperties withDeploymentRollbackEnabled(Boolean deploymentRollbackEnabled) { + this.deploymentRollbackEnabled = deploymentRollbackEnabled; + return this; + } + + /** + * Get the isMercurial property: <code>true</code> for a Mercurial repository; + * <code>false</code> for a Git repository. + * + * @return the isMercurial value. + */ + public Boolean isMercurial() { + return this.isMercurial; + } + + /** + * Set the isMercurial property: <code>true</code> for a Mercurial repository; + * <code>false</code> for a Git repository. + * + * @param isMercurial the isMercurial value to set. + * @return the SiteSourceControlProperties object itself. + */ + public SiteSourceControlProperties withIsMercurial(Boolean isMercurial) { + this.isMercurial = isMercurial; + return this; + } + + /** + * Get the gitHubActionConfiguration property: If GitHub Action is selected, than the associated configuration. + * + * @return the gitHubActionConfiguration value. + */ + public GitHubActionConfiguration gitHubActionConfiguration() { + return this.gitHubActionConfiguration; + } + + /** + * Set the gitHubActionConfiguration property: If GitHub Action is selected, than the associated configuration. + * + * @param gitHubActionConfiguration the gitHubActionConfiguration value to set. + * @return the SiteSourceControlProperties object itself. + */ + public SiteSourceControlProperties withGitHubActionConfiguration( + GitHubActionConfiguration gitHubActionConfiguration) { + this.gitHubActionConfiguration = gitHubActionConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (gitHubActionConfiguration() != null) { + gitHubActionConfiguration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SkuInfoInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SkuInfoInner.java new file mode 100644 index 0000000000000..1703702d19b1c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SkuInfoInner.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.SkuCapacity; +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SKU discovery information. */ +@Fluent +public final class SkuInfoInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuInfoInner.class); + + /* + * Resource type that this SKU applies to. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /* + * Name and tier of the SKU. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /* + * Min, max, and default scale values of the SKU. + */ + @JsonProperty(value = "capacity") + private SkuCapacity capacity; + + /** + * Get the resourceType property: Resource type that this SKU applies to. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: Resource type that this SKU applies to. + * + * @param resourceType the resourceType value to set. + * @return the SkuInfoInner object itself. + */ + public SkuInfoInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the sku property: Name and tier of the SKU. + * + * @return the sku value. + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set the sku property: Name and tier of the SKU. + * + * @param sku the sku value to set. + * @return the SkuInfoInner object itself. + */ + public SkuInfoInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + + /** + * Get the capacity property: Min, max, and default scale values of the SKU. + * + * @return the capacity value. + */ + public SkuCapacity capacity() { + return this.capacity; + } + + /** + * Set the capacity property: Min, max, and default scale values of the SKU. + * + * @param capacity the capacity value to set. + * @return the SkuInfoInner object itself. + */ + public SkuInfoInner withCapacity(SkuCapacity capacity) { + this.capacity = capacity; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sku() != null) { + sku().validate(); + } + if (capacity() != null) { + capacity().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SkuInfosInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SkuInfosInner.java new file mode 100644 index 0000000000000..6022403f6384b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SkuInfosInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.GlobalCsmSkuDescription; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of SKU information. */ +@Fluent +public final class SkuInfosInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuInfosInner.class); + + /* + * Resource type that this SKU applies to. + */ + @JsonProperty(value = "resourceType") + private String resourceType; + + /* + * List of SKUs the subscription is able to use. + */ + @JsonProperty(value = "skus") + private List skus; + + /** + * Get the resourceType property: Resource type that this SKU applies to. + * + * @return the resourceType value. + */ + public String resourceType() { + return this.resourceType; + } + + /** + * Set the resourceType property: Resource type that this SKU applies to. + * + * @param resourceType the resourceType value to set. + * @return the SkuInfosInner object itself. + */ + public SkuInfosInner withResourceType(String resourceType) { + this.resourceType = resourceType; + return this; + } + + /** + * Get the skus property: List of SKUs the subscription is able to use. + * + * @return the skus value. + */ + public List skus() { + return this.skus; + } + + /** + * Set the skus property: List of SKUs the subscription is able to use. + * + * @param skus the skus value to set. + * @return the SkuInfosInner object itself. + */ + public SkuInfosInner withSkus(List skus) { + this.skus = skus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (skus() != null) { + skus().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotConfigNames.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotConfigNames.java new file mode 100644 index 0000000000000..124c66dffc9b9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotConfigNames.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Names for connection strings, application settings, and external Azure storage account configuration identifiers to + * be marked as sticky to the deployment slot and not moved during a swap operation. This is valid for all deployment + * slots in an app. + */ +@Fluent +public final class SlotConfigNames { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SlotConfigNames.class); + + /* + * List of connection string names. + */ + @JsonProperty(value = "connectionStringNames") + private List connectionStringNames; + + /* + * List of application settings names. + */ + @JsonProperty(value = "appSettingNames") + private List appSettingNames; + + /* + * List of external Azure storage account identifiers. + */ + @JsonProperty(value = "azureStorageConfigNames") + private List azureStorageConfigNames; + + /** + * Get the connectionStringNames property: List of connection string names. + * + * @return the connectionStringNames value. + */ + public List connectionStringNames() { + return this.connectionStringNames; + } + + /** + * Set the connectionStringNames property: List of connection string names. + * + * @param connectionStringNames the connectionStringNames value to set. + * @return the SlotConfigNames object itself. + */ + public SlotConfigNames withConnectionStringNames(List connectionStringNames) { + this.connectionStringNames = connectionStringNames; + return this; + } + + /** + * Get the appSettingNames property: List of application settings names. + * + * @return the appSettingNames value. + */ + public List appSettingNames() { + return this.appSettingNames; + } + + /** + * Set the appSettingNames property: List of application settings names. + * + * @param appSettingNames the appSettingNames value to set. + * @return the SlotConfigNames object itself. + */ + public SlotConfigNames withAppSettingNames(List appSettingNames) { + this.appSettingNames = appSettingNames; + return this; + } + + /** + * Get the azureStorageConfigNames property: List of external Azure storage account identifiers. + * + * @return the azureStorageConfigNames value. + */ + public List azureStorageConfigNames() { + return this.azureStorageConfigNames; + } + + /** + * Set the azureStorageConfigNames property: List of external Azure storage account identifiers. + * + * @param azureStorageConfigNames the azureStorageConfigNames value to set. + * @return the SlotConfigNames object itself. + */ + public SlotConfigNames withAzureStorageConfigNames(List azureStorageConfigNames) { + this.azureStorageConfigNames = azureStorageConfigNames; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotConfigNamesResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotConfigNamesResourceInner.java new file mode 100644 index 0000000000000..df2e6f886b1ca --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotConfigNamesResourceInner.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Slot Config names azure resource. */ +@Fluent +public final class SlotConfigNamesResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SlotConfigNamesResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private SlotConfigNames innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private SlotConfigNames innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SlotConfigNamesResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the connectionStringNames property: List of connection string names. + * + * @return the connectionStringNames value. + */ + public List connectionStringNames() { + return this.innerProperties() == null ? null : this.innerProperties().connectionStringNames(); + } + + /** + * Set the connectionStringNames property: List of connection string names. + * + * @param connectionStringNames the connectionStringNames value to set. + * @return the SlotConfigNamesResourceInner object itself. + */ + public SlotConfigNamesResourceInner withConnectionStringNames(List connectionStringNames) { + if (this.innerProperties() == null) { + this.innerProperties = new SlotConfigNames(); + } + this.innerProperties().withConnectionStringNames(connectionStringNames); + return this; + } + + /** + * Get the appSettingNames property: List of application settings names. + * + * @return the appSettingNames value. + */ + public List appSettingNames() { + return this.innerProperties() == null ? null : this.innerProperties().appSettingNames(); + } + + /** + * Set the appSettingNames property: List of application settings names. + * + * @param appSettingNames the appSettingNames value to set. + * @return the SlotConfigNamesResourceInner object itself. + */ + public SlotConfigNamesResourceInner withAppSettingNames(List appSettingNames) { + if (this.innerProperties() == null) { + this.innerProperties = new SlotConfigNames(); + } + this.innerProperties().withAppSettingNames(appSettingNames); + return this; + } + + /** + * Get the azureStorageConfigNames property: List of external Azure storage account identifiers. + * + * @return the azureStorageConfigNames value. + */ + public List azureStorageConfigNames() { + return this.innerProperties() == null ? null : this.innerProperties().azureStorageConfigNames(); + } + + /** + * Set the azureStorageConfigNames property: List of external Azure storage account identifiers. + * + * @param azureStorageConfigNames the azureStorageConfigNames value to set. + * @return the SlotConfigNamesResourceInner object itself. + */ + public SlotConfigNamesResourceInner withAzureStorageConfigNames(List azureStorageConfigNames) { + if (this.innerProperties() == null) { + this.innerProperties = new SlotConfigNames(); + } + this.innerProperties().withAzureStorageConfigNames(azureStorageConfigNames); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotDifferenceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotDifferenceInner.java new file mode 100644 index 0000000000000..a45b579ee1b99 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotDifferenceInner.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A setting difference between two deployment slots of an app. */ +@Fluent +public final class SlotDifferenceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SlotDifferenceInner.class); + + /* + * SlotDifference resource specific properties + */ + @JsonProperty(value = "properties") + private SlotDifferenceProperties innerProperties; + + /** + * Get the innerProperties property: SlotDifference resource specific properties. + * + * @return the innerProperties value. + */ + private SlotDifferenceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SlotDifferenceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the level property: Level of the difference: Information, Warning or Error. + * + * @return the level value. + */ + public String level() { + return this.innerProperties() == null ? null : this.innerProperties().level(); + } + + /** + * Get the settingType property: The type of the setting: General, AppSetting or ConnectionString. + * + * @return the settingType value. + */ + public String settingType() { + return this.innerProperties() == null ? null : this.innerProperties().settingType(); + } + + /** + * Get the diffRule property: Rule that describes how to process the setting difference during a slot swap. + * + * @return the diffRule value. + */ + public String diffRule() { + return this.innerProperties() == null ? null : this.innerProperties().diffRule(); + } + + /** + * Get the settingName property: Name of the setting. + * + * @return the settingName value. + */ + public String settingName() { + return this.innerProperties() == null ? null : this.innerProperties().settingName(); + } + + /** + * Get the valueInCurrentSlot property: Value of the setting in the current slot. + * + * @return the valueInCurrentSlot value. + */ + public String valueInCurrentSlot() { + return this.innerProperties() == null ? null : this.innerProperties().valueInCurrentSlot(); + } + + /** + * Get the valueInTargetSlot property: Value of the setting in the target slot. + * + * @return the valueInTargetSlot value. + */ + public String valueInTargetSlot() { + return this.innerProperties() == null ? null : this.innerProperties().valueInTargetSlot(); + } + + /** + * Get the description property: Description of the setting difference. + * + * @return the description value. + */ + public String description() { + return this.innerProperties() == null ? null : this.innerProperties().description(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotDifferenceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotDifferenceProperties.java new file mode 100644 index 0000000000000..7af28ca309a7e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SlotDifferenceProperties.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SlotDifference resource specific properties. */ +@Immutable +public final class SlotDifferenceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SlotDifferenceProperties.class); + + /* + * Level of the difference: Information, Warning or Error. + */ + @JsonProperty(value = "level", access = JsonProperty.Access.WRITE_ONLY) + private String level; + + /* + * The type of the setting: General, AppSetting or ConnectionString. + */ + @JsonProperty(value = "settingType", access = JsonProperty.Access.WRITE_ONLY) + private String settingType; + + /* + * Rule that describes how to process the setting difference during a slot + * swap. + */ + @JsonProperty(value = "diffRule", access = JsonProperty.Access.WRITE_ONLY) + private String diffRule; + + /* + * Name of the setting. + */ + @JsonProperty(value = "settingName", access = JsonProperty.Access.WRITE_ONLY) + private String settingName; + + /* + * Value of the setting in the current slot. + */ + @JsonProperty(value = "valueInCurrentSlot", access = JsonProperty.Access.WRITE_ONLY) + private String valueInCurrentSlot; + + /* + * Value of the setting in the target slot. + */ + @JsonProperty(value = "valueInTargetSlot", access = JsonProperty.Access.WRITE_ONLY) + private String valueInTargetSlot; + + /* + * Description of the setting difference. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Get the level property: Level of the difference: Information, Warning or Error. + * + * @return the level value. + */ + public String level() { + return this.level; + } + + /** + * Get the settingType property: The type of the setting: General, AppSetting or ConnectionString. + * + * @return the settingType value. + */ + public String settingType() { + return this.settingType; + } + + /** + * Get the diffRule property: Rule that describes how to process the setting difference during a slot swap. + * + * @return the diffRule value. + */ + public String diffRule() { + return this.diffRule; + } + + /** + * Get the settingName property: Name of the setting. + * + * @return the settingName value. + */ + public String settingName() { + return this.settingName; + } + + /** + * Get the valueInCurrentSlot property: Value of the setting in the current slot. + * + * @return the valueInCurrentSlot value. + */ + public String valueInCurrentSlot() { + return this.valueInCurrentSlot; + } + + /** + * Get the valueInTargetSlot property: Value of the setting in the target slot. + * + * @return the valueInTargetSlot value. + */ + public String valueInTargetSlot() { + return this.valueInTargetSlot; + } + + /** + * Get the description property: Description of the setting difference. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotInner.java new file mode 100644 index 0000000000000..aacf3f42b9d91 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A snapshot of an app. */ +@Fluent +public final class SnapshotInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotInner.class); + + /* + * Snapshot resource specific properties + */ + @JsonProperty(value = "properties") + private SnapshotProperties innerProperties; + + /** + * Get the innerProperties property: Snapshot resource specific properties. + * + * @return the innerProperties value. + */ + private SnapshotProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SnapshotInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the time property: The time the snapshot was taken. + * + * @return the time value. + */ + public String time() { + return this.innerProperties() == null ? null : this.innerProperties().time(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotProperties.java new file mode 100644 index 0000000000000..256fc94051f0a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotProperties.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Snapshot resource specific properties. */ +@Immutable +public final class SnapshotProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotProperties.class); + + /* + * The time the snapshot was taken. + */ + @JsonProperty(value = "time", access = JsonProperty.Access.WRITE_ONLY) + private String time; + + /** + * Get the time property: The time the snapshot was taken. + * + * @return the time value. + */ + public String time() { + return this.time; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotRestoreRequestProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotRestoreRequestProperties.java new file mode 100644 index 0000000000000..0475f4a3232bc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SnapshotRestoreRequestProperties.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.SnapshotRecoverySource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SnapshotRestoreRequest resource specific properties. */ +@Fluent +public final class SnapshotRestoreRequestProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotRestoreRequestProperties.class); + + /* + * Point in time in which the app restore should be done, formatted as a + * DateTime string. + */ + @JsonProperty(value = "snapshotTime") + private String snapshotTime; + + /* + * Optional. Specifies the web app that snapshot contents will be retrieved + * from. + * If empty, the targeted web app will be used as the source. + */ + @JsonProperty(value = "recoverySource") + private SnapshotRecoverySource recoverySource; + + /* + * If true the restore operation can overwrite source app; + * otherwise, false. + */ + @JsonProperty(value = "overwrite", required = true) + private boolean overwrite; + + /* + * If true, site configuration, in addition to content, will be reverted. + */ + @JsonProperty(value = "recoverConfiguration") + private Boolean recoverConfiguration; + + /* + * If true, custom hostname conflicts will be ignored when recovering to a + * target web app. + * This setting is only necessary when RecoverConfiguration is enabled. + */ + @JsonProperty(value = "ignoreConflictingHostNames") + private Boolean ignoreConflictingHostNames; + + /* + * If true, the snapshot is retrieved from DRSecondary endpoint. + */ + @JsonProperty(value = "useDRSecondary") + private Boolean useDRSecondary; + + /** + * Get the snapshotTime property: Point in time in which the app restore should be done, formatted as a DateTime + * string. + * + * @return the snapshotTime value. + */ + public String snapshotTime() { + return this.snapshotTime; + } + + /** + * Set the snapshotTime property: Point in time in which the app restore should be done, formatted as a DateTime + * string. + * + * @param snapshotTime the snapshotTime value to set. + * @return the SnapshotRestoreRequestProperties object itself. + */ + public SnapshotRestoreRequestProperties withSnapshotTime(String snapshotTime) { + this.snapshotTime = snapshotTime; + return this; + } + + /** + * Get the recoverySource property: Optional. Specifies the web app that snapshot contents will be retrieved from. + * If empty, the targeted web app will be used as the source. + * + * @return the recoverySource value. + */ + public SnapshotRecoverySource recoverySource() { + return this.recoverySource; + } + + /** + * Set the recoverySource property: Optional. Specifies the web app that snapshot contents will be retrieved from. + * If empty, the targeted web app will be used as the source. + * + * @param recoverySource the recoverySource value to set. + * @return the SnapshotRestoreRequestProperties object itself. + */ + public SnapshotRestoreRequestProperties withRecoverySource(SnapshotRecoverySource recoverySource) { + this.recoverySource = recoverySource; + return this; + } + + /** + * Get the overwrite property: If <code>true</code> the restore operation can overwrite source app; + * otherwise, <code>false</code>. + * + * @return the overwrite value. + */ + public boolean overwrite() { + return this.overwrite; + } + + /** + * Set the overwrite property: If <code>true</code> the restore operation can overwrite source app; + * otherwise, <code>false</code>. + * + * @param overwrite the overwrite value to set. + * @return the SnapshotRestoreRequestProperties object itself. + */ + public SnapshotRestoreRequestProperties withOverwrite(boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get the recoverConfiguration property: If true, site configuration, in addition to content, will be reverted. + * + * @return the recoverConfiguration value. + */ + public Boolean recoverConfiguration() { + return this.recoverConfiguration; + } + + /** + * Set the recoverConfiguration property: If true, site configuration, in addition to content, will be reverted. + * + * @param recoverConfiguration the recoverConfiguration value to set. + * @return the SnapshotRestoreRequestProperties object itself. + */ + public SnapshotRestoreRequestProperties withRecoverConfiguration(Boolean recoverConfiguration) { + this.recoverConfiguration = recoverConfiguration; + return this; + } + + /** + * Get the ignoreConflictingHostNames property: If true, custom hostname conflicts will be ignored when recovering + * to a target web app. This setting is only necessary when RecoverConfiguration is enabled. + * + * @return the ignoreConflictingHostNames value. + */ + public Boolean ignoreConflictingHostNames() { + return this.ignoreConflictingHostNames; + } + + /** + * Set the ignoreConflictingHostNames property: If true, custom hostname conflicts will be ignored when recovering + * to a target web app. This setting is only necessary when RecoverConfiguration is enabled. + * + * @param ignoreConflictingHostNames the ignoreConflictingHostNames value to set. + * @return the SnapshotRestoreRequestProperties object itself. + */ + public SnapshotRestoreRequestProperties withIgnoreConflictingHostNames(Boolean ignoreConflictingHostNames) { + this.ignoreConflictingHostNames = ignoreConflictingHostNames; + return this; + } + + /** + * Get the useDRSecondary property: If true, the snapshot is retrieved from DRSecondary endpoint. + * + * @return the useDRSecondary value. + */ + public Boolean useDRSecondary() { + return this.useDRSecondary; + } + + /** + * Set the useDRSecondary property: If true, the snapshot is retrieved from DRSecondary endpoint. + * + * @param useDRSecondary the useDRSecondary value to set. + * @return the SnapshotRestoreRequestProperties object itself. + */ + public SnapshotRestoreRequestProperties withUseDRSecondary(Boolean useDRSecondary) { + this.useDRSecondary = useDRSecondary; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (recoverySource() != null) { + recoverySource().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SourceControlInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SourceControlInner.java new file mode 100644 index 0000000000000..6d4fd06dfd984 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SourceControlInner.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The source control OAuth token. */ +@Fluent +public final class SourceControlInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlInner.class); + + /* + * SourceControl resource specific properties + */ + @JsonProperty(value = "properties") + private SourceControlProperties innerProperties; + + /** + * Get the innerProperties property: SourceControl resource specific properties. + * + * @return the innerProperties value. + */ + private SourceControlProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SourceControlInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the token property: OAuth access token. + * + * @return the token value. + */ + public String token() { + return this.innerProperties() == null ? null : this.innerProperties().token(); + } + + /** + * Set the token property: OAuth access token. + * + * @param token the token value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withToken(String token) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withToken(token); + return this; + } + + /** + * Get the tokenSecret property: OAuth access token secret. + * + * @return the tokenSecret value. + */ + public String tokenSecret() { + return this.innerProperties() == null ? null : this.innerProperties().tokenSecret(); + } + + /** + * Set the tokenSecret property: OAuth access token secret. + * + * @param tokenSecret the tokenSecret value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withTokenSecret(String tokenSecret) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withTokenSecret(tokenSecret); + return this; + } + + /** + * Get the refreshToken property: OAuth refresh token. + * + * @return the refreshToken value. + */ + public String refreshToken() { + return this.innerProperties() == null ? null : this.innerProperties().refreshToken(); + } + + /** + * Set the refreshToken property: OAuth refresh token. + * + * @param refreshToken the refreshToken value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withRefreshToken(String refreshToken) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withRefreshToken(refreshToken); + return this; + } + + /** + * Get the expirationTime property: OAuth token expiration. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().expirationTime(); + } + + /** + * Set the expirationTime property: OAuth token expiration. + * + * @param expirationTime the expirationTime value to set. + * @return the SourceControlInner object itself. + */ + public SourceControlInner withExpirationTime(OffsetDateTime expirationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new SourceControlProperties(); + } + this.innerProperties().withExpirationTime(expirationTime); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SourceControlProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SourceControlProperties.java new file mode 100644 index 0000000000000..429a55b2799ed --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SourceControlProperties.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** SourceControl resource specific properties. */ +@Fluent +public final class SourceControlProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlProperties.class); + + /* + * OAuth access token. + */ + @JsonProperty(value = "token") + private String token; + + /* + * OAuth access token secret. + */ + @JsonProperty(value = "tokenSecret") + private String tokenSecret; + + /* + * OAuth refresh token. + */ + @JsonProperty(value = "refreshToken") + private String refreshToken; + + /* + * OAuth token expiration. + */ + @JsonProperty(value = "expirationTime") + private OffsetDateTime expirationTime; + + /** + * Get the token property: OAuth access token. + * + * @return the token value. + */ + public String token() { + return this.token; + } + + /** + * Set the token property: OAuth access token. + * + * @param token the token value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withToken(String token) { + this.token = token; + return this; + } + + /** + * Get the tokenSecret property: OAuth access token secret. + * + * @return the tokenSecret value. + */ + public String tokenSecret() { + return this.tokenSecret; + } + + /** + * Set the tokenSecret property: OAuth access token secret. + * + * @param tokenSecret the tokenSecret value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withTokenSecret(String tokenSecret) { + this.tokenSecret = tokenSecret; + return this; + } + + /** + * Get the refreshToken property: OAuth refresh token. + * + * @return the refreshToken value. + */ + public String refreshToken() { + return this.refreshToken; + } + + /** + * Set the refreshToken property: OAuth refresh token. + * + * @param refreshToken the refreshToken value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withRefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + return this; + } + + /** + * Get the expirationTime property: OAuth token expiration. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.expirationTime; + } + + /** + * Set the expirationTime property: OAuth token expiration. + * + * @param expirationTime the expirationTime value to set. + * @return the SourceControlProperties object itself. + */ + public SourceControlProperties withExpirationTime(OffsetDateTime expirationTime) { + this.expirationTime = expirationTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StampCapacityInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StampCapacityInner.java new file mode 100644 index 0000000000000..08609ded9043d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StampCapacityInner.java @@ -0,0 +1,321 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ComputeModeOptions; +import com.azure.resourcemanager.appservice.generated.models.WorkerSizeOptions; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Stamp capacity information. */ +@Fluent +public final class StampCapacityInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StampCapacityInner.class); + + /* + * Name of the stamp. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Available capacity (# of machines, bytes of storage etc...). + */ + @JsonProperty(value = "availableCapacity") + private Long availableCapacity; + + /* + * Total capacity (# of machines, bytes of storage etc...). + */ + @JsonProperty(value = "totalCapacity") + private Long totalCapacity; + + /* + * Name of the unit. + */ + @JsonProperty(value = "unit") + private String unit; + + /* + * Shared/dedicated workers. + */ + @JsonProperty(value = "computeMode") + private ComputeModeOptions computeMode; + + /* + * Size of the machines. + */ + @JsonProperty(value = "workerSize") + private WorkerSizeOptions workerSize; + + /* + * Size ID of machines: + * 0 - Small + * 1 - Medium + * 2 - Large + */ + @JsonProperty(value = "workerSizeId") + private Integer workerSizeId; + + /* + * If true, it includes basic apps. + * Basic apps are not used for capacity allocation. + */ + @JsonProperty(value = "excludeFromCapacityAllocation") + private Boolean excludeFromCapacityAllocation; + + /* + * true if capacity is applicable for all apps; otherwise, + * false. + */ + @JsonProperty(value = "isApplicableForAllComputeModes") + private Boolean isApplicableForAllComputeModes; + + /* + * Shared or Dedicated. + */ + @JsonProperty(value = "siteMode") + private String siteMode; + + /* + * Is this a linux stamp capacity + */ + @JsonProperty(value = "isLinux") + private Boolean isLinux; + + /** + * Get the name property: Name of the stamp. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the stamp. + * + * @param name the name value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the availableCapacity property: Available capacity (# of machines, bytes of storage etc...). + * + * @return the availableCapacity value. + */ + public Long availableCapacity() { + return this.availableCapacity; + } + + /** + * Set the availableCapacity property: Available capacity (# of machines, bytes of storage etc...). + * + * @param availableCapacity the availableCapacity value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withAvailableCapacity(Long availableCapacity) { + this.availableCapacity = availableCapacity; + return this; + } + + /** + * Get the totalCapacity property: Total capacity (# of machines, bytes of storage etc...). + * + * @return the totalCapacity value. + */ + public Long totalCapacity() { + return this.totalCapacity; + } + + /** + * Set the totalCapacity property: Total capacity (# of machines, bytes of storage etc...). + * + * @param totalCapacity the totalCapacity value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withTotalCapacity(Long totalCapacity) { + this.totalCapacity = totalCapacity; + return this; + } + + /** + * Get the unit property: Name of the unit. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit property: Name of the unit. + * + * @param unit the unit value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the computeMode property: Shared/dedicated workers. + * + * @return the computeMode value. + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set the computeMode property: Shared/dedicated workers. + * + * @param computeMode the computeMode value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get the workerSize property: Size of the machines. + * + * @return the workerSize value. + */ + public WorkerSizeOptions workerSize() { + return this.workerSize; + } + + /** + * Set the workerSize property: Size of the machines. + * + * @param workerSize the workerSize value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withWorkerSize(WorkerSizeOptions workerSize) { + this.workerSize = workerSize; + return this; + } + + /** + * Get the workerSizeId property: Size ID of machines: 0 - Small 1 - Medium 2 - Large. + * + * @return the workerSizeId value. + */ + public Integer workerSizeId() { + return this.workerSizeId; + } + + /** + * Set the workerSizeId property: Size ID of machines: 0 - Small 1 - Medium 2 - Large. + * + * @param workerSizeId the workerSizeId value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withWorkerSizeId(Integer workerSizeId) { + this.workerSizeId = workerSizeId; + return this; + } + + /** + * Get the excludeFromCapacityAllocation property: If <code>true</code>, it includes basic apps. Basic + * apps are not used for capacity allocation. + * + * @return the excludeFromCapacityAllocation value. + */ + public Boolean excludeFromCapacityAllocation() { + return this.excludeFromCapacityAllocation; + } + + /** + * Set the excludeFromCapacityAllocation property: If <code>true</code>, it includes basic apps. Basic + * apps are not used for capacity allocation. + * + * @param excludeFromCapacityAllocation the excludeFromCapacityAllocation value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withExcludeFromCapacityAllocation(Boolean excludeFromCapacityAllocation) { + this.excludeFromCapacityAllocation = excludeFromCapacityAllocation; + return this; + } + + /** + * Get the isApplicableForAllComputeModes property: <code>true</code> if capacity is applicable for all + * apps; otherwise, <code>false</code>. + * + * @return the isApplicableForAllComputeModes value. + */ + public Boolean isApplicableForAllComputeModes() { + return this.isApplicableForAllComputeModes; + } + + /** + * Set the isApplicableForAllComputeModes property: <code>true</code> if capacity is applicable for all + * apps; otherwise, <code>false</code>. + * + * @param isApplicableForAllComputeModes the isApplicableForAllComputeModes value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withIsApplicableForAllComputeModes(Boolean isApplicableForAllComputeModes) { + this.isApplicableForAllComputeModes = isApplicableForAllComputeModes; + return this; + } + + /** + * Get the siteMode property: Shared or Dedicated. + * + * @return the siteMode value. + */ + public String siteMode() { + return this.siteMode; + } + + /** + * Set the siteMode property: Shared or Dedicated. + * + * @param siteMode the siteMode value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withSiteMode(String siteMode) { + this.siteMode = siteMode; + return this; + } + + /** + * Get the isLinux property: Is this a linux stamp capacity. + * + * @return the isLinux value. + */ + public Boolean isLinux() { + return this.isLinux; + } + + /** + * Set the isLinux property: Is this a linux stamp capacity. + * + * @param isLinux the isLinux value to set. + * @return the StampCapacityInner object itself. + */ + public StampCapacityInner withIsLinux(Boolean isLinux) { + this.isLinux = isLinux; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSite.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSite.java new file mode 100644 index 0000000000000..5d03691c93602 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSite.java @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.EnterpriseGradeCdnStatus; +import com.azure.resourcemanager.appservice.generated.models.ResponseMessageEnvelopeRemotePrivateEndpointConnection; +import com.azure.resourcemanager.appservice.generated.models.StagingEnvironmentPolicy; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildProperties; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteTemplateOptions; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionApp; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A static site. */ +@Fluent +public final class StaticSite { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSite.class); + + /* + * The default autogenerated hostname for the static site. + */ + @JsonProperty(value = "defaultHostname", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostname; + + /* + * URL for the repository of the static site. + */ + @JsonProperty(value = "repositoryUrl") + private String repositoryUrl; + + /* + * The target branch in the repository. + */ + @JsonProperty(value = "branch") + private String branch; + + /* + * The custom domains associated with this static site. + */ + @JsonProperty(value = "customDomains", access = JsonProperty.Access.WRITE_ONLY) + private List customDomains; + + /* + * A user's github repository token. This is used to setup the Github + * Actions workflow file and API secrets. + */ + @JsonProperty(value = "repositoryToken") + private String repositoryToken; + + /* + * Build properties to configure on the repository. + */ + @JsonProperty(value = "buildProperties") + private StaticSiteBuildProperties buildProperties; + + /* + * Private endpoint connections + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /* + * State indicating whether staging environments are allowed or not allowed + * for a static web app. + */ + @JsonProperty(value = "stagingEnvironmentPolicy") + private StagingEnvironmentPolicy stagingEnvironmentPolicy; + + /* + * false if config file is locked for this static web app; + * otherwise, true. + */ + @JsonProperty(value = "allowConfigFileUpdates") + private Boolean allowConfigFileUpdates; + + /* + * Template options for generating a new repository. + */ + @JsonProperty(value = "templateProperties") + private StaticSiteTemplateOptions templateProperties; + + /* + * The content distribution endpoint for the static site. + */ + @JsonProperty(value = "contentDistributionEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String contentDistributionEndpoint; + + /* + * Identity to use for Key Vault Reference authentication. + */ + @JsonProperty(value = "keyVaultReferenceIdentity", access = JsonProperty.Access.WRITE_ONLY) + private String keyVaultReferenceIdentity; + + /* + * User provided function apps registered with the static site + */ + @JsonProperty(value = "userProvidedFunctionApps", access = JsonProperty.Access.WRITE_ONLY) + private List userProvidedFunctionApps; + + /* + * The provider that submitted the last deployment to the primary + * environment of the static site. + */ + @JsonProperty(value = "provider") + private String provider; + + /* + * State indicating the status of the enterprise grade CDN serving traffic + * to the static web app. + */ + @JsonProperty(value = "enterpriseGradeCdnStatus") + private EnterpriseGradeCdnStatus enterpriseGradeCdnStatus; + + /** + * Get the defaultHostname property: The default autogenerated hostname for the static site. + * + * @return the defaultHostname value. + */ + public String defaultHostname() { + return this.defaultHostname; + } + + /** + * Get the repositoryUrl property: URL for the repository of the static site. + * + * @return the repositoryUrl value. + */ + public String repositoryUrl() { + return this.repositoryUrl; + } + + /** + * Set the repositoryUrl property: URL for the repository of the static site. + * + * @param repositoryUrl the repositoryUrl value to set. + * @return the StaticSite object itself. + */ + public StaticSite withRepositoryUrl(String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * Get the branch property: The target branch in the repository. + * + * @return the branch value. + */ + public String branch() { + return this.branch; + } + + /** + * Set the branch property: The target branch in the repository. + * + * @param branch the branch value to set. + * @return the StaticSite object itself. + */ + public StaticSite withBranch(String branch) { + this.branch = branch; + return this; + } + + /** + * Get the customDomains property: The custom domains associated with this static site. + * + * @return the customDomains value. + */ + public List customDomains() { + return this.customDomains; + } + + /** + * Get the repositoryToken property: A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * + * @return the repositoryToken value. + */ + public String repositoryToken() { + return this.repositoryToken; + } + + /** + * Set the repositoryToken property: A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * + * @param repositoryToken the repositoryToken value to set. + * @return the StaticSite object itself. + */ + public StaticSite withRepositoryToken(String repositoryToken) { + this.repositoryToken = repositoryToken; + return this; + } + + /** + * Get the buildProperties property: Build properties to configure on the repository. + * + * @return the buildProperties value. + */ + public StaticSiteBuildProperties buildProperties() { + return this.buildProperties; + } + + /** + * Set the buildProperties property: Build properties to configure on the repository. + * + * @param buildProperties the buildProperties value to set. + * @return the StaticSite object itself. + */ + public StaticSite withBuildProperties(StaticSiteBuildProperties buildProperties) { + this.buildProperties = buildProperties; + return this; + } + + /** + * Get the privateEndpointConnections property: Private endpoint connections. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the stagingEnvironmentPolicy property: State indicating whether staging environments are allowed or not + * allowed for a static web app. + * + * @return the stagingEnvironmentPolicy value. + */ + public StagingEnvironmentPolicy stagingEnvironmentPolicy() { + return this.stagingEnvironmentPolicy; + } + + /** + * Set the stagingEnvironmentPolicy property: State indicating whether staging environments are allowed or not + * allowed for a static web app. + * + * @param stagingEnvironmentPolicy the stagingEnvironmentPolicy value to set. + * @return the StaticSite object itself. + */ + public StaticSite withStagingEnvironmentPolicy(StagingEnvironmentPolicy stagingEnvironmentPolicy) { + this.stagingEnvironmentPolicy = stagingEnvironmentPolicy; + return this; + } + + /** + * Get the allowConfigFileUpdates property: <code>false</code> if config file is locked for this static + * web app; otherwise, <code>true</code>. + * + * @return the allowConfigFileUpdates value. + */ + public Boolean allowConfigFileUpdates() { + return this.allowConfigFileUpdates; + } + + /** + * Set the allowConfigFileUpdates property: <code>false</code> if config file is locked for this static + * web app; otherwise, <code>true</code>. + * + * @param allowConfigFileUpdates the allowConfigFileUpdates value to set. + * @return the StaticSite object itself. + */ + public StaticSite withAllowConfigFileUpdates(Boolean allowConfigFileUpdates) { + this.allowConfigFileUpdates = allowConfigFileUpdates; + return this; + } + + /** + * Get the templateProperties property: Template options for generating a new repository. + * + * @return the templateProperties value. + */ + public StaticSiteTemplateOptions templateProperties() { + return this.templateProperties; + } + + /** + * Set the templateProperties property: Template options for generating a new repository. + * + * @param templateProperties the templateProperties value to set. + * @return the StaticSite object itself. + */ + public StaticSite withTemplateProperties(StaticSiteTemplateOptions templateProperties) { + this.templateProperties = templateProperties; + return this; + } + + /** + * Get the contentDistributionEndpoint property: The content distribution endpoint for the static site. + * + * @return the contentDistributionEndpoint value. + */ + public String contentDistributionEndpoint() { + return this.contentDistributionEndpoint; + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.keyVaultReferenceIdentity; + } + + /** + * Get the userProvidedFunctionApps property: User provided function apps registered with the static site. + * + * @return the userProvidedFunctionApps value. + */ + public List userProvidedFunctionApps() { + return this.userProvidedFunctionApps; + } + + /** + * Get the provider property: The provider that submitted the last deployment to the primary environment of the + * static site. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: The provider that submitted the last deployment to the primary environment of the + * static site. + * + * @param provider the provider value to set. + * @return the StaticSite object itself. + */ + public StaticSite withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN serving + * traffic to the static web app. + * + * @return the enterpriseGradeCdnStatus value. + */ + public EnterpriseGradeCdnStatus enterpriseGradeCdnStatus() { + return this.enterpriseGradeCdnStatus; + } + + /** + * Set the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN serving + * traffic to the static web app. + * + * @param enterpriseGradeCdnStatus the enterpriseGradeCdnStatus value to set. + * @return the StaticSite object itself. + */ + public StaticSite withEnterpriseGradeCdnStatus(EnterpriseGradeCdnStatus enterpriseGradeCdnStatus) { + this.enterpriseGradeCdnStatus = enterpriseGradeCdnStatus; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (buildProperties() != null) { + buildProperties().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + if (templateProperties() != null) { + templateProperties().validate(); + } + if (userProvidedFunctionApps() != null) { + userProvidedFunctionApps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteArmResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteArmResourceInner.java new file mode 100644 index 0000000000000..d370dfc730e77 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteArmResourceInner.java @@ -0,0 +1,422 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.EnterpriseGradeCdnStatus; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.ResponseMessageEnvelopeRemotePrivateEndpointConnection; +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.azure.resourcemanager.appservice.generated.models.StagingEnvironmentPolicy; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildProperties; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteTemplateOptions; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionApp; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Static Site ARM resource. */ +@Fluent +public final class StaticSiteArmResourceInner extends Resource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteArmResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private StaticSite innerProperties; + + /* + * Description of a SKU for a scalable resource. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /* + * Managed service identity. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private StaticSite innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Description of a SKU for a scalable resource. + * + * @return the sku value. + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set the sku property: Description of a SKU for a scalable resource. + * + * @param sku the sku value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + + /** + * Get the identity property: Managed service identity. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed service identity. + * + * @param identity the identity value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withKind(String kind) { + this.kind = kind; + return this; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteArmResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteArmResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the defaultHostname property: The default autogenerated hostname for the static site. + * + * @return the defaultHostname value. + */ + public String defaultHostname() { + return this.innerProperties() == null ? null : this.innerProperties().defaultHostname(); + } + + /** + * Get the repositoryUrl property: URL for the repository of the static site. + * + * @return the repositoryUrl value. + */ + public String repositoryUrl() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryUrl(); + } + + /** + * Set the repositoryUrl property: URL for the repository of the static site. + * + * @param repositoryUrl the repositoryUrl value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withRepositoryUrl(String repositoryUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withRepositoryUrl(repositoryUrl); + return this; + } + + /** + * Get the branch property: The target branch in the repository. + * + * @return the branch value. + */ + public String branch() { + return this.innerProperties() == null ? null : this.innerProperties().branch(); + } + + /** + * Set the branch property: The target branch in the repository. + * + * @param branch the branch value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withBranch(String branch) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withBranch(branch); + return this; + } + + /** + * Get the customDomains property: The custom domains associated with this static site. + * + * @return the customDomains value. + */ + public List customDomains() { + return this.innerProperties() == null ? null : this.innerProperties().customDomains(); + } + + /** + * Get the repositoryToken property: A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * + * @return the repositoryToken value. + */ + public String repositoryToken() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryToken(); + } + + /** + * Set the repositoryToken property: A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * + * @param repositoryToken the repositoryToken value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withRepositoryToken(String repositoryToken) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withRepositoryToken(repositoryToken); + return this; + } + + /** + * Get the buildProperties property: Build properties to configure on the repository. + * + * @return the buildProperties value. + */ + public StaticSiteBuildProperties buildProperties() { + return this.innerProperties() == null ? null : this.innerProperties().buildProperties(); + } + + /** + * Set the buildProperties property: Build properties to configure on the repository. + * + * @param buildProperties the buildProperties value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withBuildProperties(StaticSiteBuildProperties buildProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withBuildProperties(buildProperties); + return this; + } + + /** + * Get the privateEndpointConnections property: Private endpoint connections. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + + /** + * Get the stagingEnvironmentPolicy property: State indicating whether staging environments are allowed or not + * allowed for a static web app. + * + * @return the stagingEnvironmentPolicy value. + */ + public StagingEnvironmentPolicy stagingEnvironmentPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().stagingEnvironmentPolicy(); + } + + /** + * Set the stagingEnvironmentPolicy property: State indicating whether staging environments are allowed or not + * allowed for a static web app. + * + * @param stagingEnvironmentPolicy the stagingEnvironmentPolicy value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withStagingEnvironmentPolicy(StagingEnvironmentPolicy stagingEnvironmentPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withStagingEnvironmentPolicy(stagingEnvironmentPolicy); + return this; + } + + /** + * Get the allowConfigFileUpdates property: <code>false</code> if config file is locked for this static + * web app; otherwise, <code>true</code>. + * + * @return the allowConfigFileUpdates value. + */ + public Boolean allowConfigFileUpdates() { + return this.innerProperties() == null ? null : this.innerProperties().allowConfigFileUpdates(); + } + + /** + * Set the allowConfigFileUpdates property: <code>false</code> if config file is locked for this static + * web app; otherwise, <code>true</code>. + * + * @param allowConfigFileUpdates the allowConfigFileUpdates value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withAllowConfigFileUpdates(Boolean allowConfigFileUpdates) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withAllowConfigFileUpdates(allowConfigFileUpdates); + return this; + } + + /** + * Get the templateProperties property: Template options for generating a new repository. + * + * @return the templateProperties value. + */ + public StaticSiteTemplateOptions templateProperties() { + return this.innerProperties() == null ? null : this.innerProperties().templateProperties(); + } + + /** + * Set the templateProperties property: Template options for generating a new repository. + * + * @param templateProperties the templateProperties value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withTemplateProperties(StaticSiteTemplateOptions templateProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withTemplateProperties(templateProperties); + return this; + } + + /** + * Get the contentDistributionEndpoint property: The content distribution endpoint for the static site. + * + * @return the contentDistributionEndpoint value. + */ + public String contentDistributionEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().contentDistributionEndpoint(); + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultReferenceIdentity(); + } + + /** + * Get the userProvidedFunctionApps property: User provided function apps registered with the static site. + * + * @return the userProvidedFunctionApps value. + */ + public List userProvidedFunctionApps() { + return this.innerProperties() == null ? null : this.innerProperties().userProvidedFunctionApps(); + } + + /** + * Get the provider property: The provider that submitted the last deployment to the primary environment of the + * static site. + * + * @return the provider value. + */ + public String provider() { + return this.innerProperties() == null ? null : this.innerProperties().provider(); + } + + /** + * Set the provider property: The provider that submitted the last deployment to the primary environment of the + * static site. + * + * @param provider the provider value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withProvider(String provider) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withProvider(provider); + return this; + } + + /** + * Get the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN serving + * traffic to the static web app. + * + * @return the enterpriseGradeCdnStatus value. + */ + public EnterpriseGradeCdnStatus enterpriseGradeCdnStatus() { + return this.innerProperties() == null ? null : this.innerProperties().enterpriseGradeCdnStatus(); + } + + /** + * Set the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN serving + * traffic to the static web app. + * + * @param enterpriseGradeCdnStatus the enterpriseGradeCdnStatus value to set. + * @return the StaticSiteArmResourceInner object itself. + */ + public StaticSiteArmResourceInner withEnterpriseGradeCdnStatus(EnterpriseGradeCdnStatus enterpriseGradeCdnStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withEnterpriseGradeCdnStatus(enterpriseGradeCdnStatus); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() != null) { + sku().validate(); + } + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteBuildArmResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteBuildArmResourceInner.java new file mode 100644 index 0000000000000..40af6e2640bbf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteBuildArmResourceInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BuildStatus; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionApp; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Static Site Build ARM resource. */ +@Fluent +public final class StaticSiteBuildArmResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteBuildArmResourceInner.class); + + /* + * StaticSiteBuildARMResource resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSiteBuildArmResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteBuildARMResource resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteBuildArmResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteBuildArmResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the buildId property: An identifier for the static site build. + * + * @return the buildId value. + */ + public String buildId() { + return this.innerProperties() == null ? null : this.innerProperties().buildId(); + } + + /** + * Get the sourceBranch property: The source branch. + * + * @return the sourceBranch value. + */ + public String sourceBranch() { + return this.innerProperties() == null ? null : this.innerProperties().sourceBranch(); + } + + /** + * Get the pullRequestTitle property: The title of a pull request that a static site build is related to. + * + * @return the pullRequestTitle value. + */ + public String pullRequestTitle() { + return this.innerProperties() == null ? null : this.innerProperties().pullRequestTitle(); + } + + /** + * Get the hostname property: The hostname for a static site build. + * + * @return the hostname value. + */ + public String hostname() { + return this.innerProperties() == null ? null : this.innerProperties().hostname(); + } + + /** + * Get the createdTimeUtc property: When this build was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.innerProperties() == null ? null : this.innerProperties().createdTimeUtc(); + } + + /** + * Get the lastUpdatedOn property: When this build was updated. + * + * @return the lastUpdatedOn value. + */ + public OffsetDateTime lastUpdatedOn() { + return this.innerProperties() == null ? null : this.innerProperties().lastUpdatedOn(); + } + + /** + * Get the status property: The status of the static site build. + * + * @return the status value. + */ + public BuildStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the userProvidedFunctionApps property: User provided function apps registered with the static site build. + * + * @return the userProvidedFunctionApps value. + */ + public List userProvidedFunctionApps() { + return this.innerProperties() == null ? null : this.innerProperties().userProvidedFunctionApps(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteBuildArmResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteBuildArmResourceProperties.java new file mode 100644 index 0000000000000..6a9881235b18b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteBuildArmResourceProperties.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.BuildStatus; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionApp; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** StaticSiteBuildARMResource resource specific properties. */ +@Immutable +public final class StaticSiteBuildArmResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteBuildArmResourceProperties.class); + + /* + * An identifier for the static site build. + */ + @JsonProperty(value = "buildId", access = JsonProperty.Access.WRITE_ONLY) + private String buildId; + + /* + * The source branch. + */ + @JsonProperty(value = "sourceBranch", access = JsonProperty.Access.WRITE_ONLY) + private String sourceBranch; + + /* + * The title of a pull request that a static site build is related to. + */ + @JsonProperty(value = "pullRequestTitle", access = JsonProperty.Access.WRITE_ONLY) + private String pullRequestTitle; + + /* + * The hostname for a static site build. + */ + @JsonProperty(value = "hostname", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; + + /* + * When this build was created. + */ + @JsonProperty(value = "createdTimeUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTimeUtc; + + /* + * When this build was updated. + */ + @JsonProperty(value = "lastUpdatedOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastUpdatedOn; + + /* + * The status of the static site build. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private BuildStatus status; + + /* + * User provided function apps registered with the static site build + */ + @JsonProperty(value = "userProvidedFunctionApps", access = JsonProperty.Access.WRITE_ONLY) + private List userProvidedFunctionApps; + + /** + * Get the buildId property: An identifier for the static site build. + * + * @return the buildId value. + */ + public String buildId() { + return this.buildId; + } + + /** + * Get the sourceBranch property: The source branch. + * + * @return the sourceBranch value. + */ + public String sourceBranch() { + return this.sourceBranch; + } + + /** + * Get the pullRequestTitle property: The title of a pull request that a static site build is related to. + * + * @return the pullRequestTitle value. + */ + public String pullRequestTitle() { + return this.pullRequestTitle; + } + + /** + * Get the hostname property: The hostname for a static site build. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Get the createdTimeUtc property: When this build was created. + * + * @return the createdTimeUtc value. + */ + public OffsetDateTime createdTimeUtc() { + return this.createdTimeUtc; + } + + /** + * Get the lastUpdatedOn property: When this build was updated. + * + * @return the lastUpdatedOn value. + */ + public OffsetDateTime lastUpdatedOn() { + return this.lastUpdatedOn; + } + + /** + * Get the status property: The status of the static site build. + * + * @return the status value. + */ + public BuildStatus status() { + return this.status; + } + + /** + * Get the userProvidedFunctionApps property: User provided function apps registered with the static site build. + * + * @return the userProvidedFunctionApps value. + */ + public List userProvidedFunctionApps() { + return this.userProvidedFunctionApps; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userProvidedFunctionApps() != null) { + userProvidedFunctionApps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainOverviewArmResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainOverviewArmResourceInner.java new file mode 100644 index 0000000000000..30f734a2d8a99 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainOverviewArmResourceInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.CustomDomainStatus; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Static Site Custom Domain Overview ARM resource. */ +@Fluent +public final class StaticSiteCustomDomainOverviewArmResourceInner extends ProxyOnlyResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteCustomDomainOverviewArmResourceInner.class); + + /* + * StaticSiteCustomDomainOverviewARMResource resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSiteCustomDomainOverviewArmResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteCustomDomainOverviewARMResource resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteCustomDomainOverviewArmResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteCustomDomainOverviewArmResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the domainName property: The domain name for the static site custom domain. + * + * @return the domainName value. + */ + public String domainName() { + return this.innerProperties() == null ? null : this.innerProperties().domainName(); + } + + /** + * Get the createdOn property: The date and time on which the custom domain was created for the static site. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.innerProperties() == null ? null : this.innerProperties().createdOn(); + } + + /** + * Get the status property: The status of the custom domain. + * + * @return the status value. + */ + public CustomDomainStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the validationToken property: The TXT record validation token. + * + * @return the validationToken value. + */ + public String validationToken() { + return this.innerProperties() == null ? null : this.innerProperties().validationToken(); + } + + /** + * Get the errorMessage property: The errorMessage property. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.innerProperties() == null ? null : this.innerProperties().errorMessage(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainOverviewArmResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainOverviewArmResourceProperties.java new file mode 100644 index 0000000000000..35ab14158c267 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainOverviewArmResourceProperties.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.CustomDomainStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** StaticSiteCustomDomainOverviewARMResource resource specific properties. */ +@Immutable +public final class StaticSiteCustomDomainOverviewArmResourceProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteCustomDomainOverviewArmResourceProperties.class); + + /* + * The domain name for the static site custom domain. + */ + @JsonProperty(value = "domainName", access = JsonProperty.Access.WRITE_ONLY) + private String domainName; + + /* + * The date and time on which the custom domain was created for the static + * site. + */ + @JsonProperty(value = "createdOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdOn; + + /* + * The status of the custom domain + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private CustomDomainStatus status; + + /* + * The TXT record validation token + */ + @JsonProperty(value = "validationToken", access = JsonProperty.Access.WRITE_ONLY) + private String validationToken; + + /* + * The errorMessage property. + */ + @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) + private String errorMessage; + + /** + * Get the domainName property: The domain name for the static site custom domain. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Get the createdOn property: The date and time on which the custom domain was created for the static site. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.createdOn; + } + + /** + * Get the status property: The status of the custom domain. + * + * @return the status value. + */ + public CustomDomainStatus status() { + return this.status; + } + + /** + * Get the validationToken property: The TXT record validation token. + * + * @return the validationToken value. + */ + public String validationToken() { + return this.validationToken; + } + + /** + * Get the errorMessage property: The errorMessage property. + * + * @return the errorMessage value. + */ + public String errorMessage() { + return this.errorMessage; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainRequestPropertiesArmResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainRequestPropertiesArmResourceProperties.java new file mode 100644 index 0000000000000..e4b585b8d9949 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteCustomDomainRequestPropertiesArmResourceProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StaticSiteCustomDomainRequestPropertiesARMResource resource specific properties. */ +@Fluent +public final class StaticSiteCustomDomainRequestPropertiesArmResourceProperties { + @JsonIgnore + private final ClientLogger logger = + new ClientLogger(StaticSiteCustomDomainRequestPropertiesArmResourceProperties.class); + + /* + * Validation method for adding a custom domain + */ + @JsonProperty(value = "validationMethod") + private String validationMethod; + + /** + * Get the validationMethod property: Validation method for adding a custom domain. + * + * @return the validationMethod value. + */ + public String validationMethod() { + return this.validationMethod; + } + + /** + * Set the validationMethod property: Validation method for adding a custom domain. + * + * @param validationMethod the validationMethod value to set. + * @return the StaticSiteCustomDomainRequestPropertiesArmResourceProperties object itself. + */ + public StaticSiteCustomDomainRequestPropertiesArmResourceProperties withValidationMethod(String validationMethod) { + this.validationMethod = validationMethod; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteFunctionOverviewArmResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteFunctionOverviewArmResourceInner.java new file mode 100644 index 0000000000000..f8a7207ad9ee0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteFunctionOverviewArmResourceInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.TriggerTypes; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Static Site Function Overview ARM resource. */ +@Fluent +public final class StaticSiteFunctionOverviewArmResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteFunctionOverviewArmResourceInner.class); + + /* + * StaticSiteFunctionOverviewARMResource resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSiteFunctionOverviewArmResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteFunctionOverviewARMResource resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteFunctionOverviewArmResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteFunctionOverviewArmResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the functionName property: The name for the function. + * + * @return the functionName value. + */ + public String functionName() { + return this.innerProperties() == null ? null : this.innerProperties().functionName(); + } + + /** + * Get the triggerType property: The trigger type of the function. + * + * @return the triggerType value. + */ + public TriggerTypes triggerType() { + return this.innerProperties() == null ? null : this.innerProperties().triggerType(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteFunctionOverviewArmResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteFunctionOverviewArmResourceProperties.java new file mode 100644 index 0000000000000..2828aabd3ebdf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteFunctionOverviewArmResourceProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.TriggerTypes; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StaticSiteFunctionOverviewARMResource resource specific properties. */ +@Immutable +public final class StaticSiteFunctionOverviewArmResourceProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteFunctionOverviewArmResourceProperties.class); + + /* + * The name for the function + */ + @JsonProperty(value = "functionName", access = JsonProperty.Access.WRITE_ONLY) + private String functionName; + + /* + * The trigger type of the function + */ + @JsonProperty(value = "triggerType", access = JsonProperty.Access.WRITE_ONLY) + private TriggerTypes triggerType; + + /** + * Get the functionName property: The name for the function. + * + * @return the functionName value. + */ + public String functionName() { + return this.functionName; + } + + /** + * Get the triggerType property: The trigger type of the function. + * + * @return the triggerType value. + */ + public TriggerTypes triggerType() { + return this.triggerType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteResetPropertiesArmResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteResetPropertiesArmResourceProperties.java new file mode 100644 index 0000000000000..b6420c32160c5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteResetPropertiesArmResourceProperties.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StaticSiteResetPropertiesARMResource resource specific properties. */ +@Fluent +public final class StaticSiteResetPropertiesArmResourceProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteResetPropertiesArmResourceProperties.class); + + /* + * The token which proves admin privileges to the repository. + */ + @JsonProperty(value = "repositoryToken") + private String repositoryToken; + + /* + * Determines whether the repository should be updated with the new + * properties. + */ + @JsonProperty(value = "shouldUpdateRepository") + private Boolean shouldUpdateRepository; + + /** + * Get the repositoryToken property: The token which proves admin privileges to the repository. + * + * @return the repositoryToken value. + */ + public String repositoryToken() { + return this.repositoryToken; + } + + /** + * Set the repositoryToken property: The token which proves admin privileges to the repository. + * + * @param repositoryToken the repositoryToken value to set. + * @return the StaticSiteResetPropertiesArmResourceProperties object itself. + */ + public StaticSiteResetPropertiesArmResourceProperties withRepositoryToken(String repositoryToken) { + this.repositoryToken = repositoryToken; + return this; + } + + /** + * Get the shouldUpdateRepository property: Determines whether the repository should be updated with the new + * properties. + * + * @return the shouldUpdateRepository value. + */ + public Boolean shouldUpdateRepository() { + return this.shouldUpdateRepository; + } + + /** + * Set the shouldUpdateRepository property: Determines whether the repository should be updated with the new + * properties. + * + * @param shouldUpdateRepository the shouldUpdateRepository value to set. + * @return the StaticSiteResetPropertiesArmResourceProperties object itself. + */ + public StaticSiteResetPropertiesArmResourceProperties withShouldUpdateRepository(Boolean shouldUpdateRepository) { + this.shouldUpdateRepository = shouldUpdateRepository; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserArmResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserArmResourceInner.java new file mode 100644 index 0000000000000..3bec8bb0eb7b4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserArmResourceInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Static Site User ARM resource. */ +@Fluent +public final class StaticSiteUserArmResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteUserArmResourceInner.class); + + /* + * StaticSiteUserARMResource resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSiteUserArmResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteUserARMResource resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteUserArmResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteUserArmResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the provider property: The identity provider for the static site user. + * + * @return the provider value. + */ + public String provider() { + return this.innerProperties() == null ? null : this.innerProperties().provider(); + } + + /** + * Get the userId property: The user id for the static site user. + * + * @return the userId value. + */ + public String userId() { + return this.innerProperties() == null ? null : this.innerProperties().userId(); + } + + /** + * Get the displayName property: The display name for the static site user. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Get the roles property: The roles for the static site user, in free-form string format. + * + * @return the roles value. + */ + public String roles() { + return this.innerProperties() == null ? null : this.innerProperties().roles(); + } + + /** + * Set the roles property: The roles for the static site user, in free-form string format. + * + * @param roles the roles value to set. + * @return the StaticSiteUserArmResourceInner object itself. + */ + public StaticSiteUserArmResourceInner withRoles(String roles) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserArmResourceProperties(); + } + this.innerProperties().withRoles(roles); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserArmResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserArmResourceProperties.java new file mode 100644 index 0000000000000..c6c1f57f2927a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserArmResourceProperties.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StaticSiteUserARMResource resource specific properties. */ +@Fluent +public final class StaticSiteUserArmResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteUserArmResourceProperties.class); + + /* + * The identity provider for the static site user. + */ + @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) + private String provider; + + /* + * The user id for the static site user. + */ + @JsonProperty(value = "userId", access = JsonProperty.Access.WRITE_ONLY) + private String userId; + + /* + * The display name for the static site user. + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /* + * The roles for the static site user, in free-form string format + */ + @JsonProperty(value = "roles") + private String roles; + + /** + * Get the provider property: The identity provider for the static site user. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Get the userId property: The user id for the static site user. + * + * @return the userId value. + */ + public String userId() { + return this.userId; + } + + /** + * Get the displayName property: The display name for the static site user. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the roles property: The roles for the static site user, in free-form string format. + * + * @return the roles value. + */ + public String roles() { + return this.roles; + } + + /** + * Set the roles property: The roles for the static site user, in free-form string format. + * + * @param roles the roles value to set. + * @return the StaticSiteUserArmResourceProperties object itself. + */ + public StaticSiteUserArmResourceProperties withRoles(String roles) { + this.roles = roles; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationRequestResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationRequestResourceProperties.java new file mode 100644 index 0000000000000..81fe01fb1e4d7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationRequestResourceProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StaticSiteUserInvitationRequestResource resource specific properties. */ +@Fluent +public final class StaticSiteUserInvitationRequestResourceProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteUserInvitationRequestResourceProperties.class); + + /* + * The domain name for the static site custom domain. + */ + @JsonProperty(value = "domain") + private String domain; + + /* + * The identity provider for the static site user. + */ + @JsonProperty(value = "provider") + private String provider; + + /* + * The user id for the static site user. + */ + @JsonProperty(value = "userDetails") + private String userDetails; + + /* + * The roles for the static site user, in free-form string format + */ + @JsonProperty(value = "roles") + private String roles; + + /* + * The number of hours the sas token stays valid + */ + @JsonProperty(value = "numHoursToExpiration") + private Integer numHoursToExpiration; + + /** + * Get the domain property: The domain name for the static site custom domain. + * + * @return the domain value. + */ + public String domain() { + return this.domain; + } + + /** + * Set the domain property: The domain name for the static site custom domain. + * + * @param domain the domain value to set. + * @return the StaticSiteUserInvitationRequestResourceProperties object itself. + */ + public StaticSiteUserInvitationRequestResourceProperties withDomain(String domain) { + this.domain = domain; + return this; + } + + /** + * Get the provider property: The identity provider for the static site user. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: The identity provider for the static site user. + * + * @param provider the provider value to set. + * @return the StaticSiteUserInvitationRequestResourceProperties object itself. + */ + public StaticSiteUserInvitationRequestResourceProperties withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the userDetails property: The user id for the static site user. + * + * @return the userDetails value. + */ + public String userDetails() { + return this.userDetails; + } + + /** + * Set the userDetails property: The user id for the static site user. + * + * @param userDetails the userDetails value to set. + * @return the StaticSiteUserInvitationRequestResourceProperties object itself. + */ + public StaticSiteUserInvitationRequestResourceProperties withUserDetails(String userDetails) { + this.userDetails = userDetails; + return this; + } + + /** + * Get the roles property: The roles for the static site user, in free-form string format. + * + * @return the roles value. + */ + public String roles() { + return this.roles; + } + + /** + * Set the roles property: The roles for the static site user, in free-form string format. + * + * @param roles the roles value to set. + * @return the StaticSiteUserInvitationRequestResourceProperties object itself. + */ + public StaticSiteUserInvitationRequestResourceProperties withRoles(String roles) { + this.roles = roles; + return this; + } + + /** + * Get the numHoursToExpiration property: The number of hours the sas token stays valid. + * + * @return the numHoursToExpiration value. + */ + public Integer numHoursToExpiration() { + return this.numHoursToExpiration; + } + + /** + * Set the numHoursToExpiration property: The number of hours the sas token stays valid. + * + * @param numHoursToExpiration the numHoursToExpiration value to set. + * @return the StaticSiteUserInvitationRequestResourceProperties object itself. + */ + public StaticSiteUserInvitationRequestResourceProperties withNumHoursToExpiration(Integer numHoursToExpiration) { + this.numHoursToExpiration = numHoursToExpiration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationResponseResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationResponseResourceInner.java new file mode 100644 index 0000000000000..fff4c20879a4e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationResponseResourceInner.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Static sites user roles invitation link resource. */ +@Fluent +public final class StaticSiteUserInvitationResponseResourceInner extends ProxyOnlyResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteUserInvitationResponseResourceInner.class); + + /* + * StaticSiteUserInvitationResponseResource resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSiteUserInvitationResponseResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteUserInvitationResponseResource resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteUserInvitationResponseResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteUserInvitationResponseResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the expiresOn property: The expiration time of the invitation. + * + * @return the expiresOn value. + */ + public OffsetDateTime expiresOn() { + return this.innerProperties() == null ? null : this.innerProperties().expiresOn(); + } + + /** + * Get the invitationUrl property: The url for the invitation link. + * + * @return the invitationUrl value. + */ + public String invitationUrl() { + return this.innerProperties() == null ? null : this.innerProperties().invitationUrl(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationResponseResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationResponseResourceProperties.java new file mode 100644 index 0000000000000..2db805823329f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserInvitationResponseResourceProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** StaticSiteUserInvitationResponseResource resource specific properties. */ +@Immutable +public final class StaticSiteUserInvitationResponseResourceProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteUserInvitationResponseResourceProperties.class); + + /* + * The expiration time of the invitation + */ + @JsonProperty(value = "expiresOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expiresOn; + + /* + * The url for the invitation link + */ + @JsonProperty(value = "invitationUrl", access = JsonProperty.Access.WRITE_ONLY) + private String invitationUrl; + + /** + * Get the expiresOn property: The expiration time of the invitation. + * + * @return the expiresOn value. + */ + public OffsetDateTime expiresOn() { + return this.expiresOn; + } + + /** + * Get the invitationUrl property: The url for the invitation link. + * + * @return the invitationUrl value. + */ + public String invitationUrl() { + return this.invitationUrl; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppArmResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppArmResourceInner.java new file mode 100644 index 0000000000000..6682178a85e70 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppArmResourceInner.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Static Site User Provided Function App ARM resource. */ +@Fluent +public final class StaticSiteUserProvidedFunctionAppArmResourceInner extends ProxyOnlyResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteUserProvidedFunctionAppArmResourceInner.class); + + /* + * StaticSiteUserProvidedFunctionAppARMResource resource specific + * properties + */ + @JsonProperty(value = "properties") + private StaticSiteUserProvidedFunctionAppArmResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteUserProvidedFunctionAppARMResource resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteUserProvidedFunctionAppArmResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteUserProvidedFunctionAppArmResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @return the functionAppResourceId value. + */ + public String functionAppResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().functionAppResourceId(); + } + + /** + * Set the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @param functionAppResourceId the functionAppResourceId value to set. + * @return the StaticSiteUserProvidedFunctionAppArmResourceInner object itself. + */ + public StaticSiteUserProvidedFunctionAppArmResourceInner withFunctionAppResourceId(String functionAppResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserProvidedFunctionAppArmResourceProperties(); + } + this.innerProperties().withFunctionAppResourceId(functionAppResourceId); + return this; + } + + /** + * Get the functionAppRegion property: The region of the function app registered with the static site. + * + * @return the functionAppRegion value. + */ + public String functionAppRegion() { + return this.innerProperties() == null ? null : this.innerProperties().functionAppRegion(); + } + + /** + * Set the functionAppRegion property: The region of the function app registered with the static site. + * + * @param functionAppRegion the functionAppRegion value to set. + * @return the StaticSiteUserProvidedFunctionAppArmResourceInner object itself. + */ + public StaticSiteUserProvidedFunctionAppArmResourceInner withFunctionAppRegion(String functionAppRegion) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserProvidedFunctionAppArmResourceProperties(); + } + this.innerProperties().withFunctionAppRegion(functionAppRegion); + return this; + } + + /** + * Get the createdOn property: The date and time on which the function app was registered with the static site. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.innerProperties() == null ? null : this.innerProperties().createdOn(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppArmResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppArmResourceProperties.java new file mode 100644 index 0000000000000..b78d79eb22625 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppArmResourceProperties.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** StaticSiteUserProvidedFunctionAppARMResource resource specific properties. */ +@Fluent +public final class StaticSiteUserProvidedFunctionAppArmResourceProperties { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteUserProvidedFunctionAppArmResourceProperties.class); + + /* + * The resource id of the function app registered with the static site + */ + @JsonProperty(value = "functionAppResourceId") + private String functionAppResourceId; + + /* + * The region of the function app registered with the static site + */ + @JsonProperty(value = "functionAppRegion") + private String functionAppRegion; + + /* + * The date and time on which the function app was registered with the + * static site. + */ + @JsonProperty(value = "createdOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdOn; + + /** + * Get the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @return the functionAppResourceId value. + */ + public String functionAppResourceId() { + return this.functionAppResourceId; + } + + /** + * Set the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @param functionAppResourceId the functionAppResourceId value to set. + * @return the StaticSiteUserProvidedFunctionAppArmResourceProperties object itself. + */ + public StaticSiteUserProvidedFunctionAppArmResourceProperties withFunctionAppResourceId( + String functionAppResourceId) { + this.functionAppResourceId = functionAppResourceId; + return this; + } + + /** + * Get the functionAppRegion property: The region of the function app registered with the static site. + * + * @return the functionAppRegion value. + */ + public String functionAppRegion() { + return this.functionAppRegion; + } + + /** + * Set the functionAppRegion property: The region of the function app registered with the static site. + * + * @param functionAppRegion the functionAppRegion value to set. + * @return the StaticSiteUserProvidedFunctionAppArmResourceProperties object itself. + */ + public StaticSiteUserProvidedFunctionAppArmResourceProperties withFunctionAppRegion(String functionAppRegion) { + this.functionAppRegion = functionAppRegion; + return this; + } + + /** + * Get the createdOn property: The date and time on which the function app was registered with the static site. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.createdOn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppProperties.java new file mode 100644 index 0000000000000..fb108de226ca3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteUserProvidedFunctionAppProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** StaticSiteUserProvidedFunctionApp resource specific properties. */ +@Fluent +public final class StaticSiteUserProvidedFunctionAppProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteUserProvidedFunctionAppProperties.class); + + /* + * The resource id of the function app registered with the static site + */ + @JsonProperty(value = "functionAppResourceId") + private String functionAppResourceId; + + /* + * The region of the function app registered with the static site + */ + @JsonProperty(value = "functionAppRegion") + private String functionAppRegion; + + /* + * The date and time on which the function app was registered with the + * static site. + */ + @JsonProperty(value = "createdOn", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdOn; + + /** + * Get the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @return the functionAppResourceId value. + */ + public String functionAppResourceId() { + return this.functionAppResourceId; + } + + /** + * Set the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @param functionAppResourceId the functionAppResourceId value to set. + * @return the StaticSiteUserProvidedFunctionAppProperties object itself. + */ + public StaticSiteUserProvidedFunctionAppProperties withFunctionAppResourceId(String functionAppResourceId) { + this.functionAppResourceId = functionAppResourceId; + return this; + } + + /** + * Get the functionAppRegion property: The region of the function app registered with the static site. + * + * @return the functionAppRegion value. + */ + public String functionAppRegion() { + return this.functionAppRegion; + } + + /** + * Set the functionAppRegion property: The region of the function app registered with the static site. + * + * @param functionAppRegion the functionAppRegion value to set. + * @return the StaticSiteUserProvidedFunctionAppProperties object itself. + */ + public StaticSiteUserProvidedFunctionAppProperties withFunctionAppRegion(String functionAppRegion) { + this.functionAppRegion = functionAppRegion; + return this; + } + + /** + * Get the createdOn property: The date and time on which the function app was registered with the static site. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.createdOn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteZipDeployment.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteZipDeployment.java new file mode 100644 index 0000000000000..54e2cd3fb2011 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSiteZipDeployment.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A static site zip deployment. */ +@Fluent +public final class StaticSiteZipDeployment { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteZipDeployment.class); + + /* + * URL for the zipped app content + */ + @JsonProperty(value = "appZipUrl") + private String appZipUrl; + + /* + * URL for the zipped api content + */ + @JsonProperty(value = "apiZipUrl") + private String apiZipUrl; + + /* + * A title to label the deployment + */ + @JsonProperty(value = "deploymentTitle") + private String deploymentTitle; + + /* + * The provider submitting this deployment + */ + @JsonProperty(value = "provider") + private String provider; + + /* + * The language of the api content, if it exists + */ + @JsonProperty(value = "functionLanguage") + private String functionLanguage; + + /** + * Get the appZipUrl property: URL for the zipped app content. + * + * @return the appZipUrl value. + */ + public String appZipUrl() { + return this.appZipUrl; + } + + /** + * Set the appZipUrl property: URL for the zipped app content. + * + * @param appZipUrl the appZipUrl value to set. + * @return the StaticSiteZipDeployment object itself. + */ + public StaticSiteZipDeployment withAppZipUrl(String appZipUrl) { + this.appZipUrl = appZipUrl; + return this; + } + + /** + * Get the apiZipUrl property: URL for the zipped api content. + * + * @return the apiZipUrl value. + */ + public String apiZipUrl() { + return this.apiZipUrl; + } + + /** + * Set the apiZipUrl property: URL for the zipped api content. + * + * @param apiZipUrl the apiZipUrl value to set. + * @return the StaticSiteZipDeployment object itself. + */ + public StaticSiteZipDeployment withApiZipUrl(String apiZipUrl) { + this.apiZipUrl = apiZipUrl; + return this; + } + + /** + * Get the deploymentTitle property: A title to label the deployment. + * + * @return the deploymentTitle value. + */ + public String deploymentTitle() { + return this.deploymentTitle; + } + + /** + * Set the deploymentTitle property: A title to label the deployment. + * + * @param deploymentTitle the deploymentTitle value to set. + * @return the StaticSiteZipDeployment object itself. + */ + public StaticSiteZipDeployment withDeploymentTitle(String deploymentTitle) { + this.deploymentTitle = deploymentTitle; + return this; + } + + /** + * Get the provider property: The provider submitting this deployment. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: The provider submitting this deployment. + * + * @param provider the provider value to set. + * @return the StaticSiteZipDeployment object itself. + */ + public StaticSiteZipDeployment withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the functionLanguage property: The language of the api content, if it exists. + * + * @return the functionLanguage value. + */ + public String functionLanguage() { + return this.functionLanguage; + } + + /** + * Set the functionLanguage property: The language of the api content, if it exists. + * + * @param functionLanguage the functionLanguage value to set. + * @return the StaticSiteZipDeployment object itself. + */ + public StaticSiteZipDeployment withFunctionLanguage(String functionLanguage) { + this.functionLanguage = functionLanguage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewInner.java new file mode 100644 index 0000000000000..a80fd0dd3b666 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Preview for the Static Site Workflow to be generated. */ +@Fluent +public final class StaticSitesWorkflowPreviewInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSitesWorkflowPreviewInner.class); + + /* + * StaticSitesWorkflowPreview resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSitesWorkflowPreviewProperties innerProperties; + + /** + * Get the innerProperties property: StaticSitesWorkflowPreview resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSitesWorkflowPreviewProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSitesWorkflowPreviewInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the path property: The path for the workflow file to be generated. + * + * @return the path value. + */ + public String path() { + return this.innerProperties() == null ? null : this.innerProperties().path(); + } + + /** + * Get the contents property: The contents for the workflow file to be generated. + * + * @return the contents value. + */ + public String contents() { + return this.innerProperties() == null ? null : this.innerProperties().contents(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewProperties.java new file mode 100644 index 0000000000000..8e0cf02c8d581 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StaticSitesWorkflowPreview resource specific properties. */ +@Immutable +public final class StaticSitesWorkflowPreviewProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSitesWorkflowPreviewProperties.class); + + /* + * The path for the workflow file to be generated + */ + @JsonProperty(value = "path", access = JsonProperty.Access.WRITE_ONLY) + private String path; + + /* + * The contents for the workflow file to be generated + */ + @JsonProperty(value = "contents", access = JsonProperty.Access.WRITE_ONLY) + private String contents; + + /** + * Get the path property: The path for the workflow file to be generated. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Get the contents property: The contents for the workflow file to be generated. + * + * @return the contents value. + */ + public String contents() { + return this.contents; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewRequestProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewRequestProperties.java new file mode 100644 index 0000000000000..027eae047051d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StaticSitesWorkflowPreviewRequestProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StaticSitesWorkflowPreviewRequest resource specific properties. */ +@Fluent +public final class StaticSitesWorkflowPreviewRequestProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSitesWorkflowPreviewRequestProperties.class); + + /* + * URL for the repository of the static site. + */ + @JsonProperty(value = "repositoryUrl") + private String repositoryUrl; + + /* + * The target branch in the repository. + */ + @JsonProperty(value = "branch") + private String branch; + + /* + * Build properties to configure on the repository. + */ + @JsonProperty(value = "buildProperties") + private StaticSiteBuildProperties buildProperties; + + /** + * Get the repositoryUrl property: URL for the repository of the static site. + * + * @return the repositoryUrl value. + */ + public String repositoryUrl() { + return this.repositoryUrl; + } + + /** + * Set the repositoryUrl property: URL for the repository of the static site. + * + * @param repositoryUrl the repositoryUrl value to set. + * @return the StaticSitesWorkflowPreviewRequestProperties object itself. + */ + public StaticSitesWorkflowPreviewRequestProperties withRepositoryUrl(String repositoryUrl) { + this.repositoryUrl = repositoryUrl; + return this; + } + + /** + * Get the branch property: The target branch in the repository. + * + * @return the branch value. + */ + public String branch() { + return this.branch; + } + + /** + * Set the branch property: The target branch in the repository. + * + * @param branch the branch value to set. + * @return the StaticSitesWorkflowPreviewRequestProperties object itself. + */ + public StaticSitesWorkflowPreviewRequestProperties withBranch(String branch) { + this.branch = branch; + return this; + } + + /** + * Get the buildProperties property: Build properties to configure on the repository. + * + * @return the buildProperties value. + */ + public StaticSiteBuildProperties buildProperties() { + return this.buildProperties; + } + + /** + * Set the buildProperties property: Build properties to configure on the repository. + * + * @param buildProperties the buildProperties value to set. + * @return the StaticSitesWorkflowPreviewRequestProperties object itself. + */ + public StaticSitesWorkflowPreviewRequestProperties withBuildProperties(StaticSiteBuildProperties buildProperties) { + this.buildProperties = buildProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (buildProperties() != null) { + buildProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationOptionsProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationOptionsProperties.java new file mode 100644 index 0000000000000..4a7f928ad501a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationOptionsProperties.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StorageMigrationOptions resource specific properties. */ +@Fluent +public final class StorageMigrationOptionsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageMigrationOptionsProperties.class); + + /* + * AzureFiles connection string. + */ + @JsonProperty(value = "azurefilesConnectionString", required = true) + private String azurefilesConnectionString; + + /* + * AzureFiles share. + */ + @JsonProperty(value = "azurefilesShare", required = true) + private String azurefilesShare; + + /* + * trueif the app should be switched over; otherwise, + * false. + */ + @JsonProperty(value = "switchSiteAfterMigration") + private Boolean switchSiteAfterMigration; + + /* + * true if the app should be read only during copy operation; + * otherwise, false. + */ + @JsonProperty(value = "blockWriteAccessToSite") + private Boolean blockWriteAccessToSite; + + /** + * Get the azurefilesConnectionString property: AzureFiles connection string. + * + * @return the azurefilesConnectionString value. + */ + public String azurefilesConnectionString() { + return this.azurefilesConnectionString; + } + + /** + * Set the azurefilesConnectionString property: AzureFiles connection string. + * + * @param azurefilesConnectionString the azurefilesConnectionString value to set. + * @return the StorageMigrationOptionsProperties object itself. + */ + public StorageMigrationOptionsProperties withAzurefilesConnectionString(String azurefilesConnectionString) { + this.azurefilesConnectionString = azurefilesConnectionString; + return this; + } + + /** + * Get the azurefilesShare property: AzureFiles share. + * + * @return the azurefilesShare value. + */ + public String azurefilesShare() { + return this.azurefilesShare; + } + + /** + * Set the azurefilesShare property: AzureFiles share. + * + * @param azurefilesShare the azurefilesShare value to set. + * @return the StorageMigrationOptionsProperties object itself. + */ + public StorageMigrationOptionsProperties withAzurefilesShare(String azurefilesShare) { + this.azurefilesShare = azurefilesShare; + return this; + } + + /** + * Get the switchSiteAfterMigration property: <code>true</code>if the app should be switched over; + * otherwise, <code>false</code>. + * + * @return the switchSiteAfterMigration value. + */ + public Boolean switchSiteAfterMigration() { + return this.switchSiteAfterMigration; + } + + /** + * Set the switchSiteAfterMigration property: <code>true</code>if the app should be switched over; + * otherwise, <code>false</code>. + * + * @param switchSiteAfterMigration the switchSiteAfterMigration value to set. + * @return the StorageMigrationOptionsProperties object itself. + */ + public StorageMigrationOptionsProperties withSwitchSiteAfterMigration(Boolean switchSiteAfterMigration) { + this.switchSiteAfterMigration = switchSiteAfterMigration; + return this; + } + + /** + * Get the blockWriteAccessToSite property: <code>true</code> if the app should be read only during copy + * operation; otherwise, <code>false</code>. + * + * @return the blockWriteAccessToSite value. + */ + public Boolean blockWriteAccessToSite() { + return this.blockWriteAccessToSite; + } + + /** + * Set the blockWriteAccessToSite property: <code>true</code> if the app should be read only during copy + * operation; otherwise, <code>false</code>. + * + * @param blockWriteAccessToSite the blockWriteAccessToSite value to set. + * @return the StorageMigrationOptionsProperties object itself. + */ + public StorageMigrationOptionsProperties withBlockWriteAccessToSite(Boolean blockWriteAccessToSite) { + this.blockWriteAccessToSite = blockWriteAccessToSite; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azurefilesConnectionString() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property azurefilesConnectionString in model" + + " StorageMigrationOptionsProperties")); + } + if (azurefilesShare() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property azurefilesShare in model StorageMigrationOptionsProperties")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationResponseInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationResponseInner.java new file mode 100644 index 0000000000000..a8dc1477b67dc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationResponseInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Response for a migration of app content request. */ +@Fluent +public final class StorageMigrationResponseInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageMigrationResponseInner.class); + + /* + * StorageMigrationResponse resource specific properties + */ + @JsonProperty(value = "properties") + private StorageMigrationResponseProperties innerProperties; + + /** + * Get the innerProperties property: StorageMigrationResponse resource specific properties. + * + * @return the innerProperties value. + */ + private StorageMigrationResponseProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StorageMigrationResponseInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the operationId property: When server starts the migration process, it will return an operation ID + * identifying that particular migration operation. + * + * @return the operationId value. + */ + public String operationId() { + return this.innerProperties() == null ? null : this.innerProperties().operationId(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationResponseProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationResponseProperties.java new file mode 100644 index 0000000000000..8c58955375a32 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StorageMigrationResponseProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** StorageMigrationResponse resource specific properties. */ +@Immutable +public final class StorageMigrationResponseProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageMigrationResponseProperties.class); + + /* + * When server starts the migration process, it will return an operation ID + * identifying that particular migration operation. + */ + @JsonProperty(value = "operationId", access = JsonProperty.Access.WRITE_ONLY) + private String operationId; + + /** + * Get the operationId property: When server starts the migration process, it will return an operation ID + * identifying that particular migration operation. + * + * @return the operationId value. + */ + public String operationId() { + return this.operationId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StringDictionaryInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StringDictionaryInner.java new file mode 100644 index 0000000000000..60f513267b8c5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StringDictionaryInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** String dictionary resource. */ +@Fluent +public final class StringDictionaryInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StringDictionaryInner.class); + + /* + * Settings. + */ + @JsonProperty(value = "properties") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map properties; + + /** + * Get the properties property: Settings. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Settings. + * + * @param properties the properties value to set. + * @return the StringDictionaryInner object itself. + */ + public StringDictionaryInner withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringDictionaryInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StringListInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StringListInner.java new file mode 100644 index 0000000000000..45f5f97358176 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/StringListInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** String list resource. */ +@Fluent +public final class StringListInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StringListInner.class); + + /* + * List of string resources. + */ + @JsonProperty(value = "properties") + private List properties; + + /** + * Get the properties property: List of string resources. + * + * @return the properties value. + */ + public List properties() { + return this.properties; + } + + /** + * Set the properties property: List of string resources. + * + * @param properties the properties value to set. + * @return the StringListInner object itself. + */ + public StringListInner withProperties(List properties) { + this.properties = properties; + return this; + } + + /** {@inheritDoc} */ + @Override + public StringListInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SwiftVirtualNetworkInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SwiftVirtualNetworkInner.java new file mode 100644 index 0000000000000..8b532fd00050e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SwiftVirtualNetworkInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Swift Virtual Network Contract. This is used to enable the new Swift way of doing virtual network integration. */ +@Fluent +public final class SwiftVirtualNetworkInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SwiftVirtualNetworkInner.class); + + /* + * SwiftVirtualNetwork resource specific properties + */ + @JsonProperty(value = "properties") + private SwiftVirtualNetworkProperties innerProperties; + + /** + * Get the innerProperties property: SwiftVirtualNetwork resource specific properties. + * + * @return the innerProperties value. + */ + private SwiftVirtualNetworkProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SwiftVirtualNetworkInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the subnetResourceId property: The Virtual Network subnet's resource ID. This is the subnet that this Web App + * will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().subnetResourceId(); + } + + /** + * Set the subnetResourceId property: The Virtual Network subnet's resource ID. This is the subnet that this Web App + * will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the SwiftVirtualNetworkInner object itself. + */ + public SwiftVirtualNetworkInner withSubnetResourceId(String subnetResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new SwiftVirtualNetworkProperties(); + } + this.innerProperties().withSubnetResourceId(subnetResourceId); + return this; + } + + /** + * Get the swiftSupported property: A flag that specifies if the scale unit this Web App is on supports Swift + * integration. + * + * @return the swiftSupported value. + */ + public Boolean swiftSupported() { + return this.innerProperties() == null ? null : this.innerProperties().swiftSupported(); + } + + /** + * Set the swiftSupported property: A flag that specifies if the scale unit this Web App is on supports Swift + * integration. + * + * @param swiftSupported the swiftSupported value to set. + * @return the SwiftVirtualNetworkInner object itself. + */ + public SwiftVirtualNetworkInner withSwiftSupported(Boolean swiftSupported) { + if (this.innerProperties() == null) { + this.innerProperties = new SwiftVirtualNetworkProperties(); + } + this.innerProperties().withSwiftSupported(swiftSupported); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SwiftVirtualNetworkProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SwiftVirtualNetworkProperties.java new file mode 100644 index 0000000000000..42d4782502645 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/SwiftVirtualNetworkProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SwiftVirtualNetwork resource specific properties. */ +@Fluent +public final class SwiftVirtualNetworkProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SwiftVirtualNetworkProperties.class); + + /* + * The Virtual Network subnet's resource ID. This is the subnet that this + * Web App will join. This subnet must have a delegation to + * Microsoft.Web/serverFarms defined first. + */ + @JsonProperty(value = "subnetResourceId") + private String subnetResourceId; + + /* + * A flag that specifies if the scale unit this Web App is on supports + * Swift integration. + */ + @JsonProperty(value = "swiftSupported") + private Boolean swiftSupported; + + /** + * Get the subnetResourceId property: The Virtual Network subnet's resource ID. This is the subnet that this Web App + * will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.subnetResourceId; + } + + /** + * Set the subnetResourceId property: The Virtual Network subnet's resource ID. This is the subnet that this Web App + * will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the SwiftVirtualNetworkProperties object itself. + */ + public SwiftVirtualNetworkProperties withSubnetResourceId(String subnetResourceId) { + this.subnetResourceId = subnetResourceId; + return this; + } + + /** + * Get the swiftSupported property: A flag that specifies if the scale unit this Web App is on supports Swift + * integration. + * + * @return the swiftSupported value. + */ + public Boolean swiftSupported() { + return this.swiftSupported; + } + + /** + * Set the swiftSupported property: A flag that specifies if the scale unit this Web App is on supports Swift + * integration. + * + * @param swiftSupported the swiftSupported value to set. + * @return the SwiftVirtualNetworkProperties object itself. + */ + public SwiftVirtualNetworkProperties withSwiftSupported(Boolean swiftSupported) { + this.swiftSupported = swiftSupported; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TldLegalAgreementInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TldLegalAgreementInner.java new file mode 100644 index 0000000000000..946827d85c400 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TldLegalAgreementInner.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Legal agreement for a top level domain. */ +@Fluent +public final class TldLegalAgreementInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TldLegalAgreementInner.class); + + /* + * Unique identifier for the agreement. + */ + @JsonProperty(value = "agreementKey", required = true) + private String agreementKey; + + /* + * Agreement title. + */ + @JsonProperty(value = "title", required = true) + private String title; + + /* + * Agreement details. + */ + @JsonProperty(value = "content", required = true) + private String content; + + /* + * URL where a copy of the agreement details is hosted. + */ + @JsonProperty(value = "url") + private String url; + + /** + * Get the agreementKey property: Unique identifier for the agreement. + * + * @return the agreementKey value. + */ + public String agreementKey() { + return this.agreementKey; + } + + /** + * Set the agreementKey property: Unique identifier for the agreement. + * + * @param agreementKey the agreementKey value to set. + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withAgreementKey(String agreementKey) { + this.agreementKey = agreementKey; + return this; + } + + /** + * Get the title property: Agreement title. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Agreement title. + * + * @param title the title value to set. + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the content property: Agreement details. + * + * @return the content value. + */ + public String content() { + return this.content; + } + + /** + * Set the content property: Agreement details. + * + * @param content the content value to set. + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withContent(String content) { + this.content = content; + return this; + } + + /** + * Get the url property: URL where a copy of the agreement details is hosted. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: URL where a copy of the agreement details is hosted. + * + * @param url the url value to set. + * @return the TldLegalAgreementInner object itself. + */ + public TldLegalAgreementInner withUrl(String url) { + this.url = url; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (agreementKey() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property agreementKey in model TldLegalAgreementInner")); + } + if (title() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property title in model TldLegalAgreementInner")); + } + if (content() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property content in model TldLegalAgreementInner")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TopLevelDomainInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TopLevelDomainInner.java new file mode 100644 index 0000000000000..02c965576586e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TopLevelDomainInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A top level domain object. */ +@Fluent +public final class TopLevelDomainInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopLevelDomainInner.class); + + /* + * TopLevelDomain resource specific properties + */ + @JsonProperty(value = "properties") + private TopLevelDomainProperties innerProperties; + + /** + * Get the innerProperties property: TopLevelDomain resource specific properties. + * + * @return the innerProperties value. + */ + private TopLevelDomainProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public TopLevelDomainInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the privacy property: If <code>true</code>, then the top level domain supports domain privacy; + * otherwise, <code>false</code>. + * + * @return the privacy value. + */ + public Boolean privacy() { + return this.innerProperties() == null ? null : this.innerProperties().privacy(); + } + + /** + * Set the privacy property: If <code>true</code>, then the top level domain supports domain privacy; + * otherwise, <code>false</code>. + * + * @param privacy the privacy value to set. + * @return the TopLevelDomainInner object itself. + */ + public TopLevelDomainInner withPrivacy(Boolean privacy) { + if (this.innerProperties() == null) { + this.innerProperties = new TopLevelDomainProperties(); + } + this.innerProperties().withPrivacy(privacy); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TopLevelDomainProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TopLevelDomainProperties.java new file mode 100644 index 0000000000000..ce647916ef27e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TopLevelDomainProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** TopLevelDomain resource specific properties. */ +@Fluent +public final class TopLevelDomainProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopLevelDomainProperties.class); + + /* + * If true, then the top level domain supports domain privacy; + * otherwise, false. + */ + @JsonProperty(value = "privacy") + private Boolean privacy; + + /** + * Get the privacy property: If <code>true</code>, then the top level domain supports domain privacy; + * otherwise, <code>false</code>. + * + * @return the privacy value. + */ + public Boolean privacy() { + return this.privacy; + } + + /** + * Set the privacy property: If <code>true</code>, then the top level domain supports domain privacy; + * otherwise, <code>false</code>. + * + * @param privacy the privacy value to set. + * @return the TopLevelDomainProperties object itself. + */ + public TopLevelDomainProperties withPrivacy(Boolean privacy) { + this.privacy = privacy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredJobHistoryInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredJobHistoryInner.java new file mode 100644 index 0000000000000..16af6d279e661 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredJobHistoryInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobRun; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Triggered Web Job History. List of Triggered Web Job Run Information elements. */ +@Fluent +public final class TriggeredJobHistoryInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggeredJobHistoryInner.class); + + /* + * TriggeredJobHistory resource specific properties + */ + @JsonProperty(value = "properties") + private TriggeredJobHistoryProperties innerProperties; + + /** + * Get the innerProperties property: TriggeredJobHistory resource specific properties. + * + * @return the innerProperties value. + */ + private TriggeredJobHistoryProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public TriggeredJobHistoryInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the runs property: List of triggered web job runs. + * + * @return the runs value. + */ + public List runs() { + return this.innerProperties() == null ? null : this.innerProperties().runs(); + } + + /** + * Set the runs property: List of triggered web job runs. + * + * @param runs the runs value to set. + * @return the TriggeredJobHistoryInner object itself. + */ + public TriggeredJobHistoryInner withRuns(List runs) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredJobHistoryProperties(); + } + this.innerProperties().withRuns(runs); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredJobHistoryProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredJobHistoryProperties.java new file mode 100644 index 0000000000000..5522d4acf9717 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredJobHistoryProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobRun; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** TriggeredJobHistory resource specific properties. */ +@Fluent +public final class TriggeredJobHistoryProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggeredJobHistoryProperties.class); + + /* + * List of triggered web job runs. + */ + @JsonProperty(value = "runs") + private List runs; + + /** + * Get the runs property: List of triggered web job runs. + * + * @return the runs value. + */ + public List runs() { + return this.runs; + } + + /** + * Set the runs property: List of triggered web job runs. + * + * @param runs the runs value to set. + * @return the TriggeredJobHistoryProperties object itself. + */ + public TriggeredJobHistoryProperties withRuns(List runs) { + this.runs = runs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (runs() != null) { + runs().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredWebJobInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredWebJobInner.java new file mode 100644 index 0000000000000..a683b732c5314 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredWebJobInner.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobRun; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Triggered Web Job Information. */ +@Fluent +public final class TriggeredWebJobInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggeredWebJobInner.class); + + /* + * TriggeredWebJob resource specific properties + */ + @JsonProperty(value = "properties") + private TriggeredWebJobProperties innerProperties; + + /** + * Get the innerProperties property: TriggeredWebJob resource specific properties. + * + * @return the innerProperties value. + */ + private TriggeredWebJobProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public TriggeredWebJobInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the latestRun property: Latest job run information. + * + * @return the latestRun value. + */ + public TriggeredJobRun latestRun() { + return this.innerProperties() == null ? null : this.innerProperties().latestRun(); + } + + /** + * Set the latestRun property: Latest job run information. + * + * @param latestRun the latestRun value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withLatestRun(TriggeredJobRun latestRun) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withLatestRun(latestRun); + return this; + } + + /** + * Get the historyUrl property: History URL. + * + * @return the historyUrl value. + */ + public String historyUrl() { + return this.innerProperties() == null ? null : this.innerProperties().historyUrl(); + } + + /** + * Set the historyUrl property: History URL. + * + * @param historyUrl the historyUrl value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withHistoryUrl(String historyUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withHistoryUrl(historyUrl); + return this; + } + + /** + * Get the schedulerLogsUrl property: Scheduler Logs URL. + * + * @return the schedulerLogsUrl value. + */ + public String schedulerLogsUrl() { + return this.innerProperties() == null ? null : this.innerProperties().schedulerLogsUrl(); + } + + /** + * Set the schedulerLogsUrl property: Scheduler Logs URL. + * + * @param schedulerLogsUrl the schedulerLogsUrl value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withSchedulerLogsUrl(String schedulerLogsUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withSchedulerLogsUrl(schedulerLogsUrl); + return this; + } + + /** + * Get the runCommand property: Run command. + * + * @return the runCommand value. + */ + public String runCommand() { + return this.innerProperties() == null ? null : this.innerProperties().runCommand(); + } + + /** + * Set the runCommand property: Run command. + * + * @param runCommand the runCommand value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withRunCommand(String runCommand) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withRunCommand(runCommand); + return this; + } + + /** + * Get the url property: Job URL. + * + * @return the url value. + */ + public String url() { + return this.innerProperties() == null ? null : this.innerProperties().url(); + } + + /** + * Set the url property: Job URL. + * + * @param url the url value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withUrl(String url) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withUrl(url); + return this; + } + + /** + * Get the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + public String extraInfoUrl() { + return this.innerProperties() == null ? null : this.innerProperties().extraInfoUrl(); + } + + /** + * Set the extraInfoUrl property: Extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withExtraInfoUrl(String extraInfoUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withExtraInfoUrl(extraInfoUrl); + return this; + } + + /** + * Get the webJobType property: Job type. + * + * @return the webJobType value. + */ + public WebJobType webJobType() { + return this.innerProperties() == null ? null : this.innerProperties().webJobType(); + } + + /** + * Set the webJobType property: Job type. + * + * @param webJobType the webJobType value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withWebJobType(WebJobType webJobType) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withWebJobType(webJobType); + return this; + } + + /** + * Get the error property: Error information. + * + * @return the error value. + */ + public String error() { + return this.innerProperties() == null ? null : this.innerProperties().error(); + } + + /** + * Set the error property: Error information. + * + * @param error the error value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withError(String error) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withError(error); + return this; + } + + /** + * Get the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + public Boolean usingSdk() { + return this.innerProperties() == null ? null : this.innerProperties().usingSdk(); + } + + /** + * Set the usingSdk property: Using SDK?. + * + * @param usingSdk the usingSdk value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withUsingSdk(Boolean usingSdk) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withUsingSdk(usingSdk); + return this; + } + + /** + * Get the settings property: Job settings. + * + * @return the settings value. + */ + public Map settings() { + return this.innerProperties() == null ? null : this.innerProperties().settings(); + } + + /** + * Set the settings property: Job settings. + * + * @param settings the settings value to set. + * @return the TriggeredWebJobInner object itself. + */ + public TriggeredWebJobInner withSettings(Map settings) { + if (this.innerProperties() == null) { + this.innerProperties = new TriggeredWebJobProperties(); + } + this.innerProperties().withSettings(settings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredWebJobProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredWebJobProperties.java new file mode 100644 index 0000000000000..9fb6c3bf9fc98 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/TriggeredWebJobProperties.java @@ -0,0 +1,292 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobRun; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** TriggeredWebJob resource specific properties. */ +@Fluent +public final class TriggeredWebJobProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggeredWebJobProperties.class); + + /* + * Latest job run information. + */ + @JsonProperty(value = "latest_run") + private TriggeredJobRun latestRun; + + /* + * History URL. + */ + @JsonProperty(value = "history_url") + private String historyUrl; + + /* + * Scheduler Logs URL. + */ + @JsonProperty(value = "scheduler_logs_url") + private String schedulerLogsUrl; + + /* + * Run command. + */ + @JsonProperty(value = "run_command") + private String runCommand; + + /* + * Job URL. + */ + @JsonProperty(value = "url") + private String url; + + /* + * Extra Info URL. + */ + @JsonProperty(value = "extra_info_url") + private String extraInfoUrl; + + /* + * Job type. + */ + @JsonProperty(value = "web_job_type") + private WebJobType webJobType; + + /* + * Error information. + */ + @JsonProperty(value = "error") + private String error; + + /* + * Using SDK? + */ + @JsonProperty(value = "using_sdk") + private Boolean usingSdk; + + /* + * Job settings. + */ + @JsonProperty(value = "settings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map settings; + + /** + * Get the latestRun property: Latest job run information. + * + * @return the latestRun value. + */ + public TriggeredJobRun latestRun() { + return this.latestRun; + } + + /** + * Set the latestRun property: Latest job run information. + * + * @param latestRun the latestRun value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withLatestRun(TriggeredJobRun latestRun) { + this.latestRun = latestRun; + return this; + } + + /** + * Get the historyUrl property: History URL. + * + * @return the historyUrl value. + */ + public String historyUrl() { + return this.historyUrl; + } + + /** + * Set the historyUrl property: History URL. + * + * @param historyUrl the historyUrl value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withHistoryUrl(String historyUrl) { + this.historyUrl = historyUrl; + return this; + } + + /** + * Get the schedulerLogsUrl property: Scheduler Logs URL. + * + * @return the schedulerLogsUrl value. + */ + public String schedulerLogsUrl() { + return this.schedulerLogsUrl; + } + + /** + * Set the schedulerLogsUrl property: Scheduler Logs URL. + * + * @param schedulerLogsUrl the schedulerLogsUrl value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withSchedulerLogsUrl(String schedulerLogsUrl) { + this.schedulerLogsUrl = schedulerLogsUrl; + return this; + } + + /** + * Get the runCommand property: Run command. + * + * @return the runCommand value. + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set the runCommand property: Run command. + * + * @param runCommand the runCommand value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get the url property: Job URL. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: Job URL. + * + * @param url the url value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set the extraInfoUrl property: Extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get the webJobType property: Job type. + * + * @return the webJobType value. + */ + public WebJobType webJobType() { + return this.webJobType; + } + + /** + * Set the webJobType property: Job type. + * + * @param webJobType the webJobType value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withWebJobType(WebJobType webJobType) { + this.webJobType = webJobType; + return this; + } + + /** + * Get the error property: Error information. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * Set the error property: Error information. + * + * @param error the error value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withError(String error) { + this.error = error; + return this; + } + + /** + * Get the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set the usingSdk property: Using SDK?. + * + * @param usingSdk the usingSdk value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get the settings property: Job settings. + * + * @return the settings value. + */ + public Map settings() { + return this.settings; + } + + /** + * Set the settings property: Job settings. + * + * @param settings the settings value to set. + * @return the TriggeredWebJobProperties object itself. + */ + public TriggeredWebJobProperties withSettings(Map settings) { + this.settings = settings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (latestRun() != null) { + latestRun().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UsageInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UsageInner.java new file mode 100644 index 0000000000000..cf35ef4a77ce5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UsageInner.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ComputeModeOptions; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Usage of the quota resource. */ +@Fluent +public final class UsageInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageInner.class); + + /* + * Usage resource specific properties + */ + @JsonProperty(value = "properties") + private UsageProperties innerProperties; + + /** + * Get the innerProperties property: Usage resource specific properties. + * + * @return the innerProperties value. + */ + private UsageProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public UsageInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the displayName property: Friendly name shown in the UI. + * + * @return the displayName value. + */ + public String displayName() { + return this.innerProperties() == null ? null : this.innerProperties().displayName(); + } + + /** + * Get the resourceName property: Name of the quota resource. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.innerProperties() == null ? null : this.innerProperties().resourceName(); + } + + /** + * Get the unit property: Units of measurement for the quota resource. + * + * @return the unit value. + */ + public String unit() { + return this.innerProperties() == null ? null : this.innerProperties().unit(); + } + + /** + * Get the currentValue property: The current value of the resource counter. + * + * @return the currentValue value. + */ + public Long currentValue() { + return this.innerProperties() == null ? null : this.innerProperties().currentValue(); + } + + /** + * Get the limit property: The resource limit. + * + * @return the limit value. + */ + public Long limit() { + return this.innerProperties() == null ? null : this.innerProperties().limit(); + } + + /** + * Get the nextResetTime property: Next reset time for the resource counter. + * + * @return the nextResetTime value. + */ + public OffsetDateTime nextResetTime() { + return this.innerProperties() == null ? null : this.innerProperties().nextResetTime(); + } + + /** + * Get the computeMode property: Compute mode used for this usage. + * + * @return the computeMode value. + */ + public ComputeModeOptions computeMode() { + return this.innerProperties() == null ? null : this.innerProperties().computeMode(); + } + + /** + * Get the siteMode property: Site mode used for this usage. + * + * @return the siteMode value. + */ + public String siteMode() { + return this.innerProperties() == null ? null : this.innerProperties().siteMode(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UsageProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UsageProperties.java new file mode 100644 index 0000000000000..c78498c0a0382 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UsageProperties.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ComputeModeOptions; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Usage resource specific properties. */ +@Immutable +public final class UsageProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageProperties.class); + + /* + * Friendly name shown in the UI. + */ + @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY) + private String displayName; + + /* + * Name of the quota resource. + */ + @JsonProperty(value = "resourceName", access = JsonProperty.Access.WRITE_ONLY) + private String resourceName; + + /* + * Units of measurement for the quota resource. + */ + @JsonProperty(value = "unit", access = JsonProperty.Access.WRITE_ONLY) + private String unit; + + /* + * The current value of the resource counter. + */ + @JsonProperty(value = "currentValue", access = JsonProperty.Access.WRITE_ONLY) + private Long currentValue; + + /* + * The resource limit. + */ + @JsonProperty(value = "limit", access = JsonProperty.Access.WRITE_ONLY) + private Long limit; + + /* + * Next reset time for the resource counter. + */ + @JsonProperty(value = "nextResetTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime nextResetTime; + + /* + * Compute mode used for this usage. + */ + @JsonProperty(value = "computeMode", access = JsonProperty.Access.WRITE_ONLY) + private ComputeModeOptions computeMode; + + /* + * Site mode used for this usage. + */ + @JsonProperty(value = "siteMode", access = JsonProperty.Access.WRITE_ONLY) + private String siteMode; + + /** + * Get the displayName property: Friendly name shown in the UI. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Get the resourceName property: Name of the quota resource. + * + * @return the resourceName value. + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Get the unit property: Units of measurement for the quota resource. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Get the currentValue property: The current value of the resource counter. + * + * @return the currentValue value. + */ + public Long currentValue() { + return this.currentValue; + } + + /** + * Get the limit property: The resource limit. + * + * @return the limit value. + */ + public Long limit() { + return this.limit; + } + + /** + * Get the nextResetTime property: Next reset time for the resource counter. + * + * @return the nextResetTime value. + */ + public OffsetDateTime nextResetTime() { + return this.nextResetTime; + } + + /** + * Get the computeMode property: Compute mode used for this usage. + * + * @return the computeMode value. + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Get the siteMode property: Site mode used for this usage. + * + * @return the siteMode value. + */ + public String siteMode() { + return this.siteMode; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UserInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UserInner.java new file mode 100644 index 0000000000000..0d966ef4ef6f3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UserInner.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** User credentials used for publishing activity. */ +@Fluent +public final class UserInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UserInner.class); + + /* + * User resource specific properties + */ + @JsonProperty(value = "properties") + private UserProperties innerProperties; + + /** + * Get the innerProperties property: User resource specific properties. + * + * @return the innerProperties value. + */ + private UserProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public UserInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the publishingUsername property: Username used for publishing. + * + * @return the publishingUsername value. + */ + public String publishingUsername() { + return this.innerProperties() == null ? null : this.innerProperties().publishingUsername(); + } + + /** + * Set the publishingUsername property: Username used for publishing. + * + * @param publishingUsername the publishingUsername value to set. + * @return the UserInner object itself. + */ + public UserInner withPublishingUsername(String publishingUsername) { + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withPublishingUsername(publishingUsername); + return this; + } + + /** + * Get the publishingPassword property: Password used for publishing. + * + * @return the publishingPassword value. + */ + public String publishingPassword() { + return this.innerProperties() == null ? null : this.innerProperties().publishingPassword(); + } + + /** + * Set the publishingPassword property: Password used for publishing. + * + * @param publishingPassword the publishingPassword value to set. + * @return the UserInner object itself. + */ + public UserInner withPublishingPassword(String publishingPassword) { + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withPublishingPassword(publishingPassword); + return this; + } + + /** + * Get the publishingPasswordHash property: Password hash used for publishing. + * + * @return the publishingPasswordHash value. + */ + public String publishingPasswordHash() { + return this.innerProperties() == null ? null : this.innerProperties().publishingPasswordHash(); + } + + /** + * Set the publishingPasswordHash property: Password hash used for publishing. + * + * @param publishingPasswordHash the publishingPasswordHash value to set. + * @return the UserInner object itself. + */ + public UserInner withPublishingPasswordHash(String publishingPasswordHash) { + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withPublishingPasswordHash(publishingPasswordHash); + return this; + } + + /** + * Get the publishingPasswordHashSalt property: Password hash salt used for publishing. + * + * @return the publishingPasswordHashSalt value. + */ + public String publishingPasswordHashSalt() { + return this.innerProperties() == null ? null : this.innerProperties().publishingPasswordHashSalt(); + } + + /** + * Set the publishingPasswordHashSalt property: Password hash salt used for publishing. + * + * @param publishingPasswordHashSalt the publishingPasswordHashSalt value to set. + * @return the UserInner object itself. + */ + public UserInner withPublishingPasswordHashSalt(String publishingPasswordHashSalt) { + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withPublishingPasswordHashSalt(publishingPasswordHashSalt); + return this; + } + + /** + * Get the scmUri property: Url of SCM site. + * + * @return the scmUri value. + */ + public String scmUri() { + return this.innerProperties() == null ? null : this.innerProperties().scmUri(); + } + + /** + * Set the scmUri property: Url of SCM site. + * + * @param scmUri the scmUri value to set. + * @return the UserInner object itself. + */ + public UserInner withScmUri(String scmUri) { + if (this.innerProperties() == null) { + this.innerProperties = new UserProperties(); + } + this.innerProperties().withScmUri(scmUri); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UserProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UserProperties.java new file mode 100644 index 0000000000000..4cfdfccc16850 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/UserProperties.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** User resource specific properties. */ +@Fluent +public final class UserProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UserProperties.class); + + /* + * Username used for publishing. + */ + @JsonProperty(value = "publishingUserName", required = true) + private String publishingUsername; + + /* + * Password used for publishing. + */ + @JsonProperty(value = "publishingPassword") + private String publishingPassword; + + /* + * Password hash used for publishing. + */ + @JsonProperty(value = "publishingPasswordHash") + private String publishingPasswordHash; + + /* + * Password hash salt used for publishing. + */ + @JsonProperty(value = "publishingPasswordHashSalt") + private String publishingPasswordHashSalt; + + /* + * Url of SCM site. + */ + @JsonProperty(value = "scmUri") + private String scmUri; + + /** + * Get the publishingUsername property: Username used for publishing. + * + * @return the publishingUsername value. + */ + public String publishingUsername() { + return this.publishingUsername; + } + + /** + * Set the publishingUsername property: Username used for publishing. + * + * @param publishingUsername the publishingUsername value to set. + * @return the UserProperties object itself. + */ + public UserProperties withPublishingUsername(String publishingUsername) { + this.publishingUsername = publishingUsername; + return this; + } + + /** + * Get the publishingPassword property: Password used for publishing. + * + * @return the publishingPassword value. + */ + public String publishingPassword() { + return this.publishingPassword; + } + + /** + * Set the publishingPassword property: Password used for publishing. + * + * @param publishingPassword the publishingPassword value to set. + * @return the UserProperties object itself. + */ + public UserProperties withPublishingPassword(String publishingPassword) { + this.publishingPassword = publishingPassword; + return this; + } + + /** + * Get the publishingPasswordHash property: Password hash used for publishing. + * + * @return the publishingPasswordHash value. + */ + public String publishingPasswordHash() { + return this.publishingPasswordHash; + } + + /** + * Set the publishingPasswordHash property: Password hash used for publishing. + * + * @param publishingPasswordHash the publishingPasswordHash value to set. + * @return the UserProperties object itself. + */ + public UserProperties withPublishingPasswordHash(String publishingPasswordHash) { + this.publishingPasswordHash = publishingPasswordHash; + return this; + } + + /** + * Get the publishingPasswordHashSalt property: Password hash salt used for publishing. + * + * @return the publishingPasswordHashSalt value. + */ + public String publishingPasswordHashSalt() { + return this.publishingPasswordHashSalt; + } + + /** + * Set the publishingPasswordHashSalt property: Password hash salt used for publishing. + * + * @param publishingPasswordHashSalt the publishingPasswordHashSalt value to set. + * @return the UserProperties object itself. + */ + public UserProperties withPublishingPasswordHashSalt(String publishingPasswordHashSalt) { + this.publishingPasswordHashSalt = publishingPasswordHashSalt; + return this; + } + + /** + * Get the scmUri property: Url of SCM site. + * + * @return the scmUri value. + */ + public String scmUri() { + return this.scmUri; + } + + /** + * Set the scmUri property: Url of SCM site. + * + * @param scmUri the scmUri value to set. + * @return the UserProperties object itself. + */ + public UserProperties withScmUri(String scmUri) { + this.scmUri = scmUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (publishingUsername() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property publishingUsername in model UserProperties")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ValidateProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ValidateProperties.java new file mode 100644 index 0000000000000..4f994edc62c9d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ValidateProperties.java @@ -0,0 +1,400 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** App properties used for validation. */ +@Fluent +public final class ValidateProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateProperties.class); + + /* + * ARM resource ID of an App Service plan that would host the app. + */ + @JsonProperty(value = "serverFarmId") + private String serverFarmId; + + /* + * Name of the target SKU for the App Service plan. + */ + @JsonProperty(value = "skuName") + private String skuName; + + /* + * true if App Service plan is for Linux workers; otherwise, + * false. + */ + @JsonProperty(value = "needLinuxWorkers") + private Boolean needLinuxWorkers; + + /* + * true if App Service plan is for Spot instances; otherwise, + * false. + */ + @JsonProperty(value = "isSpot") + private Boolean isSpot; + + /* + * Target capacity of the App Service plan (number of VMs). + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /* + * Name of App Service Environment where app or App Service plan should be + * created. + */ + @JsonProperty(value = "hostingEnvironment") + private String hostingEnvironment; + + /* + * true if App Service plan is running as a windows container + */ + @JsonProperty(value = "isXenon") + private Boolean isXenon; + + /* + * Base URL of the container registry + */ + @JsonProperty(value = "containerRegistryBaseUrl") + private String containerRegistryBaseUrl; + + /* + * Username for to access the container registry + */ + @JsonProperty(value = "containerRegistryUsername") + private String containerRegistryUsername; + + /* + * Password for to access the container registry + */ + @JsonProperty(value = "containerRegistryPassword") + private String containerRegistryPassword; + + /* + * Repository name (image name) + */ + @JsonProperty(value = "containerImageRepository") + private String containerImageRepository; + + /* + * Image tag + */ + @JsonProperty(value = "containerImageTag") + private String containerImageTag; + + /* + * Platform (windows or linux) + */ + @JsonProperty(value = "containerImagePlatform") + private String containerImagePlatform; + + /* + * App Service Environment Properties + */ + @JsonProperty(value = "appServiceEnvironment") + private AppServiceEnvironment appServiceEnvironment; + + /** + * Get the serverFarmId property: ARM resource ID of an App Service plan that would host the app. + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.serverFarmId; + } + + /** + * Set the serverFarmId property: ARM resource ID of an App Service plan that would host the app. + * + * @param serverFarmId the serverFarmId value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withServerFarmId(String serverFarmId) { + this.serverFarmId = serverFarmId; + return this; + } + + /** + * Get the skuName property: Name of the target SKU for the App Service plan. + * + * @return the skuName value. + */ + public String skuName() { + return this.skuName; + } + + /** + * Set the skuName property: Name of the target SKU for the App Service plan. + * + * @param skuName the skuName value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withSkuName(String skuName) { + this.skuName = skuName; + return this; + } + + /** + * Get the needLinuxWorkers property: <code>true</code> if App Service plan is for Linux workers; + * otherwise, <code>false</code>. + * + * @return the needLinuxWorkers value. + */ + public Boolean needLinuxWorkers() { + return this.needLinuxWorkers; + } + + /** + * Set the needLinuxWorkers property: <code>true</code> if App Service plan is for Linux workers; + * otherwise, <code>false</code>. + * + * @param needLinuxWorkers the needLinuxWorkers value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withNeedLinuxWorkers(Boolean needLinuxWorkers) { + this.needLinuxWorkers = needLinuxWorkers; + return this; + } + + /** + * Get the isSpot property: <code>true</code> if App Service plan is for Spot instances; otherwise, + * <code>false</code>. + * + * @return the isSpot value. + */ + public Boolean isSpot() { + return this.isSpot; + } + + /** + * Set the isSpot property: <code>true</code> if App Service plan is for Spot instances; otherwise, + * <code>false</code>. + * + * @param isSpot the isSpot value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withIsSpot(Boolean isSpot) { + this.isSpot = isSpot; + return this; + } + + /** + * Get the capacity property: Target capacity of the App Service plan (number of VMs). + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: Target capacity of the App Service plan (number of VMs). + * + * @param capacity the capacity value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the hostingEnvironment property: Name of App Service Environment where app or App Service plan should be + * created. + * + * @return the hostingEnvironment value. + */ + public String hostingEnvironment() { + return this.hostingEnvironment; + } + + /** + * Set the hostingEnvironment property: Name of App Service Environment where app or App Service plan should be + * created. + * + * @param hostingEnvironment the hostingEnvironment value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + + /** + * Get the isXenon property: <code>true</code> if App Service plan is running as a windows container. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.isXenon; + } + + /** + * Set the isXenon property: <code>true</code> if App Service plan is running as a windows container. + * + * @param isXenon the isXenon value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withIsXenon(Boolean isXenon) { + this.isXenon = isXenon; + return this; + } + + /** + * Get the containerRegistryBaseUrl property: Base URL of the container registry. + * + * @return the containerRegistryBaseUrl value. + */ + public String containerRegistryBaseUrl() { + return this.containerRegistryBaseUrl; + } + + /** + * Set the containerRegistryBaseUrl property: Base URL of the container registry. + * + * @param containerRegistryBaseUrl the containerRegistryBaseUrl value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withContainerRegistryBaseUrl(String containerRegistryBaseUrl) { + this.containerRegistryBaseUrl = containerRegistryBaseUrl; + return this; + } + + /** + * Get the containerRegistryUsername property: Username for to access the container registry. + * + * @return the containerRegistryUsername value. + */ + public String containerRegistryUsername() { + return this.containerRegistryUsername; + } + + /** + * Set the containerRegistryUsername property: Username for to access the container registry. + * + * @param containerRegistryUsername the containerRegistryUsername value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withContainerRegistryUsername(String containerRegistryUsername) { + this.containerRegistryUsername = containerRegistryUsername; + return this; + } + + /** + * Get the containerRegistryPassword property: Password for to access the container registry. + * + * @return the containerRegistryPassword value. + */ + public String containerRegistryPassword() { + return this.containerRegistryPassword; + } + + /** + * Set the containerRegistryPassword property: Password for to access the container registry. + * + * @param containerRegistryPassword the containerRegistryPassword value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withContainerRegistryPassword(String containerRegistryPassword) { + this.containerRegistryPassword = containerRegistryPassword; + return this; + } + + /** + * Get the containerImageRepository property: Repository name (image name). + * + * @return the containerImageRepository value. + */ + public String containerImageRepository() { + return this.containerImageRepository; + } + + /** + * Set the containerImageRepository property: Repository name (image name). + * + * @param containerImageRepository the containerImageRepository value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withContainerImageRepository(String containerImageRepository) { + this.containerImageRepository = containerImageRepository; + return this; + } + + /** + * Get the containerImageTag property: Image tag. + * + * @return the containerImageTag value. + */ + public String containerImageTag() { + return this.containerImageTag; + } + + /** + * Set the containerImageTag property: Image tag. + * + * @param containerImageTag the containerImageTag value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withContainerImageTag(String containerImageTag) { + this.containerImageTag = containerImageTag; + return this; + } + + /** + * Get the containerImagePlatform property: Platform (windows or linux). + * + * @return the containerImagePlatform value. + */ + public String containerImagePlatform() { + return this.containerImagePlatform; + } + + /** + * Set the containerImagePlatform property: Platform (windows or linux). + * + * @param containerImagePlatform the containerImagePlatform value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withContainerImagePlatform(String containerImagePlatform) { + this.containerImagePlatform = containerImagePlatform; + return this; + } + + /** + * Get the appServiceEnvironment property: App Service Environment Properties. + * + * @return the appServiceEnvironment value. + */ + public AppServiceEnvironment appServiceEnvironment() { + return this.appServiceEnvironment; + } + + /** + * Set the appServiceEnvironment property: App Service Environment Properties. + * + * @param appServiceEnvironment the appServiceEnvironment value to set. + * @return the ValidateProperties object itself. + */ + public ValidateProperties withAppServiceEnvironment(AppServiceEnvironment appServiceEnvironment) { + this.appServiceEnvironment = appServiceEnvironment; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (appServiceEnvironment() != null) { + appServiceEnvironment().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ValidateResponseInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ValidateResponseInner.java new file mode 100644 index 0000000000000..189a7577ad463 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/ValidateResponseInner.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ValidateResponseError; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes the result of resource validation. */ +@Fluent +public final class ValidateResponseInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateResponseInner.class); + + /* + * Result of validation. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Error details for the case when validation fails. + */ + @JsonProperty(value = "error") + private ValidateResponseError error; + + /** + * Get the status property: Result of validation. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Result of validation. + * + * @param status the status value to set. + * @return the ValidateResponseInner object itself. + */ + public ValidateResponseInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the error property: Error details for the case when validation fails. + * + * @return the error value. + */ + public ValidateResponseError error() { + return this.error; + } + + /** + * Set the error property: Error details for the case when validation fails. + * + * @param error the error value to set. + * @return the ValidateResponseInner object itself. + */ + public ValidateResponseInner withError(ValidateResponseError error) { + this.error = error; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (error() != null) { + error().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetGatewayInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetGatewayInner.java new file mode 100644 index 0000000000000..bcad68040a409 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetGatewayInner.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. */ +@Fluent +public final class VnetGatewayInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetGatewayInner.class); + + /* + * VnetGateway resource specific properties + */ + @JsonProperty(value = "properties") + private VnetGatewayProperties innerProperties; + + /** + * Get the innerProperties property: VnetGateway resource specific properties. + * + * @return the innerProperties value. + */ + private VnetGatewayProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public VnetGatewayInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the vnetName property: The Virtual Network name. + * + * @return the vnetName value. + */ + public String vnetName() { + return this.innerProperties() == null ? null : this.innerProperties().vnetName(); + } + + /** + * Set the vnetName property: The Virtual Network name. + * + * @param vnetName the vnetName value to set. + * @return the VnetGatewayInner object itself. + */ + public VnetGatewayInner withVnetName(String vnetName) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetGatewayProperties(); + } + this.innerProperties().withVnetName(vnetName); + return this; + } + + /** + * Get the vpnPackageUri property: The URI where the VPN package can be downloaded. + * + * @return the vpnPackageUri value. + */ + public String vpnPackageUri() { + return this.innerProperties() == null ? null : this.innerProperties().vpnPackageUri(); + } + + /** + * Set the vpnPackageUri property: The URI where the VPN package can be downloaded. + * + * @param vpnPackageUri the vpnPackageUri value to set. + * @return the VnetGatewayInner object itself. + */ + public VnetGatewayInner withVpnPackageUri(String vpnPackageUri) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetGatewayProperties(); + } + this.innerProperties().withVpnPackageUri(vpnPackageUri); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetGatewayProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetGatewayProperties.java new file mode 100644 index 0000000000000..336649ef78fa2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetGatewayProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VnetGateway resource specific properties. */ +@Fluent +public final class VnetGatewayProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetGatewayProperties.class); + + /* + * The Virtual Network name. + */ + @JsonProperty(value = "vnetName") + private String vnetName; + + /* + * The URI where the VPN package can be downloaded. + */ + @JsonProperty(value = "vpnPackageUri", required = true) + private String vpnPackageUri; + + /** + * Get the vnetName property: The Virtual Network name. + * + * @return the vnetName value. + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName property: The Virtual Network name. + * + * @param vnetName the vnetName value to set. + * @return the VnetGatewayProperties object itself. + */ + public VnetGatewayProperties withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the vpnPackageUri property: The URI where the VPN package can be downloaded. + * + * @return the vpnPackageUri value. + */ + public String vpnPackageUri() { + return this.vpnPackageUri; + } + + /** + * Set the vpnPackageUri property: The URI where the VPN package can be downloaded. + * + * @param vpnPackageUri the vpnPackageUri value to set. + * @return the VnetGatewayProperties object itself. + */ + public VnetGatewayProperties withVpnPackageUri(String vpnPackageUri) { + this.vpnPackageUri = vpnPackageUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (vpnPackageUri() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property vpnPackageUri in model VnetGatewayProperties")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetInfo.java new file mode 100644 index 0000000000000..b3d80516874e3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetInfo.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Virtual Network information contract. */ +@Fluent +public final class VnetInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetInfo.class); + + /* + * The Virtual Network's resource ID. + */ + @JsonProperty(value = "vnetResourceId") + private String vnetResourceId; + + /* + * The client certificate thumbprint. + */ + @JsonProperty(value = "certThumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String certThumbprint; + + /* + * A certificate file (.cer) blob containing the public key of the private + * key used to authenticate a + * Point-To-Site VPN connection. + */ + @JsonProperty(value = "certBlob") + private String certBlob; + + /* + * The routes that this Virtual Network connection uses. + */ + @JsonProperty(value = "routes", access = JsonProperty.Access.WRITE_ONLY) + private List routes; + + /* + * true if a resync is required; otherwise, + * false. + */ + @JsonProperty(value = "resyncRequired", access = JsonProperty.Access.WRITE_ONLY) + private Boolean resyncRequired; + + /* + * DNS servers to be used by this Virtual Network. This should be a + * comma-separated list of IP addresses. + */ + @JsonProperty(value = "dnsServers") + private String dnsServers; + + /* + * Flag that is used to denote if this is VNET injection + */ + @JsonProperty(value = "isSwift") + private Boolean isSwift; + + /** + * Get the vnetResourceId property: The Virtual Network's resource ID. + * + * @return the vnetResourceId value. + */ + public String vnetResourceId() { + return this.vnetResourceId; + } + + /** + * Set the vnetResourceId property: The Virtual Network's resource ID. + * + * @param vnetResourceId the vnetResourceId value to set. + * @return the VnetInfo object itself. + */ + public VnetInfo withVnetResourceId(String vnetResourceId) { + this.vnetResourceId = vnetResourceId; + return this; + } + + /** + * Get the certThumbprint property: The client certificate thumbprint. + * + * @return the certThumbprint value. + */ + public String certThumbprint() { + return this.certThumbprint; + } + + /** + * Get the certBlob property: A certificate file (.cer) blob containing the public key of the private key used to + * authenticate a Point-To-Site VPN connection. + * + * @return the certBlob value. + */ + public String certBlob() { + return this.certBlob; + } + + /** + * Set the certBlob property: A certificate file (.cer) blob containing the public key of the private key used to + * authenticate a Point-To-Site VPN connection. + * + * @param certBlob the certBlob value to set. + * @return the VnetInfo object itself. + */ + public VnetInfo withCertBlob(String certBlob) { + this.certBlob = certBlob; + return this; + } + + /** + * Get the routes property: The routes that this Virtual Network connection uses. + * + * @return the routes value. + */ + public List routes() { + return this.routes; + } + + /** + * Get the resyncRequired property: <code>true</code> if a resync is required; otherwise, + * <code>false</code>. + * + * @return the resyncRequired value. + */ + public Boolean resyncRequired() { + return this.resyncRequired; + } + + /** + * Get the dnsServers property: DNS servers to be used by this Virtual Network. This should be a comma-separated + * list of IP addresses. + * + * @return the dnsServers value. + */ + public String dnsServers() { + return this.dnsServers; + } + + /** + * Set the dnsServers property: DNS servers to be used by this Virtual Network. This should be a comma-separated + * list of IP addresses. + * + * @param dnsServers the dnsServers value to set. + * @return the VnetInfo object itself. + */ + public VnetInfo withDnsServers(String dnsServers) { + this.dnsServers = dnsServers; + return this; + } + + /** + * Get the isSwift property: Flag that is used to denote if this is VNET injection. + * + * @return the isSwift value. + */ + public Boolean isSwift() { + return this.isSwift; + } + + /** + * Set the isSwift property: Flag that is used to denote if this is VNET injection. + * + * @param isSwift the isSwift value to set. + * @return the VnetInfo object itself. + */ + public VnetInfo withIsSwift(Boolean isSwift) { + this.isSwift = isSwift; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (routes() != null) { + routes().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetInfoResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetInfoResourceInner.java new file mode 100644 index 0000000000000..556d461a11c90 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetInfoResourceInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Virtual Network information ARM resource. */ +@Fluent +public final class VnetInfoResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetInfoResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private VnetInfo innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private VnetInfo innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public VnetInfoResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the vnetResourceId property: The Virtual Network's resource ID. + * + * @return the vnetResourceId value. + */ + public String vnetResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().vnetResourceId(); + } + + /** + * Set the vnetResourceId property: The Virtual Network's resource ID. + * + * @param vnetResourceId the vnetResourceId value to set. + * @return the VnetInfoResourceInner object itself. + */ + public VnetInfoResourceInner withVnetResourceId(String vnetResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetInfo(); + } + this.innerProperties().withVnetResourceId(vnetResourceId); + return this; + } + + /** + * Get the certThumbprint property: The client certificate thumbprint. + * + * @return the certThumbprint value. + */ + public String certThumbprint() { + return this.innerProperties() == null ? null : this.innerProperties().certThumbprint(); + } + + /** + * Get the certBlob property: A certificate file (.cer) blob containing the public key of the private key used to + * authenticate a Point-To-Site VPN connection. + * + * @return the certBlob value. + */ + public String certBlob() { + return this.innerProperties() == null ? null : this.innerProperties().certBlob(); + } + + /** + * Set the certBlob property: A certificate file (.cer) blob containing the public key of the private key used to + * authenticate a Point-To-Site VPN connection. + * + * @param certBlob the certBlob value to set. + * @return the VnetInfoResourceInner object itself. + */ + public VnetInfoResourceInner withCertBlob(String certBlob) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetInfo(); + } + this.innerProperties().withCertBlob(certBlob); + return this; + } + + /** + * Get the routes property: The routes that this Virtual Network connection uses. + * + * @return the routes value. + */ + public List routes() { + return this.innerProperties() == null ? null : this.innerProperties().routes(); + } + + /** + * Get the resyncRequired property: <code>true</code> if a resync is required; otherwise, + * <code>false</code>. + * + * @return the resyncRequired value. + */ + public Boolean resyncRequired() { + return this.innerProperties() == null ? null : this.innerProperties().resyncRequired(); + } + + /** + * Get the dnsServers property: DNS servers to be used by this Virtual Network. This should be a comma-separated + * list of IP addresses. + * + * @return the dnsServers value. + */ + public String dnsServers() { + return this.innerProperties() == null ? null : this.innerProperties().dnsServers(); + } + + /** + * Set the dnsServers property: DNS servers to be used by this Virtual Network. This should be a comma-separated + * list of IP addresses. + * + * @param dnsServers the dnsServers value to set. + * @return the VnetInfoResourceInner object itself. + */ + public VnetInfoResourceInner withDnsServers(String dnsServers) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetInfo(); + } + this.innerProperties().withDnsServers(dnsServers); + return this; + } + + /** + * Get the isSwift property: Flag that is used to denote if this is VNET injection. + * + * @return the isSwift value. + */ + public Boolean isSwift() { + return this.innerProperties() == null ? null : this.innerProperties().isSwift(); + } + + /** + * Set the isSwift property: Flag that is used to denote if this is VNET injection. + * + * @param isSwift the isSwift value to set. + * @return the VnetInfoResourceInner object itself. + */ + public VnetInfoResourceInner withIsSwift(Boolean isSwift) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetInfo(); + } + this.innerProperties().withIsSwift(isSwift); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetParametersProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetParametersProperties.java new file mode 100644 index 0000000000000..4bbf90066f0d0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetParametersProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VnetParameters resource specific properties. */ +@Fluent +public final class VnetParametersProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetParametersProperties.class); + + /* + * The Resource Group of the VNET to be validated + */ + @JsonProperty(value = "vnetResourceGroup") + private String vnetResourceGroup; + + /* + * The name of the VNET to be validated + */ + @JsonProperty(value = "vnetName") + private String vnetName; + + /* + * The subnet name to be validated + */ + @JsonProperty(value = "vnetSubnetName") + private String vnetSubnetName; + + /* + * The ARM Resource ID of the subnet to validate + */ + @JsonProperty(value = "subnetResourceId") + private String subnetResourceId; + + /** + * Get the vnetResourceGroup property: The Resource Group of the VNET to be validated. + * + * @return the vnetResourceGroup value. + */ + public String vnetResourceGroup() { + return this.vnetResourceGroup; + } + + /** + * Set the vnetResourceGroup property: The Resource Group of the VNET to be validated. + * + * @param vnetResourceGroup the vnetResourceGroup value to set. + * @return the VnetParametersProperties object itself. + */ + public VnetParametersProperties withVnetResourceGroup(String vnetResourceGroup) { + this.vnetResourceGroup = vnetResourceGroup; + return this; + } + + /** + * Get the vnetName property: The name of the VNET to be validated. + * + * @return the vnetName value. + */ + public String vnetName() { + return this.vnetName; + } + + /** + * Set the vnetName property: The name of the VNET to be validated. + * + * @param vnetName the vnetName value to set. + * @return the VnetParametersProperties object itself. + */ + public VnetParametersProperties withVnetName(String vnetName) { + this.vnetName = vnetName; + return this; + } + + /** + * Get the vnetSubnetName property: The subnet name to be validated. + * + * @return the vnetSubnetName value. + */ + public String vnetSubnetName() { + return this.vnetSubnetName; + } + + /** + * Set the vnetSubnetName property: The subnet name to be validated. + * + * @param vnetSubnetName the vnetSubnetName value to set. + * @return the VnetParametersProperties object itself. + */ + public VnetParametersProperties withVnetSubnetName(String vnetSubnetName) { + this.vnetSubnetName = vnetSubnetName; + return this; + } + + /** + * Get the subnetResourceId property: The ARM Resource ID of the subnet to validate. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.subnetResourceId; + } + + /** + * Set the subnetResourceId property: The ARM Resource ID of the subnet to validate. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the VnetParametersProperties object itself. + */ + public VnetParametersProperties withSubnetResourceId(String subnetResourceId) { + this.subnetResourceId = subnetResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetRouteInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetRouteInner.java new file mode 100644 index 0000000000000..242b981979d1f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetRouteInner.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.RouteType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Virtual Network route contract used to pass routing information for a Virtual Network. */ +@Fluent +public final class VnetRouteInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetRouteInner.class); + + /* + * VnetRoute resource specific properties + */ + @JsonProperty(value = "properties") + private VnetRouteProperties innerProperties; + + /** + * Get the innerProperties property: VnetRoute resource specific properties. + * + * @return the innerProperties value. + */ + private VnetRouteProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public VnetRouteInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the startAddress property: The starting address for this route. This may also include a CIDR notation, in + * which case the end address must not be specified. + * + * @return the startAddress value. + */ + public String startAddress() { + return this.innerProperties() == null ? null : this.innerProperties().startAddress(); + } + + /** + * Set the startAddress property: The starting address for this route. This may also include a CIDR notation, in + * which case the end address must not be specified. + * + * @param startAddress the startAddress value to set. + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withStartAddress(String startAddress) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetRouteProperties(); + } + this.innerProperties().withStartAddress(startAddress); + return this; + } + + /** + * Get the endAddress property: The ending address for this route. If the start address is specified in CIDR + * notation, this must be omitted. + * + * @return the endAddress value. + */ + public String endAddress() { + return this.innerProperties() == null ? null : this.innerProperties().endAddress(); + } + + /** + * Set the endAddress property: The ending address for this route. If the start address is specified in CIDR + * notation, this must be omitted. + * + * @param endAddress the endAddress value to set. + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withEndAddress(String endAddress) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetRouteProperties(); + } + this.innerProperties().withEndAddress(endAddress); + return this; + } + + /** + * Get the routeType property: The type of route this is: DEFAULT - By default, every app has routes to the local + * address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - + * Static route set on the app only + * + *

These values will be used for syncing an app's routes with those from a Virtual Network. + * + * @return the routeType value. + */ + public RouteType routeType() { + return this.innerProperties() == null ? null : this.innerProperties().routeType(); + } + + /** + * Set the routeType property: The type of route this is: DEFAULT - By default, every app has routes to the local + * address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - + * Static route set on the app only + * + *

These values will be used for syncing an app's routes with those from a Virtual Network. + * + * @param routeType the routeType value to set. + * @return the VnetRouteInner object itself. + */ + public VnetRouteInner withRouteType(RouteType routeType) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetRouteProperties(); + } + this.innerProperties().withRouteType(routeType); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetRouteProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetRouteProperties.java new file mode 100644 index 0000000000000..067572cd982ec --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetRouteProperties.java @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.RouteType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VnetRoute resource specific properties. */ +@Fluent +public final class VnetRouteProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetRouteProperties.class); + + /* + * The starting address for this route. This may also include a CIDR + * notation, in which case the end address must not be specified. + */ + @JsonProperty(value = "startAddress") + private String startAddress; + + /* + * The ending address for this route. If the start address is specified in + * CIDR notation, this must be omitted. + */ + @JsonProperty(value = "endAddress") + private String endAddress; + + /* + * The type of route this is: + * DEFAULT - By default, every app has routes to the local address ranges + * specified by RFC1918 + * INHERITED - Routes inherited from the real Virtual Network routes + * STATIC - Static route set on the app only + * + * These values will be used for syncing an app's routes with those from a + * Virtual Network. + */ + @JsonProperty(value = "routeType") + private RouteType routeType; + + /** + * Get the startAddress property: The starting address for this route. This may also include a CIDR notation, in + * which case the end address must not be specified. + * + * @return the startAddress value. + */ + public String startAddress() { + return this.startAddress; + } + + /** + * Set the startAddress property: The starting address for this route. This may also include a CIDR notation, in + * which case the end address must not be specified. + * + * @param startAddress the startAddress value to set. + * @return the VnetRouteProperties object itself. + */ + public VnetRouteProperties withStartAddress(String startAddress) { + this.startAddress = startAddress; + return this; + } + + /** + * Get the endAddress property: The ending address for this route. If the start address is specified in CIDR + * notation, this must be omitted. + * + * @return the endAddress value. + */ + public String endAddress() { + return this.endAddress; + } + + /** + * Set the endAddress property: The ending address for this route. If the start address is specified in CIDR + * notation, this must be omitted. + * + * @param endAddress the endAddress value to set. + * @return the VnetRouteProperties object itself. + */ + public VnetRouteProperties withEndAddress(String endAddress) { + this.endAddress = endAddress; + return this; + } + + /** + * Get the routeType property: The type of route this is: DEFAULT - By default, every app has routes to the local + * address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - + * Static route set on the app only + * + *

These values will be used for syncing an app's routes with those from a Virtual Network. + * + * @return the routeType value. + */ + public RouteType routeType() { + return this.routeType; + } + + /** + * Set the routeType property: The type of route this is: DEFAULT - By default, every app has routes to the local + * address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - + * Static route set on the app only + * + *

These values will be used for syncing an app's routes with those from a Virtual Network. + * + * @param routeType the routeType value to set. + * @return the VnetRouteProperties object itself. + */ + public VnetRouteProperties withRouteType(RouteType routeType) { + this.routeType = routeType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationFailureDetailsInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationFailureDetailsInner.java new file mode 100644 index 0000000000000..1c72f4a4236c3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationFailureDetailsInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.VnetValidationTestFailure; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A class that describes the reason for a validation failure. */ +@Fluent +public final class VnetValidationFailureDetailsInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetValidationFailureDetailsInner.class); + + /* + * VnetValidationFailureDetails resource specific properties + */ + @JsonProperty(value = "properties") + private VnetValidationFailureDetailsProperties innerProperties; + + /** + * Get the innerProperties property: VnetValidationFailureDetails resource specific properties. + * + * @return the innerProperties value. + */ + private VnetValidationFailureDetailsProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public VnetValidationFailureDetailsInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the message property: Text describing the validation outcome. + * + * @return the message value. + */ + public String message() { + return this.innerProperties() == null ? null : this.innerProperties().message(); + } + + /** + * Set the message property: Text describing the validation outcome. + * + * @param message the message value to set. + * @return the VnetValidationFailureDetailsInner object itself. + */ + public VnetValidationFailureDetailsInner withMessage(String message) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetValidationFailureDetailsProperties(); + } + this.innerProperties().withMessage(message); + return this; + } + + /** + * Get the failed property: A flag describing whether or not validation failed. + * + * @return the failed value. + */ + public Boolean failed() { + return this.innerProperties() == null ? null : this.innerProperties().failed(); + } + + /** + * Set the failed property: A flag describing whether or not validation failed. + * + * @param failed the failed value to set. + * @return the VnetValidationFailureDetailsInner object itself. + */ + public VnetValidationFailureDetailsInner withFailed(Boolean failed) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetValidationFailureDetailsProperties(); + } + this.innerProperties().withFailed(failed); + return this; + } + + /** + * Get the failedTests property: A list of tests that failed in the validation. + * + * @return the failedTests value. + */ + public List failedTests() { + return this.innerProperties() == null ? null : this.innerProperties().failedTests(); + } + + /** + * Set the failedTests property: A list of tests that failed in the validation. + * + * @param failedTests the failedTests value to set. + * @return the VnetValidationFailureDetailsInner object itself. + */ + public VnetValidationFailureDetailsInner withFailedTests(List failedTests) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetValidationFailureDetailsProperties(); + } + this.innerProperties().withFailedTests(failedTests); + return this; + } + + /** + * Get the warnings property: A list of warnings generated during validation. + * + * @return the warnings value. + */ + public List warnings() { + return this.innerProperties() == null ? null : this.innerProperties().warnings(); + } + + /** + * Set the warnings property: A list of warnings generated during validation. + * + * @param warnings the warnings value to set. + * @return the VnetValidationFailureDetailsInner object itself. + */ + public VnetValidationFailureDetailsInner withWarnings(List warnings) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetValidationFailureDetailsProperties(); + } + this.innerProperties().withWarnings(warnings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationFailureDetailsProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationFailureDetailsProperties.java new file mode 100644 index 0000000000000..767732f5ef722 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationFailureDetailsProperties.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.VnetValidationTestFailure; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** VnetValidationFailureDetails resource specific properties. */ +@Fluent +public final class VnetValidationFailureDetailsProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetValidationFailureDetailsProperties.class); + + /* + * Text describing the validation outcome. + */ + @JsonProperty(value = "message") + private String message; + + /* + * A flag describing whether or not validation failed. + */ + @JsonProperty(value = "failed") + private Boolean failed; + + /* + * A list of tests that failed in the validation. + */ + @JsonProperty(value = "failedTests") + private List failedTests; + + /* + * A list of warnings generated during validation. + */ + @JsonProperty(value = "warnings") + private List warnings; + + /** + * Get the message property: Text describing the validation outcome. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Text describing the validation outcome. + * + * @param message the message value to set. + * @return the VnetValidationFailureDetailsProperties object itself. + */ + public VnetValidationFailureDetailsProperties withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the failed property: A flag describing whether or not validation failed. + * + * @return the failed value. + */ + public Boolean failed() { + return this.failed; + } + + /** + * Set the failed property: A flag describing whether or not validation failed. + * + * @param failed the failed value to set. + * @return the VnetValidationFailureDetailsProperties object itself. + */ + public VnetValidationFailureDetailsProperties withFailed(Boolean failed) { + this.failed = failed; + return this; + } + + /** + * Get the failedTests property: A list of tests that failed in the validation. + * + * @return the failedTests value. + */ + public List failedTests() { + return this.failedTests; + } + + /** + * Set the failedTests property: A list of tests that failed in the validation. + * + * @param failedTests the failedTests value to set. + * @return the VnetValidationFailureDetailsProperties object itself. + */ + public VnetValidationFailureDetailsProperties withFailedTests(List failedTests) { + this.failedTests = failedTests; + return this; + } + + /** + * Get the warnings property: A list of warnings generated during validation. + * + * @return the warnings value. + */ + public List warnings() { + return this.warnings; + } + + /** + * Set the warnings property: A list of warnings generated during validation. + * + * @param warnings the warnings value to set. + * @return the VnetValidationFailureDetailsProperties object itself. + */ + public VnetValidationFailureDetailsProperties withWarnings(List warnings) { + this.warnings = warnings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (failedTests() != null) { + failedTests().forEach(e -> e.validate()); + } + if (warnings() != null) { + warnings().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationTestFailureProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationTestFailureProperties.java new file mode 100644 index 0000000000000..27e3846647356 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/VnetValidationTestFailureProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** VnetValidationTestFailure resource specific properties. */ +@Fluent +public final class VnetValidationTestFailureProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetValidationTestFailureProperties.class); + + /* + * The name of the test that failed. + */ + @JsonProperty(value = "testName") + private String testName; + + /* + * The details of what caused the failure, e.g. the blocking rule name, + * etc. + */ + @JsonProperty(value = "details") + private String details; + + /** + * Get the testName property: The name of the test that failed. + * + * @return the testName value. + */ + public String testName() { + return this.testName; + } + + /** + * Set the testName property: The name of the test that failed. + * + * @param testName the testName value to set. + * @return the VnetValidationTestFailureProperties object itself. + */ + public VnetValidationTestFailureProperties withTestName(String testName) { + this.testName = testName; + return this; + } + + /** + * Get the details property: The details of what caused the failure, e.g. the blocking rule name, etc. + * + * @return the details value. + */ + public String details() { + return this.details; + } + + /** + * Set the details property: The details of what caused the failure, e.g. the blocking rule name, etc. + * + * @param details the details value to set. + * @return the VnetValidationTestFailureProperties object itself. + */ + public VnetValidationTestFailureProperties withDetails(String details) { + this.details = details; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebAppStackInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebAppStackInner.java new file mode 100644 index 0000000000000..b9490ad0d72eb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebAppStackInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.StackPreferredOs; +import com.azure.resourcemanager.appservice.generated.models.WebAppMajorVersion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Web App stack. */ +@Fluent +public final class WebAppStackInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppStackInner.class); + + /* + * Web App stack location. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /* + * WebAppStack resource specific properties + */ + @JsonProperty(value = "properties") + private WebAppStackProperties innerProperties; + + /** + * Get the location property: Web App stack location. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the innerProperties property: WebAppStack resource specific properties. + * + * @return the innerProperties value. + */ + private WebAppStackProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public WebAppStackInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the displayText property: Web App stack (display only). + * + * @return the displayText value. + */ + public String displayText() { + return this.innerProperties() == null ? null : this.innerProperties().displayText(); + } + + /** + * Get the value property: Web App stack name. + * + * @return the value value. + */ + public String value() { + return this.innerProperties() == null ? null : this.innerProperties().value(); + } + + /** + * Get the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + public List majorVersions() { + return this.innerProperties() == null ? null : this.innerProperties().majorVersions(); + } + + /** + * Get the preferredOs property: Web App stack preferred OS. + * + * @return the preferredOs value. + */ + public StackPreferredOs preferredOs() { + return this.innerProperties() == null ? null : this.innerProperties().preferredOs(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebAppStackProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebAppStackProperties.java new file mode 100644 index 0000000000000..b304a8e9f685b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebAppStackProperties.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.StackPreferredOs; +import com.azure.resourcemanager.appservice.generated.models.WebAppMajorVersion; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** WebAppStack resource specific properties. */ +@Immutable +public final class WebAppStackProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppStackProperties.class); + + /* + * Web App stack (display only). + */ + @JsonProperty(value = "displayText", access = JsonProperty.Access.WRITE_ONLY) + private String displayText; + + /* + * Web App stack name. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /* + * List of major versions available. + */ + @JsonProperty(value = "majorVersions", access = JsonProperty.Access.WRITE_ONLY) + private List majorVersions; + + /* + * Web App stack preferred OS. + */ + @JsonProperty(value = "preferredOs", access = JsonProperty.Access.WRITE_ONLY) + private StackPreferredOs preferredOs; + + /** + * Get the displayText property: Web App stack (display only). + * + * @return the displayText value. + */ + public String displayText() { + return this.displayText; + } + + /** + * Get the value property: Web App stack name. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Get the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + public List majorVersions() { + return this.majorVersions; + } + + /** + * Get the preferredOs property: Web App stack preferred OS. + * + * @return the preferredOs value. + */ + public StackPreferredOs preferredOs() { + return this.preferredOs; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (majorVersions() != null) { + majorVersions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebJobInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebJobInner.java new file mode 100644 index 0000000000000..dfe77b1d134d5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebJobInner.java @@ -0,0 +1,215 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Web Job Information. */ +@Fluent +public final class WebJobInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebJobInner.class); + + /* + * WebJob resource specific properties + */ + @JsonProperty(value = "properties") + private WebJobProperties innerProperties; + + /** + * Get the innerProperties property: WebJob resource specific properties. + * + * @return the innerProperties value. + */ + private WebJobProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public WebJobInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the runCommand property: Run command. + * + * @return the runCommand value. + */ + public String runCommand() { + return this.innerProperties() == null ? null : this.innerProperties().runCommand(); + } + + /** + * Set the runCommand property: Run command. + * + * @param runCommand the runCommand value to set. + * @return the WebJobInner object itself. + */ + public WebJobInner withRunCommand(String runCommand) { + if (this.innerProperties() == null) { + this.innerProperties = new WebJobProperties(); + } + this.innerProperties().withRunCommand(runCommand); + return this; + } + + /** + * Get the url property: Job URL. + * + * @return the url value. + */ + public String url() { + return this.innerProperties() == null ? null : this.innerProperties().url(); + } + + /** + * Set the url property: Job URL. + * + * @param url the url value to set. + * @return the WebJobInner object itself. + */ + public WebJobInner withUrl(String url) { + if (this.innerProperties() == null) { + this.innerProperties = new WebJobProperties(); + } + this.innerProperties().withUrl(url); + return this; + } + + /** + * Get the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + public String extraInfoUrl() { + return this.innerProperties() == null ? null : this.innerProperties().extraInfoUrl(); + } + + /** + * Set the extraInfoUrl property: Extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set. + * @return the WebJobInner object itself. + */ + public WebJobInner withExtraInfoUrl(String extraInfoUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebJobProperties(); + } + this.innerProperties().withExtraInfoUrl(extraInfoUrl); + return this; + } + + /** + * Get the webJobType property: Job type. + * + * @return the webJobType value. + */ + public WebJobType webJobType() { + return this.innerProperties() == null ? null : this.innerProperties().webJobType(); + } + + /** + * Set the webJobType property: Job type. + * + * @param webJobType the webJobType value to set. + * @return the WebJobInner object itself. + */ + public WebJobInner withWebJobType(WebJobType webJobType) { + if (this.innerProperties() == null) { + this.innerProperties = new WebJobProperties(); + } + this.innerProperties().withWebJobType(webJobType); + return this; + } + + /** + * Get the error property: Error information. + * + * @return the error value. + */ + public String error() { + return this.innerProperties() == null ? null : this.innerProperties().error(); + } + + /** + * Set the error property: Error information. + * + * @param error the error value to set. + * @return the WebJobInner object itself. + */ + public WebJobInner withError(String error) { + if (this.innerProperties() == null) { + this.innerProperties = new WebJobProperties(); + } + this.innerProperties().withError(error); + return this; + } + + /** + * Get the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + public Boolean usingSdk() { + return this.innerProperties() == null ? null : this.innerProperties().usingSdk(); + } + + /** + * Set the usingSdk property: Using SDK?. + * + * @param usingSdk the usingSdk value to set. + * @return the WebJobInner object itself. + */ + public WebJobInner withUsingSdk(Boolean usingSdk) { + if (this.innerProperties() == null) { + this.innerProperties = new WebJobProperties(); + } + this.innerProperties().withUsingSdk(usingSdk); + return this; + } + + /** + * Get the settings property: Job settings. + * + * @return the settings value. + */ + public Map settings() { + return this.innerProperties() == null ? null : this.innerProperties().settings(); + } + + /** + * Set the settings property: Job settings. + * + * @param settings the settings value to set. + * @return the WebJobInner object itself. + */ + public WebJobInner withSettings(Map settings) { + if (this.innerProperties() == null) { + this.innerProperties = new WebJobProperties(); + } + this.innerProperties().withSettings(settings); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebJobProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebJobProperties.java new file mode 100644 index 0000000000000..f14151a3b8b69 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebJobProperties.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** WebJob resource specific properties. */ +@Fluent +public final class WebJobProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebJobProperties.class); + + /* + * Run command. + */ + @JsonProperty(value = "run_command") + private String runCommand; + + /* + * Job URL. + */ + @JsonProperty(value = "url") + private String url; + + /* + * Extra Info URL. + */ + @JsonProperty(value = "extra_info_url") + private String extraInfoUrl; + + /* + * Job type. + */ + @JsonProperty(value = "web_job_type") + private WebJobType webJobType; + + /* + * Error information. + */ + @JsonProperty(value = "error") + private String error; + + /* + * Using SDK? + */ + @JsonProperty(value = "using_sdk") + private Boolean usingSdk; + + /* + * Job settings. + */ + @JsonProperty(value = "settings") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map settings; + + /** + * Get the runCommand property: Run command. + * + * @return the runCommand value. + */ + public String runCommand() { + return this.runCommand; + } + + /** + * Set the runCommand property: Run command. + * + * @param runCommand the runCommand value to set. + * @return the WebJobProperties object itself. + */ + public WebJobProperties withRunCommand(String runCommand) { + this.runCommand = runCommand; + return this; + } + + /** + * Get the url property: Job URL. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: Job URL. + * + * @param url the url value to set. + * @return the WebJobProperties object itself. + */ + public WebJobProperties withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + public String extraInfoUrl() { + return this.extraInfoUrl; + } + + /** + * Set the extraInfoUrl property: Extra Info URL. + * + * @param extraInfoUrl the extraInfoUrl value to set. + * @return the WebJobProperties object itself. + */ + public WebJobProperties withExtraInfoUrl(String extraInfoUrl) { + this.extraInfoUrl = extraInfoUrl; + return this; + } + + /** + * Get the webJobType property: Job type. + * + * @return the webJobType value. + */ + public WebJobType webJobType() { + return this.webJobType; + } + + /** + * Set the webJobType property: Job type. + * + * @param webJobType the webJobType value to set. + * @return the WebJobProperties object itself. + */ + public WebJobProperties withWebJobType(WebJobType webJobType) { + this.webJobType = webJobType; + return this; + } + + /** + * Get the error property: Error information. + * + * @return the error value. + */ + public String error() { + return this.error; + } + + /** + * Set the error property: Error information. + * + * @param error the error value to set. + * @return the WebJobProperties object itself. + */ + public WebJobProperties withError(String error) { + this.error = error; + return this; + } + + /** + * Get the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + public Boolean usingSdk() { + return this.usingSdk; + } + + /** + * Set the usingSdk property: Using SDK?. + * + * @param usingSdk the usingSdk value to set. + * @return the WebJobProperties object itself. + */ + public WebJobProperties withUsingSdk(Boolean usingSdk) { + this.usingSdk = usingSdk; + return this; + } + + /** + * Get the settings property: Job settings. + * + * @return the settings value. + */ + public Map settings() { + return this.settings; + } + + /** + * Set the settings property: Job settings. + * + * @param settings the settings value to set. + * @return the WebJobProperties object itself. + */ + public WebJobProperties withSettings(Map settings) { + this.settings = settings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebSiteInstanceStatusInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebSiteInstanceStatusInner.java new file mode 100644 index 0000000000000..cbae8cafbcc45 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebSiteInstanceStatusInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ContainerInfo; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.SiteRuntimeState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The WebSiteInstanceStatus model. */ +@Fluent +public final class WebSiteInstanceStatusInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebSiteInstanceStatusInner.class); + + /* + * WebSiteInstanceStatus resource specific properties + */ + @JsonProperty(value = "properties") + private WebSiteInstanceStatusProperties innerProperties; + + /** + * Get the innerProperties property: WebSiteInstanceStatus resource specific properties. + * + * @return the innerProperties value. + */ + private WebSiteInstanceStatusProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public WebSiteInstanceStatusInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the state property: The state property. + * + * @return the state value. + */ + public SiteRuntimeState state() { + return this.innerProperties() == null ? null : this.innerProperties().state(); + } + + /** + * Set the state property: The state property. + * + * @param state the state value to set. + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withState(SiteRuntimeState state) { + if (this.innerProperties() == null) { + this.innerProperties = new WebSiteInstanceStatusProperties(); + } + this.innerProperties().withState(state); + return this; + } + + /** + * Get the statusUrl property: Link to the GetStatusApi in Kudu. + * + * @return the statusUrl value. + */ + public String statusUrl() { + return this.innerProperties() == null ? null : this.innerProperties().statusUrl(); + } + + /** + * Set the statusUrl property: Link to the GetStatusApi in Kudu. + * + * @param statusUrl the statusUrl value to set. + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withStatusUrl(String statusUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebSiteInstanceStatusProperties(); + } + this.innerProperties().withStatusUrl(statusUrl); + return this; + } + + /** + * Get the detectorUrl property: Link to the Diagnose and Solve Portal. + * + * @return the detectorUrl value. + */ + public String detectorUrl() { + return this.innerProperties() == null ? null : this.innerProperties().detectorUrl(); + } + + /** + * Set the detectorUrl property: Link to the Diagnose and Solve Portal. + * + * @param detectorUrl the detectorUrl value to set. + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withDetectorUrl(String detectorUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebSiteInstanceStatusProperties(); + } + this.innerProperties().withDetectorUrl(detectorUrl); + return this; + } + + /** + * Get the consoleUrl property: Link to the console to web app instance. + * + * @return the consoleUrl value. + */ + public String consoleUrl() { + return this.innerProperties() == null ? null : this.innerProperties().consoleUrl(); + } + + /** + * Set the consoleUrl property: Link to the console to web app instance. + * + * @param consoleUrl the consoleUrl value to set. + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withConsoleUrl(String consoleUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebSiteInstanceStatusProperties(); + } + this.innerProperties().withConsoleUrl(consoleUrl); + return this; + } + + /** + * Get the healthCheckUrl property: Link to the console to web app instance. + * + * @return the healthCheckUrl value. + */ + public String healthCheckUrl() { + return this.innerProperties() == null ? null : this.innerProperties().healthCheckUrl(); + } + + /** + * Set the healthCheckUrl property: Link to the console to web app instance. + * + * @param healthCheckUrl the healthCheckUrl value to set. + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withHealthCheckUrl(String healthCheckUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new WebSiteInstanceStatusProperties(); + } + this.innerProperties().withHealthCheckUrl(healthCheckUrl); + return this; + } + + /** + * Get the containers property: Dictionary of <ContainerInfo>. + * + * @return the containers value. + */ + public Map containers() { + return this.innerProperties() == null ? null : this.innerProperties().containers(); + } + + /** + * Set the containers property: Dictionary of <ContainerInfo>. + * + * @param containers the containers value to set. + * @return the WebSiteInstanceStatusInner object itself. + */ + public WebSiteInstanceStatusInner withContainers(Map containers) { + if (this.innerProperties() == null) { + this.innerProperties = new WebSiteInstanceStatusProperties(); + } + this.innerProperties().withContainers(containers); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebSiteInstanceStatusProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebSiteInstanceStatusProperties.java new file mode 100644 index 0000000000000..7f4daa224af2f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WebSiteInstanceStatusProperties.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ContainerInfo; +import com.azure.resourcemanager.appservice.generated.models.SiteRuntimeState; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** WebSiteInstanceStatus resource specific properties. */ +@Fluent +public final class WebSiteInstanceStatusProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebSiteInstanceStatusProperties.class); + + /* + * The state property. + */ + @JsonProperty(value = "state") + private SiteRuntimeState state; + + /* + * Link to the GetStatusApi in Kudu + */ + @JsonProperty(value = "statusUrl") + private String statusUrl; + + /* + * Link to the Diagnose and Solve Portal + */ + @JsonProperty(value = "detectorUrl") + private String detectorUrl; + + /* + * Link to the console to web app instance + */ + @JsonProperty(value = "consoleUrl") + private String consoleUrl; + + /* + * Link to the console to web app instance + */ + @JsonProperty(value = "healthCheckUrl") + private String healthCheckUrl; + + /* + * Dictionary of + */ + @JsonProperty(value = "containers") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map containers; + + /** + * Get the state property: The state property. + * + * @return the state value. + */ + public SiteRuntimeState state() { + return this.state; + } + + /** + * Set the state property: The state property. + * + * @param state the state value to set. + * @return the WebSiteInstanceStatusProperties object itself. + */ + public WebSiteInstanceStatusProperties withState(SiteRuntimeState state) { + this.state = state; + return this; + } + + /** + * Get the statusUrl property: Link to the GetStatusApi in Kudu. + * + * @return the statusUrl value. + */ + public String statusUrl() { + return this.statusUrl; + } + + /** + * Set the statusUrl property: Link to the GetStatusApi in Kudu. + * + * @param statusUrl the statusUrl value to set. + * @return the WebSiteInstanceStatusProperties object itself. + */ + public WebSiteInstanceStatusProperties withStatusUrl(String statusUrl) { + this.statusUrl = statusUrl; + return this; + } + + /** + * Get the detectorUrl property: Link to the Diagnose and Solve Portal. + * + * @return the detectorUrl value. + */ + public String detectorUrl() { + return this.detectorUrl; + } + + /** + * Set the detectorUrl property: Link to the Diagnose and Solve Portal. + * + * @param detectorUrl the detectorUrl value to set. + * @return the WebSiteInstanceStatusProperties object itself. + */ + public WebSiteInstanceStatusProperties withDetectorUrl(String detectorUrl) { + this.detectorUrl = detectorUrl; + return this; + } + + /** + * Get the consoleUrl property: Link to the console to web app instance. + * + * @return the consoleUrl value. + */ + public String consoleUrl() { + return this.consoleUrl; + } + + /** + * Set the consoleUrl property: Link to the console to web app instance. + * + * @param consoleUrl the consoleUrl value to set. + * @return the WebSiteInstanceStatusProperties object itself. + */ + public WebSiteInstanceStatusProperties withConsoleUrl(String consoleUrl) { + this.consoleUrl = consoleUrl; + return this; + } + + /** + * Get the healthCheckUrl property: Link to the console to web app instance. + * + * @return the healthCheckUrl value. + */ + public String healthCheckUrl() { + return this.healthCheckUrl; + } + + /** + * Set the healthCheckUrl property: Link to the console to web app instance. + * + * @param healthCheckUrl the healthCheckUrl value to set. + * @return the WebSiteInstanceStatusProperties object itself. + */ + public WebSiteInstanceStatusProperties withHealthCheckUrl(String healthCheckUrl) { + this.healthCheckUrl = healthCheckUrl; + return this; + } + + /** + * Get the containers property: Dictionary of <ContainerInfo>. + * + * @return the containers value. + */ + public Map containers() { + return this.containers; + } + + /** + * Set the containers property: Dictionary of <ContainerInfo>. + * + * @param containers the containers value to set. + * @return the WebSiteInstanceStatusProperties object itself. + */ + public WebSiteInstanceStatusProperties withContainers(Map containers) { + this.containers = containers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (containers() != null) { + containers() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WorkerPool.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WorkerPool.java new file mode 100644 index 0000000000000..1d36ee7987070 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WorkerPool.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ComputeModeOptions; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Worker pool of an App Service Environment. */ +@Fluent +public final class WorkerPool { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkerPool.class); + + /* + * Worker size ID for referencing this worker pool. + */ + @JsonProperty(value = "workerSizeId") + private Integer workerSizeId; + + /* + * Shared or dedicated app hosting. + */ + @JsonProperty(value = "computeMode") + private ComputeModeOptions computeMode; + + /* + * VM size of the worker pool instances. + */ + @JsonProperty(value = "workerSize") + private String workerSize; + + /* + * Number of instances in the worker pool. + */ + @JsonProperty(value = "workerCount") + private Integer workerCount; + + /* + * Names of all instances in the worker pool (read only). + */ + @JsonProperty(value = "instanceNames", access = JsonProperty.Access.WRITE_ONLY) + private List instanceNames; + + /** + * Get the workerSizeId property: Worker size ID for referencing this worker pool. + * + * @return the workerSizeId value. + */ + public Integer workerSizeId() { + return this.workerSizeId; + } + + /** + * Set the workerSizeId property: Worker size ID for referencing this worker pool. + * + * @param workerSizeId the workerSizeId value to set. + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerSizeId(Integer workerSizeId) { + this.workerSizeId = workerSizeId; + return this; + } + + /** + * Get the computeMode property: Shared or dedicated app hosting. + * + * @return the computeMode value. + */ + public ComputeModeOptions computeMode() { + return this.computeMode; + } + + /** + * Set the computeMode property: Shared or dedicated app hosting. + * + * @param computeMode the computeMode value to set. + * @return the WorkerPool object itself. + */ + public WorkerPool withComputeMode(ComputeModeOptions computeMode) { + this.computeMode = computeMode; + return this; + } + + /** + * Get the workerSize property: VM size of the worker pool instances. + * + * @return the workerSize value. + */ + public String workerSize() { + return this.workerSize; + } + + /** + * Set the workerSize property: VM size of the worker pool instances. + * + * @param workerSize the workerSize value to set. + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerSize(String workerSize) { + this.workerSize = workerSize; + return this; + } + + /** + * Get the workerCount property: Number of instances in the worker pool. + * + * @return the workerCount value. + */ + public Integer workerCount() { + return this.workerCount; + } + + /** + * Set the workerCount property: Number of instances in the worker pool. + * + * @param workerCount the workerCount value to set. + * @return the WorkerPool object itself. + */ + public WorkerPool withWorkerCount(Integer workerCount) { + this.workerCount = workerCount; + return this; + } + + /** + * Get the instanceNames property: Names of all instances in the worker pool (read only). + * + * @return the instanceNames value. + */ + public List instanceNames() { + return this.instanceNames; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WorkerPoolResourceInner.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WorkerPoolResourceInner.java new file mode 100644 index 0000000000000..07f50d50e6fd6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/WorkerPoolResourceInner.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.appservice.generated.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.models.ComputeModeOptions; +import com.azure.resourcemanager.appservice.generated.models.ProxyOnlyResource; +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Worker pool of an App Service Environment ARM resource. */ +@Fluent +public final class WorkerPoolResourceInner extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkerPoolResourceInner.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private WorkerPool innerProperties; + + /* + * Description of a SKU for a scalable resource. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private WorkerPool innerProperties() { + return this.innerProperties; + } + + /** + * Get the sku property: Description of a SKU for a scalable resource. + * + * @return the sku value. + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set the sku property: Description of a SKU for a scalable resource. + * + * @param sku the sku value to set. + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + + /** {@inheritDoc} */ + @Override + public WorkerPoolResourceInner withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the workerSizeId property: Worker size ID for referencing this worker pool. + * + * @return the workerSizeId value. + */ + public Integer workerSizeId() { + return this.innerProperties() == null ? null : this.innerProperties().workerSizeId(); + } + + /** + * Set the workerSizeId property: Worker size ID for referencing this worker pool. + * + * @param workerSizeId the workerSizeId value to set. + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerSizeId(Integer workerSizeId) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkerPool(); + } + this.innerProperties().withWorkerSizeId(workerSizeId); + return this; + } + + /** + * Get the computeMode property: Shared or dedicated app hosting. + * + * @return the computeMode value. + */ + public ComputeModeOptions computeMode() { + return this.innerProperties() == null ? null : this.innerProperties().computeMode(); + } + + /** + * Set the computeMode property: Shared or dedicated app hosting. + * + * @param computeMode the computeMode value to set. + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withComputeMode(ComputeModeOptions computeMode) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkerPool(); + } + this.innerProperties().withComputeMode(computeMode); + return this; + } + + /** + * Get the workerSize property: VM size of the worker pool instances. + * + * @return the workerSize value. + */ + public String workerSize() { + return this.innerProperties() == null ? null : this.innerProperties().workerSize(); + } + + /** + * Set the workerSize property: VM size of the worker pool instances. + * + * @param workerSize the workerSize value to set. + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerSize(String workerSize) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkerPool(); + } + this.innerProperties().withWorkerSize(workerSize); + return this; + } + + /** + * Get the workerCount property: Number of instances in the worker pool. + * + * @return the workerCount value. + */ + public Integer workerCount() { + return this.innerProperties() == null ? null : this.innerProperties().workerCount(); + } + + /** + * Set the workerCount property: Number of instances in the worker pool. + * + * @param workerCount the workerCount value to set. + * @return the WorkerPoolResourceInner object itself. + */ + public WorkerPoolResourceInner withWorkerCount(Integer workerCount) { + if (this.innerProperties() == null) { + this.innerProperties = new WorkerPool(); + } + this.innerProperties().withWorkerCount(workerCount); + return this; + } + + /** + * Get the instanceNames property: Names of all instances in the worker pool (read only). + * + * @return the instanceNames value. + */ + public List instanceNames() { + return this.innerProperties() == null ? null : this.innerProperties().instanceNames(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + if (sku() != null) { + sku().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/package-info.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/package-info.java new file mode 100644 index 0000000000000..9040b085c46ce --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the inner data models for WebSiteManagementClient. WebSite Management Client. */ +package com.azure.resourcemanager.appservice.generated.fluent.models; diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/package-info.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/package-info.java new file mode 100644 index 0000000000000..1d75cb4fd8784 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the service clients for WebSiteManagementClient. WebSite Management Client. */ +package com.azure.resourcemanager.appservice.generated.fluent; diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AddressResponseImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AddressResponseImpl.java new file mode 100644 index 0000000000000..5327937f20ec5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AddressResponseImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AddressResponseInner; +import com.azure.resourcemanager.appservice.generated.models.AddressResponse; +import com.azure.resourcemanager.appservice.generated.models.VirtualIpMapping; +import java.util.Collections; +import java.util.List; + +public final class AddressResponseImpl implements AddressResponse { + private AddressResponseInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + AddressResponseImpl( + AddressResponseInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String serviceIpAddress() { + return this.innerModel().serviceIpAddress(); + } + + public String internalIpAddress() { + return this.innerModel().internalIpAddress(); + } + + public List outboundIpAddresses() { + List inner = this.innerModel().outboundIpAddresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List vipMappings() { + List inner = this.innerModel().vipMappings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public AddressResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AnalysisDefinitionImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AnalysisDefinitionImpl.java new file mode 100644 index 0000000000000..61862d20d54eb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AnalysisDefinitionImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AnalysisDefinitionInner; +import com.azure.resourcemanager.appservice.generated.models.AnalysisDefinition; + +public final class AnalysisDefinitionImpl implements AnalysisDefinition { + private AnalysisDefinitionInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + AnalysisDefinitionImpl( + AnalysisDefinitionInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String description() { + return this.innerModel().description(); + } + + public AnalysisDefinitionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ApiKVReferenceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ApiKVReferenceImpl.java new file mode 100644 index 0000000000000..39bbef55c96fd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ApiKVReferenceImpl.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ApiKVReferenceInner; +import com.azure.resourcemanager.appservice.generated.models.ApiKVReference; +import com.azure.resourcemanager.appservice.generated.models.ConfigReferenceSource; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.ResolveStatus; + +public final class ApiKVReferenceImpl implements ApiKVReference { + private ApiKVReferenceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ApiKVReferenceImpl( + ApiKVReferenceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String reference() { + return this.innerModel().reference(); + } + + public ResolveStatus status() { + return this.innerModel().status(); + } + + public String vaultName() { + return this.innerModel().vaultName(); + } + + public String secretName() { + return this.innerModel().secretName(); + } + + public String secretVersion() { + return this.innerModel().secretVersion(); + } + + public ManagedServiceIdentity identityType() { + return this.innerModel().identityType(); + } + + public String details() { + return this.innerModel().details(); + } + + public ConfigReferenceSource source() { + return this.innerModel().source(); + } + + public String activeVersion() { + return this.innerModel().activeVersion(); + } + + public ApiKVReferenceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrderImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrderImpl.java new file mode 100644 index 0000000000000..2073ee9059c71 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrderImpl.java @@ -0,0 +1,408 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificate; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateOrderInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrder; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrderPatchResource; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem; +import com.azure.resourcemanager.appservice.generated.models.CertificateDetails; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderContact; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderStatus; +import com.azure.resourcemanager.appservice.generated.models.CertificateProductType; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.ReissueCertificateOrderRequest; +import com.azure.resourcemanager.appservice.generated.models.RenewCertificateOrderRequest; +import com.azure.resourcemanager.appservice.generated.models.SiteSeal; +import com.azure.resourcemanager.appservice.generated.models.SiteSealRequest; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class AppServiceCertificateOrderImpl + implements AppServiceCertificateOrder, AppServiceCertificateOrder.Definition, AppServiceCertificateOrder.Update { + private AppServiceCertificateOrderInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public Map certificates() { + Map inner = this.innerModel().certificates(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String distinguishedName() { + return this.innerModel().distinguishedName(); + } + + public String domainVerificationToken() { + return this.innerModel().domainVerificationToken(); + } + + public Integer validityInYears() { + return this.innerModel().validityInYears(); + } + + public Integer keySize() { + return this.innerModel().keySize(); + } + + public CertificateProductType productType() { + return this.innerModel().productType(); + } + + public Boolean autoRenew() { + return this.innerModel().autoRenew(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public CertificateOrderStatus status() { + return this.innerModel().status(); + } + + public CertificateDetails signedCertificate() { + return this.innerModel().signedCertificate(); + } + + public String csr() { + return this.innerModel().csr(); + } + + public CertificateDetails intermediate() { + return this.innerModel().intermediate(); + } + + public CertificateDetails root() { + return this.innerModel().root(); + } + + public String serialNumber() { + return this.innerModel().serialNumber(); + } + + public OffsetDateTime lastCertificateIssuanceTime() { + return this.innerModel().lastCertificateIssuanceTime(); + } + + public OffsetDateTime expirationTime() { + return this.innerModel().expirationTime(); + } + + public Boolean isPrivateKeyExternal() { + return this.innerModel().isPrivateKeyExternal(); + } + + public List + appServiceCertificateNotRenewableReasons() { + List inner = + this.innerModel().appServiceCertificateNotRenewableReasons(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OffsetDateTime nextAutoRenewalTimestamp() { + return this.innerModel().nextAutoRenewalTimestamp(); + } + + public CertificateOrderContact contact() { + return this.innerModel().contact(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public AppServiceCertificateOrderInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String certificateOrderName; + + private AppServiceCertificateOrderPatchResource updateCertificateDistinguishedName; + + public AppServiceCertificateOrderImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public AppServiceCertificateOrder create() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .createOrUpdate(resourceGroupName, certificateOrderName, this.innerModel(), Context.NONE); + return this; + } + + public AppServiceCertificateOrder create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .createOrUpdate(resourceGroupName, certificateOrderName, this.innerModel(), context); + return this; + } + + AppServiceCertificateOrderImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new AppServiceCertificateOrderInner(); + this.serviceManager = serviceManager; + this.certificateOrderName = name; + } + + public AppServiceCertificateOrderImpl update() { + this.updateCertificateDistinguishedName = new AppServiceCertificateOrderPatchResource(); + return this; + } + + public AppServiceCertificateOrder apply() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .updateWithResponse( + resourceGroupName, certificateOrderName, updateCertificateDistinguishedName, Context.NONE) + .getValue(); + return this; + } + + public AppServiceCertificateOrder apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .updateWithResponse( + resourceGroupName, certificateOrderName, updateCertificateDistinguishedName, context) + .getValue(); + return this; + } + + AppServiceCertificateOrderImpl( + AppServiceCertificateOrderInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.certificateOrderName = Utils.getValueFromIdByName(innerObject.id(), "certificateOrders"); + } + + public AppServiceCertificateOrder refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .getByResourceGroupWithResponse(resourceGroupName, certificateOrderName, Context.NONE) + .getValue(); + return this; + } + + public AppServiceCertificateOrder refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .getByResourceGroupWithResponse(resourceGroupName, certificateOrderName, context) + .getValue(); + return this; + } + + public void reissue(ReissueCertificateOrderRequest reissueCertificateOrderRequest) { + serviceManager + .appServiceCertificateOrders() + .reissue(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest); + } + + public Response reissueWithResponse( + ReissueCertificateOrderRequest reissueCertificateOrderRequest, Context context) { + return serviceManager + .appServiceCertificateOrders() + .reissueWithResponse(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, context); + } + + public void renew(RenewCertificateOrderRequest renewCertificateOrderRequest) { + serviceManager + .appServiceCertificateOrders() + .renew(resourceGroupName, certificateOrderName, renewCertificateOrderRequest); + } + + public Response renewWithResponse( + RenewCertificateOrderRequest renewCertificateOrderRequest, Context context) { + return serviceManager + .appServiceCertificateOrders() + .renewWithResponse(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, context); + } + + public void resendEmail() { + serviceManager.appServiceCertificateOrders().resendEmail(resourceGroupName, certificateOrderName); + } + + public Response resendEmailWithResponse(Context context) { + return serviceManager + .appServiceCertificateOrders() + .resendEmailWithResponse(resourceGroupName, certificateOrderName, context); + } + + public void resendRequestEmails(NameIdentifierInner nameIdentifier) { + serviceManager + .appServiceCertificateOrders() + .resendRequestEmails(resourceGroupName, certificateOrderName, nameIdentifier); + } + + public Response resendRequestEmailsWithResponse(NameIdentifierInner nameIdentifier, Context context) { + return serviceManager + .appServiceCertificateOrders() + .resendRequestEmailsWithResponse(resourceGroupName, certificateOrderName, nameIdentifier, context); + } + + public SiteSeal retrieveSiteSeal(SiteSealRequest siteSealRequest) { + return serviceManager + .appServiceCertificateOrders() + .retrieveSiteSeal(resourceGroupName, certificateOrderName, siteSealRequest); + } + + public Response retrieveSiteSealWithResponse(SiteSealRequest siteSealRequest, Context context) { + return serviceManager + .appServiceCertificateOrders() + .retrieveSiteSealWithResponse(resourceGroupName, certificateOrderName, siteSealRequest, context); + } + + public void verifyDomainOwnership() { + serviceManager.appServiceCertificateOrders().verifyDomainOwnership(resourceGroupName, certificateOrderName); + } + + public Response verifyDomainOwnershipWithResponse(Context context) { + return serviceManager + .appServiceCertificateOrders() + .verifyDomainOwnershipWithResponse(resourceGroupName, certificateOrderName, context); + } + + public AppServiceCertificateOrderImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AppServiceCertificateOrderImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AppServiceCertificateOrderImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public AppServiceCertificateOrderImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateCertificateDistinguishedName.withKind(kind); + return this; + } + } + + public AppServiceCertificateOrderImpl withCertificates(Map certificates) { + if (isInCreateMode()) { + this.innerModel().withCertificates(certificates); + return this; + } else { + this.updateCertificateDistinguishedName.withCertificates(certificates); + return this; + } + } + + public AppServiceCertificateOrderImpl withDistinguishedName(String distinguishedName) { + this.innerModel().withDistinguishedName(distinguishedName); + return this; + } + + public AppServiceCertificateOrderImpl withValidityInYears(Integer validityInYears) { + this.innerModel().withValidityInYears(validityInYears); + return this; + } + + public AppServiceCertificateOrderImpl withKeySize(Integer keySize) { + this.innerModel().withKeySize(keySize); + return this; + } + + public AppServiceCertificateOrderImpl withProductType(CertificateProductType productType) { + this.innerModel().withProductType(productType); + return this; + } + + public AppServiceCertificateOrderImpl withAutoRenew(Boolean autoRenew) { + if (isInCreateMode()) { + this.innerModel().withAutoRenew(autoRenew); + return this; + } else { + this.updateCertificateDistinguishedName.withAutoRenew(autoRenew); + return this; + } + } + + public AppServiceCertificateOrderImpl withCsr(String csr) { + this.innerModel().withCsr(csr); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrdersClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrdersClientImpl.java new file mode 100644 index 0000000000000..4f76d1b82f4ae --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrdersClientImpl.java @@ -0,0 +1,4245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.AppServiceCertificateOrdersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateOrderInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateEmailInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateOrderActionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSealInner; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateCollection; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrderCollection; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrderPatchResource; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificatePatchResource; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.ReissueCertificateOrderRequest; +import com.azure.resourcemanager.appservice.generated.models.RenewCertificateOrderRequest; +import com.azure.resourcemanager.appservice.generated.models.SiteSealRequest; +import java.nio.ByteBuffer; +import java.util.List; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AppServiceCertificateOrdersClient. */ +public final class AppServiceCertificateOrdersClientImpl implements AppServiceCertificateOrdersClient { + private final ClientLogger logger = new ClientLogger(AppServiceCertificateOrdersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final AppServiceCertificateOrdersService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of AppServiceCertificateOrdersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AppServiceCertificateOrdersClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy + .create( + AppServiceCertificateOrdersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientAppServiceCertificateOrders to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface AppServiceCertificateOrdersService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders") + @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"}) + @Post( + "/subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration" + + "/validateCertificateRegistrationInformation") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> validatePurchaseInformation( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServiceCertificateOrderInner appServiceCertificateOrder, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.CertificateRegistration/certificateOrders/{certificateOrderName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServiceCertificateOrderInner certificateDistinguishedName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServiceCertificateOrderPatchResource certificateDistinguishedName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listCertificates( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @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.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getCertificate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdateCertificate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServiceCertificateResourceInner keyVaultCertificate, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteCertificate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateCertificate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServiceCertificatePatchResource keyVaultCertificate, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> reissue( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ReissueCertificateOrderRequest reissueCertificateOrderRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> renew( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RenewCertificateOrderRequest renewCertificateOrderRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resendEmail( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resendRequestEmails( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") NameIdentifierInner nameIdentifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> retrieveSiteSeal( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteSealRequest siteSealRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> verifyDomainOwnership( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> retrieveCertificateActions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> retrieveCertificateEmailHistory( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listCertificatesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for List all certificate orders in 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 collection of certificate orders. + */ + @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())); + } + + /** + * Description for List all certificate orders in 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 collection of certificate orders. + */ + @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)); + } + + /** + * Description for List all certificate orders in 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 collection of certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for List all certificate orders in 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 collection of certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List all certificate orders in 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 collection of certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for List all certificate orders in 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 collection of certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validatePurchaseInformationWithResponseAsync( + AppServiceCertificateOrderInner appServiceCertificateOrder) { + 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 (appServiceCertificateOrder == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter appServiceCertificateOrder is required and cannot be null.")); + } else { + appServiceCertificateOrder.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validatePurchaseInformation( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appServiceCertificateOrder, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validatePurchaseInformationWithResponseAsync( + AppServiceCertificateOrderInner appServiceCertificateOrder, 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 (appServiceCertificateOrder == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter appServiceCertificateOrder is required and cannot be null.")); + } else { + appServiceCertificateOrder.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validatePurchaseInformation( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appServiceCertificateOrder, + accept, + context); + } + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validatePurchaseInformationAsync(AppServiceCertificateOrderInner appServiceCertificateOrder) { + return validatePurchaseInformationWithResponseAsync(appServiceCertificateOrder) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 validatePurchaseInformation(AppServiceCertificateOrderInner appServiceCertificateOrder) { + validatePurchaseInformationAsync(appServiceCertificateOrder).block(); + } + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validatePurchaseInformationWithResponse( + AppServiceCertificateOrderInner appServiceCertificateOrder, Context context) { + return validatePurchaseInformationWithResponseAsync(appServiceCertificateOrder, context).block(); + } + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate orders. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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())); + } + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate orders. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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)); + } + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate orders. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup( + String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String certificateOrderName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String certificateOrderName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync( + String resourceGroupName, String certificateOrderName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, certificateOrderName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceCertificateOrderInner getByResourceGroup(String resourceGroupName, String certificateOrderName) { + return getByResourceGroupAsync(resourceGroupName, certificateOrderName).block(); + } + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String certificateOrderName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, certificateOrderName, context).block(); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (certificateDistinguishedName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter certificateDistinguishedName is required and cannot be null.")); + } else { + certificateDistinguishedName.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + certificateDistinguishedName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (certificateDistinguishedName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter certificateDistinguishedName is required and cannot be null.")); + } else { + certificateDistinguishedName.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + certificateDistinguishedName, + accept, + context); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AppServiceCertificateOrderInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AppServiceCertificateOrderInner.class, + AppServiceCertificateOrderInner.class, + this.client.getContext()); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AppServiceCertificateOrderInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync( + resourceGroupName, certificateOrderName, certificateDistinguishedName, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AppServiceCertificateOrderInner.class, + AppServiceCertificateOrderInner.class, + context); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AppServiceCertificateOrderInner> beginCreateOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName) { + return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName) + .getSyncPoller(); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AppServiceCertificateOrderInner> beginCreateOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, context) + .getSyncPoller(); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName) { + return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceCertificateOrderInner createOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName) { + return createOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).block(); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceCertificateOrderInner createOrUpdate( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderInner certificateDistinguishedName, + Context context) { + return createOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, context) + .block(); + } + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String certificateOrderName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String certificateOrderName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String certificateOrderName) { + return deleteWithResponseAsync(resourceGroupName, certificateOrderName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 certificateOrderName) { + deleteAsync(resourceGroupName, certificateOrderName).block(); + } + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String certificateOrderName, Context context) { + return deleteWithResponseAsync(resourceGroupName, certificateOrderName, context).block(); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderPatchResource certificateDistinguishedName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (certificateDistinguishedName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter certificateDistinguishedName is required and cannot be null.")); + } else { + certificateDistinguishedName.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + certificateDistinguishedName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderPatchResource certificateDistinguishedName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (certificateDistinguishedName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter certificateDistinguishedName is required and cannot be null.")); + } else { + certificateDistinguishedName.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + certificateDistinguishedName, + accept, + context); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderPatchResource certificateDistinguishedName) { + return updateWithResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceCertificateOrderInner update( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderPatchResource certificateDistinguishedName) { + return updateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).block(); + } + + /** + * Description for Create or update a certificate purchase order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param certificateDistinguishedName Distinguished name to use for the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String certificateOrderName, + AppServiceCertificateOrderPatchResource certificateDistinguishedName, + Context context) { + return updateWithResponseAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, context) + .block(); + } + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCertificatesSinglePageAsync( + String resourceGroupName, String certificateOrderName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .listCertificates( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + 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())); + } + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCertificatesSinglePageAsync( + String resourceGroupName, String certificateOrderName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .listCertificates( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + 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)); + } + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listCertificatesAsync( + String resourceGroupName, String certificateOrderName) { + return new PagedFlux<>( + () -> listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName), + nextLink -> listCertificatesNextSinglePageAsync(nextLink)); + } + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listCertificatesAsync( + String resourceGroupName, String certificateOrderName, Context context) { + return new PagedFlux<>( + () -> listCertificatesSinglePageAsync(resourceGroupName, certificateOrderName, context), + nextLink -> listCertificatesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCertificates( + String resourceGroupName, String certificateOrderName) { + return new PagedIterable<>(listCertificatesAsync(resourceGroupName, certificateOrderName)); + } + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCertificates( + String resourceGroupName, String certificateOrderName, Context context) { + return new PagedIterable<>(listCertificatesAsync(resourceGroupName, certificateOrderName, context)); + } + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCertificateWithResponseAsync( + String resourceGroupName, String certificateOrderName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getCertificate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCertificateWithResponseAsync( + String resourceGroupName, String certificateOrderName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getCertificate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCertificateAsync( + String resourceGroupName, String certificateOrderName, String name) { + return getCertificateWithResponseAsync(resourceGroupName, certificateOrderName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceCertificateResourceInner getCertificate( + String resourceGroupName, String certificateOrderName, String name) { + return getCertificateAsync(resourceGroupName, certificateOrderName, name).block(); + } + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCertificateWithResponse( + String resourceGroupName, String certificateOrderName, String name, Context context) { + return getCertificateWithResponseAsync(resourceGroupName, certificateOrderName, name, context).block(); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateCertificateWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (keyVaultCertificate == null) { + return Mono + .error(new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null.")); + } else { + keyVaultCertificate.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateCertificate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + keyVaultCertificate, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateCertificateWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (keyVaultCertificate == null) { + return Mono + .error(new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null.")); + } else { + keyVaultCertificate.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateCertificate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + keyVaultCertificate, + accept, + context); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AppServiceCertificateResourceInner> + beginCreateOrUpdateCertificateAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate) { + Mono>> mono = + createOrUpdateCertificateWithResponseAsync( + resourceGroupName, certificateOrderName, name, keyVaultCertificate); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AppServiceCertificateResourceInner.class, + AppServiceCertificateResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AppServiceCertificateResourceInner> + beginCreateOrUpdateCertificateAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateCertificateWithResponseAsync( + resourceGroupName, certificateOrderName, name, keyVaultCertificate, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AppServiceCertificateResourceInner.class, + AppServiceCertificateResourceInner.class, + context); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AppServiceCertificateResourceInner> + beginCreateOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate) { + return beginCreateOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate) + .getSyncPoller(); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AppServiceCertificateResourceInner> + beginCreateOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate, + Context context) { + return beginCreateOrUpdateCertificateAsync( + resourceGroupName, certificateOrderName, name, keyVaultCertificate, context) + .getSyncPoller(); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateCertificateAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate) { + return beginCreateOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateCertificateAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate, + Context context) { + return beginCreateOrUpdateCertificateAsync( + resourceGroupName, certificateOrderName, name, keyVaultCertificate, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceCertificateResourceInner createOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate) { + return createOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate) + .block(); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceCertificateResourceInner createOrUpdateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificateResourceInner keyVaultCertificate, + Context context) { + return createOrUpdateCertificateAsync( + resourceGroupName, certificateOrderName, name, keyVaultCertificate, context) + .block(); + } + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteCertificateWithResponseAsync( + String resourceGroupName, String certificateOrderName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteCertificate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteCertificateWithResponseAsync( + String resourceGroupName, String certificateOrderName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteCertificate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteCertificateAsync(String resourceGroupName, String certificateOrderName, String name) { + return deleteCertificateWithResponseAsync(resourceGroupName, certificateOrderName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 deleteCertificate(String resourceGroupName, String certificateOrderName, String name) { + deleteCertificateAsync(resourceGroupName, certificateOrderName, name).block(); + } + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteCertificateWithResponse( + String resourceGroupName, String certificateOrderName, String name, Context context) { + return deleteCertificateWithResponseAsync(resourceGroupName, certificateOrderName, name, context).block(); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateCertificateWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificatePatchResource keyVaultCertificate) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (keyVaultCertificate == null) { + return Mono + .error(new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null.")); + } else { + keyVaultCertificate.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateCertificate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + keyVaultCertificate, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateCertificateWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificatePatchResource keyVaultCertificate, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (keyVaultCertificate == null) { + return Mono + .error(new IllegalArgumentException("Parameter keyVaultCertificate is required and cannot be null.")); + } else { + keyVaultCertificate.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateCertificate( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + keyVaultCertificate, + accept, + context); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateCertificateAsync( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificatePatchResource keyVaultCertificate) { + return updateCertificateWithResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceCertificateResourceInner updateCertificate( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificatePatchResource keyVaultCertificate) { + return updateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).block(); + } + + /** + * Description for Creates or updates a certificate and associates with key vault secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @param keyVaultCertificate Key vault certificate resource Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateCertificateWithResponse( + String resourceGroupName, + String certificateOrderName, + String name, + AppServiceCertificatePatchResource keyVaultCertificate, + Context context) { + return updateCertificateWithResponseAsync( + resourceGroupName, certificateOrderName, name, keyVaultCertificate, context) + .block(); + } + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> reissueWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (reissueCertificateOrderRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter reissueCertificateOrderRequest is required and cannot be null.")); + } else { + reissueCertificateOrderRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .reissue( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + reissueCertificateOrderRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> reissueWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (reissueCertificateOrderRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter reissueCertificateOrderRequest is required and cannot be null.")); + } else { + reissueCertificateOrderRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .reissue( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + reissueCertificateOrderRequest, + accept, + context); + } + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono reissueAsync( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest) { + return reissueWithResponseAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 reissue( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest) { + reissueAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest).block(); + } + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response reissueWithResponse( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest, + Context context) { + return reissueWithResponseAsync( + resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, context) + .block(); + } + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> renewWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (renewCertificateOrderRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter renewCertificateOrderRequest is required and cannot be null.")); + } else { + renewCertificateOrderRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .renew( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + renewCertificateOrderRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> renewWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (renewCertificateOrderRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter renewCertificateOrderRequest is required and cannot be null.")); + } else { + renewCertificateOrderRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .renew( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + renewCertificateOrderRequest, + accept, + context); + } + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono renewAsync( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest) { + return renewWithResponseAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 renew( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest) { + renewAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest).block(); + } + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response renewWithResponse( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest, + Context context) { + return renewWithResponseAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, context) + .block(); + } + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resendEmailWithResponseAsync(String resourceGroupName, String certificateOrderName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .resendEmail( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resendEmailWithResponseAsync( + String resourceGroupName, String certificateOrderName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .resendEmail( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resendEmailAsync(String resourceGroupName, String certificateOrderName) { + return resendEmailWithResponseAsync(resourceGroupName, certificateOrderName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 resendEmail(String resourceGroupName, String certificateOrderName) { + resendEmailAsync(resourceGroupName, certificateOrderName).block(); + } + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resendEmailWithResponse( + String resourceGroupName, String certificateOrderName, Context context) { + return resendEmailWithResponseAsync(resourceGroupName, certificateOrderName, context).block(); + } + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resendRequestEmailsWithResponseAsync( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (nameIdentifier == null) { + return Mono.error(new IllegalArgumentException("Parameter nameIdentifier is required and cannot be null.")); + } else { + nameIdentifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resendRequestEmails( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + nameIdentifier, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resendRequestEmailsWithResponseAsync( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (nameIdentifier == null) { + return Mono.error(new IllegalArgumentException("Parameter nameIdentifier is required and cannot be null.")); + } else { + nameIdentifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resendRequestEmails( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + nameIdentifier, + accept, + context); + } + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resendRequestEmailsAsync( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier) { + return resendRequestEmailsWithResponseAsync(resourceGroupName, certificateOrderName, nameIdentifier) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 resendRequestEmails( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier) { + resendRequestEmailsAsync(resourceGroupName, certificateOrderName, nameIdentifier).block(); + } + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resendRequestEmailsWithResponse( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier, Context context) { + return resendRequestEmailsWithResponseAsync(resourceGroupName, certificateOrderName, nameIdentifier, context) + .block(); + } + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal 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 site seal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> retrieveSiteSealWithResponseAsync( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (siteSealRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSealRequest is required and cannot be null.")); + } else { + siteSealRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .retrieveSiteSeal( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSealRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal 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 site seal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> retrieveSiteSealWithResponseAsync( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 (siteSealRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSealRequest is required and cannot be null.")); + } else { + siteSealRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .retrieveSiteSeal( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSealRequest, + accept, + context); + } + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal 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 site seal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono retrieveSiteSealAsync( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest) { + return retrieveSiteSealWithResponseAsync(resourceGroupName, certificateOrderName, siteSealRequest) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal 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 site seal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSealInner retrieveSiteSeal( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest) { + return retrieveSiteSealAsync(resourceGroupName, certificateOrderName, siteSealRequest).block(); + } + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal 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 site seal. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response retrieveSiteSealWithResponse( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest, Context context) { + return retrieveSiteSealWithResponseAsync(resourceGroupName, certificateOrderName, siteSealRequest, context) + .block(); + } + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> verifyDomainOwnershipWithResponseAsync( + String resourceGroupName, String certificateOrderName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .verifyDomainOwnership( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> verifyDomainOwnershipWithResponseAsync( + String resourceGroupName, String certificateOrderName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .verifyDomainOwnership( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono verifyDomainOwnershipAsync(String resourceGroupName, String certificateOrderName) { + return verifyDomainOwnershipWithResponseAsync(resourceGroupName, certificateOrderName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 verifyDomainOwnership(String resourceGroupName, String certificateOrderName) { + verifyDomainOwnershipAsync(resourceGroupName, certificateOrderName).block(); + } + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response verifyDomainOwnershipWithResponse( + String resourceGroupName, String certificateOrderName, Context context) { + return verifyDomainOwnershipWithResponseAsync(resourceGroupName, certificateOrderName, context).block(); + } + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> retrieveCertificateActionsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .retrieveCertificateActions( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> retrieveCertificateActionsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .retrieveCertificateActions( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> retrieveCertificateActionsAsync( + String resourceGroupName, String name) { + return retrieveCertificateActionsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List retrieveCertificateActions(String resourceGroupName, String name) { + return retrieveCertificateActionsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> retrieveCertificateActionsWithResponse( + String resourceGroupName, String name, Context context) { + return retrieveCertificateActionsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> retrieveCertificateEmailHistoryWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .retrieveCertificateEmailHistory( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> retrieveCertificateEmailHistoryWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .retrieveCertificateEmailHistory( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> retrieveCertificateEmailHistoryAsync( + String resourceGroupName, String name) { + return retrieveCertificateEmailHistoryWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List retrieveCertificateEmailHistory(String resourceGroupName, String name) { + return retrieveCertificateEmailHistoryAsync(resourceGroupName, name).block(); + } + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> retrieveCertificateEmailHistoryWithResponse( + String resourceGroupName, String name, Context context) { + return retrieveCertificateEmailHistoryWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificate orders. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificate orders. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificate orders. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificate orders. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCertificatesNextSinglePageAsync( + 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.listCertificatesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificate order certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCertificatesNextSinglePageAsync( + 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 + .listCertificatesNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrdersImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrdersImpl.java new file mode 100644 index 0000000000000..22420d66dc959 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateOrdersImpl.java @@ -0,0 +1,533 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.AppServiceCertificateOrdersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateOrderInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateEmailInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateOrderActionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSealInner; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrder; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateOrders; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateResource; +import com.azure.resourcemanager.appservice.generated.models.CertificateEmail; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderAction; +import com.azure.resourcemanager.appservice.generated.models.ReissueCertificateOrderRequest; +import com.azure.resourcemanager.appservice.generated.models.RenewCertificateOrderRequest; +import com.azure.resourcemanager.appservice.generated.models.SiteSeal; +import com.azure.resourcemanager.appservice.generated.models.SiteSealRequest; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class AppServiceCertificateOrdersImpl implements AppServiceCertificateOrders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificateOrdersImpl.class); + + private final AppServiceCertificateOrdersClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public AppServiceCertificateOrdersImpl( + AppServiceCertificateOrdersClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new AppServiceCertificateOrderImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new AppServiceCertificateOrderImpl(inner1, this.manager())); + } + + public void validatePurchaseInformation(AppServiceCertificateOrderInner appServiceCertificateOrder) { + this.serviceClient().validatePurchaseInformation(appServiceCertificateOrder); + } + + public Response validatePurchaseInformationWithResponse( + AppServiceCertificateOrderInner appServiceCertificateOrder, Context context) { + return this.serviceClient().validatePurchaseInformationWithResponse(appServiceCertificateOrder, context); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new AppServiceCertificateOrderImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new AppServiceCertificateOrderImpl(inner1, this.manager())); + } + + public AppServiceCertificateOrder getByResourceGroup(String resourceGroupName, String certificateOrderName) { + AppServiceCertificateOrderInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, certificateOrderName); + if (inner != null) { + return new AppServiceCertificateOrderImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String certificateOrderName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, certificateOrderName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AppServiceCertificateOrderImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String certificateOrderName) { + this.serviceClient().delete(resourceGroupName, certificateOrderName); + } + + public Response deleteWithResponse(String resourceGroupName, String certificateOrderName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, certificateOrderName, context); + } + + public PagedIterable listCertificates( + String resourceGroupName, String certificateOrderName) { + PagedIterable inner = + this.serviceClient().listCertificates(resourceGroupName, certificateOrderName); + return Utils.mapPage(inner, inner1 -> new AppServiceCertificateResourceImpl(inner1, this.manager())); + } + + public PagedIterable listCertificates( + String resourceGroupName, String certificateOrderName, Context context) { + PagedIterable inner = + this.serviceClient().listCertificates(resourceGroupName, certificateOrderName, context); + return Utils.mapPage(inner, inner1 -> new AppServiceCertificateResourceImpl(inner1, this.manager())); + } + + public AppServiceCertificateResource getCertificate( + String resourceGroupName, String certificateOrderName, String name) { + AppServiceCertificateResourceInner inner = + this.serviceClient().getCertificate(resourceGroupName, certificateOrderName, name); + if (inner != null) { + return new AppServiceCertificateResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getCertificateWithResponse( + String resourceGroupName, String certificateOrderName, String name, Context context) { + Response inner = + this.serviceClient().getCertificateWithResponse(resourceGroupName, certificateOrderName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AppServiceCertificateResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteCertificate(String resourceGroupName, String certificateOrderName, String name) { + this.serviceClient().deleteCertificate(resourceGroupName, certificateOrderName, name); + } + + public Response deleteCertificateWithResponse( + String resourceGroupName, String certificateOrderName, String name, Context context) { + return this + .serviceClient() + .deleteCertificateWithResponse(resourceGroupName, certificateOrderName, name, context); + } + + public void reissue( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest) { + this.serviceClient().reissue(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest); + } + + public Response reissueWithResponse( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest, + Context context) { + return this + .serviceClient() + .reissueWithResponse(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, context); + } + + public void renew( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest) { + this.serviceClient().renew(resourceGroupName, certificateOrderName, renewCertificateOrderRequest); + } + + public Response renewWithResponse( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest, + Context context) { + return this + .serviceClient() + .renewWithResponse(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, context); + } + + public void resendEmail(String resourceGroupName, String certificateOrderName) { + this.serviceClient().resendEmail(resourceGroupName, certificateOrderName); + } + + public Response resendEmailWithResponse( + String resourceGroupName, String certificateOrderName, Context context) { + return this.serviceClient().resendEmailWithResponse(resourceGroupName, certificateOrderName, context); + } + + public void resendRequestEmails( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier) { + this.serviceClient().resendRequestEmails(resourceGroupName, certificateOrderName, nameIdentifier); + } + + public Response resendRequestEmailsWithResponse( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier, Context context) { + return this + .serviceClient() + .resendRequestEmailsWithResponse(resourceGroupName, certificateOrderName, nameIdentifier, context); + } + + public SiteSeal retrieveSiteSeal( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest) { + SiteSealInner inner = + this.serviceClient().retrieveSiteSeal(resourceGroupName, certificateOrderName, siteSealRequest); + if (inner != null) { + return new SiteSealImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response retrieveSiteSealWithResponse( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest, Context context) { + Response inner = + this + .serviceClient() + .retrieveSiteSealWithResponse(resourceGroupName, certificateOrderName, siteSealRequest, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteSealImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void verifyDomainOwnership(String resourceGroupName, String certificateOrderName) { + this.serviceClient().verifyDomainOwnership(resourceGroupName, certificateOrderName); + } + + public Response verifyDomainOwnershipWithResponse( + String resourceGroupName, String certificateOrderName, Context context) { + return this.serviceClient().verifyDomainOwnershipWithResponse(resourceGroupName, certificateOrderName, context); + } + + public List retrieveCertificateActions(String resourceGroupName, String name) { + List inner = + this.serviceClient().retrieveCertificateActions(resourceGroupName, name); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new CertificateOrderActionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> retrieveCertificateActionsWithResponse( + String resourceGroupName, String name, Context context) { + Response> inner = + this.serviceClient().retrieveCertificateActionsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new CertificateOrderActionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public List retrieveCertificateEmailHistory(String resourceGroupName, String name) { + List inner = + this.serviceClient().retrieveCertificateEmailHistory(resourceGroupName, name); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new CertificateEmailImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> retrieveCertificateEmailHistoryWithResponse( + String resourceGroupName, String name, Context context) { + Response> inner = + this.serviceClient().retrieveCertificateEmailHistoryWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new CertificateEmailImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public AppServiceCertificateOrder 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 certificateOrderName = Utils.getValueFromIdByName(id, "certificateOrders"); + if (certificateOrderName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'certificateOrders'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, certificateOrderName, 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 certificateOrderName = Utils.getValueFromIdByName(id, "certificateOrders"); + if (certificateOrderName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'certificateOrders'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, certificateOrderName, context); + } + + public AppServiceCertificateResource getCertificateById(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 certificateOrderName = Utils.getValueFromIdByName(id, "certificateOrders"); + if (certificateOrderName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'certificateOrders'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.getCertificateWithResponse(resourceGroupName, certificateOrderName, name, Context.NONE).getValue(); + } + + public Response getCertificateByIdWithResponse(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 certificateOrderName = Utils.getValueFromIdByName(id, "certificateOrders"); + if (certificateOrderName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'certificateOrders'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.getCertificateWithResponse(resourceGroupName, certificateOrderName, name, 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 certificateOrderName = Utils.getValueFromIdByName(id, "certificateOrders"); + if (certificateOrderName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'certificateOrders'.", id))); + } + this.deleteWithResponse(resourceGroupName, certificateOrderName, 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 certificateOrderName = Utils.getValueFromIdByName(id, "certificateOrders"); + if (certificateOrderName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'certificateOrders'.", id))); + } + return this.deleteWithResponse(resourceGroupName, certificateOrderName, context); + } + + public void deleteCertificateById(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 certificateOrderName = Utils.getValueFromIdByName(id, "certificateOrders"); + if (certificateOrderName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'certificateOrders'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + this.deleteCertificateWithResponse(resourceGroupName, certificateOrderName, name, Context.NONE); + } + + public Response deleteCertificateByIdWithResponse(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 certificateOrderName = Utils.getValueFromIdByName(id, "certificateOrders"); + if (certificateOrderName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'certificateOrders'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.deleteCertificateWithResponse(resourceGroupName, certificateOrderName, name, context); + } + + private AppServiceCertificateOrdersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public AppServiceCertificateOrderImpl define(String name) { + return new AppServiceCertificateOrderImpl(name, this.manager()); + } + + public AppServiceCertificateResourceImpl defineCertificate(String name) { + return new AppServiceCertificateResourceImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateResourceImpl.java new file mode 100644 index 0000000000000..88ce8c216d912 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceCertificateResourceImpl.java @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateResourceInner; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificatePatchResource; +import com.azure.resourcemanager.appservice.generated.models.AppServiceCertificateResource; +import com.azure.resourcemanager.appservice.generated.models.KeyVaultSecretStatus; +import java.util.Collections; +import java.util.Map; + +public final class AppServiceCertificateResourceImpl + implements AppServiceCertificateResource, + AppServiceCertificateResource.Definition, + AppServiceCertificateResource.Update { + private AppServiceCertificateResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public String keyVaultId() { + return this.innerModel().keyVaultId(); + } + + public String keyVaultSecretName() { + return this.innerModel().keyVaultSecretName(); + } + + public KeyVaultSecretStatus provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public AppServiceCertificateResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String certificateOrderName; + + private String name; + + private AppServiceCertificatePatchResource updateKeyVaultCertificate; + + public AppServiceCertificateResourceImpl withExistingCertificateOrder( + String resourceGroupName, String certificateOrderName) { + this.resourceGroupName = resourceGroupName; + this.certificateOrderName = certificateOrderName; + return this; + } + + public AppServiceCertificateResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .createOrUpdateCertificate( + resourceGroupName, certificateOrderName, name, this.innerModel(), Context.NONE); + return this; + } + + public AppServiceCertificateResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .createOrUpdateCertificate(resourceGroupName, certificateOrderName, name, this.innerModel(), context); + return this; + } + + AppServiceCertificateResourceImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new AppServiceCertificateResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public AppServiceCertificateResourceImpl update() { + this.updateKeyVaultCertificate = new AppServiceCertificatePatchResource(); + return this; + } + + public AppServiceCertificateResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .updateCertificateWithResponse( + resourceGroupName, certificateOrderName, name, updateKeyVaultCertificate, Context.NONE) + .getValue(); + return this; + } + + public AppServiceCertificateResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .updateCertificateWithResponse( + resourceGroupName, certificateOrderName, name, updateKeyVaultCertificate, context) + .getValue(); + return this; + } + + AppServiceCertificateResourceImpl( + AppServiceCertificateResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.certificateOrderName = Utils.getValueFromIdByName(innerObject.id(), "certificateOrders"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "certificates"); + } + + public AppServiceCertificateResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .getCertificateWithResponse(resourceGroupName, certificateOrderName, name, Context.NONE) + .getValue(); + return this; + } + + public AppServiceCertificateResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceCertificateOrders() + .getCertificateWithResponse(resourceGroupName, certificateOrderName, name, context) + .getValue(); + return this; + } + + public AppServiceCertificateResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AppServiceCertificateResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AppServiceCertificateResourceImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public AppServiceCertificateResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateKeyVaultCertificate.withKind(kind); + return this; + } + } + + public AppServiceCertificateResourceImpl withKeyVaultId(String keyVaultId) { + if (isInCreateMode()) { + this.innerModel().withKeyVaultId(keyVaultId); + return this; + } else { + this.updateKeyVaultCertificate.withKeyVaultId(keyVaultId); + return this; + } + } + + public AppServiceCertificateResourceImpl withKeyVaultSecretName(String keyVaultSecretName) { + if (isInCreateMode()) { + this.innerModel().withKeyVaultSecretName(keyVaultSecretName); + return this; + } else { + this.updateKeyVaultCertificate.withKeyVaultSecretName(keyVaultSecretName); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentResourceImpl.java new file mode 100644 index 0000000000000..de2c0e0bebd3e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentResourceImpl.java @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironmentResourceInner; +import com.azure.resourcemanager.appservice.generated.models.AppServiceEnvironmentPatchResource; +import com.azure.resourcemanager.appservice.generated.models.AppServiceEnvironmentResource; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentStatus; +import com.azure.resourcemanager.appservice.generated.models.LoadBalancingMode; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.Site; +import com.azure.resourcemanager.appservice.generated.models.VirtualNetworkProfile; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class AppServiceEnvironmentResourceImpl + implements AppServiceEnvironmentResource, + AppServiceEnvironmentResource.Definition, + AppServiceEnvironmentResource.Update { + private AppServiceEnvironmentResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public HostingEnvironmentStatus status() { + return this.innerModel().status(); + } + + public VirtualNetworkProfile virtualNetwork() { + return this.innerModel().virtualNetwork(); + } + + public LoadBalancingMode internalLoadBalancingMode() { + return this.innerModel().internalLoadBalancingMode(); + } + + public String multiSize() { + return this.innerModel().multiSize(); + } + + public Integer multiRoleCount() { + return this.innerModel().multiRoleCount(); + } + + public Integer ipsslAddressCount() { + return this.innerModel().ipsslAddressCount(); + } + + public String dnsSuffix() { + return this.innerModel().dnsSuffix(); + } + + public Integer maximumNumberOfMachines() { + return this.innerModel().maximumNumberOfMachines(); + } + + public Integer frontEndScaleFactor() { + return this.innerModel().frontEndScaleFactor(); + } + + public Boolean suspended() { + return this.innerModel().suspended(); + } + + public List clusterSettings() { + List inner = this.innerModel().clusterSettings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List userWhitelistedIpRanges() { + List inner = this.innerModel().userWhitelistedIpRanges(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean hasLinuxWorkers() { + return this.innerModel().hasLinuxWorkers(); + } + + public Integer dedicatedHostCount() { + return this.innerModel().dedicatedHostCount(); + } + + public Boolean zoneRedundant() { + return this.innerModel().zoneRedundant(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public AppServiceEnvironmentResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private AppServiceEnvironmentPatchResource updateHostingEnvironmentEnvelope; + + public AppServiceEnvironmentResourceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public AppServiceEnvironmentResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .createOrUpdate(resourceGroupName, name, this.innerModel(), Context.NONE); + return this; + } + + public AppServiceEnvironmentResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .createOrUpdate(resourceGroupName, name, this.innerModel(), context); + return this; + } + + AppServiceEnvironmentResourceImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new AppServiceEnvironmentResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public AppServiceEnvironmentResourceImpl update() { + this.updateHostingEnvironmentEnvelope = new AppServiceEnvironmentPatchResource(); + return this; + } + + public AppServiceEnvironmentResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .updateWithResponse(resourceGroupName, name, updateHostingEnvironmentEnvelope, Context.NONE) + .getValue(); + return this; + } + + public AppServiceEnvironmentResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .updateWithResponse(resourceGroupName, name, updateHostingEnvironmentEnvelope, context) + .getValue(); + return this; + } + + AppServiceEnvironmentResourceImpl( + AppServiceEnvironmentResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "hostingEnvironments"); + } + + public AppServiceEnvironmentResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE) + .getValue(); + return this; + } + + public AppServiceEnvironmentResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, name, context) + .getValue(); + return this; + } + + public PagedIterable changeVnet(VirtualNetworkProfile vnetInfo) { + return serviceManager.appServiceEnvironments().changeVnet(resourceGroupName, name, vnetInfo); + } + + public PagedIterable changeVnet(VirtualNetworkProfile vnetInfo, Context context) { + return serviceManager.appServiceEnvironments().changeVnet(resourceGroupName, name, vnetInfo, context); + } + + public void reboot() { + serviceManager.appServiceEnvironments().reboot(resourceGroupName, name); + } + + public Response rebootWithResponse(Context context) { + return serviceManager.appServiceEnvironments().rebootWithResponse(resourceGroupName, name, context); + } + + public PagedIterable resume() { + return serviceManager.appServiceEnvironments().resume(resourceGroupName, name); + } + + public PagedIterable resume(Context context) { + return serviceManager.appServiceEnvironments().resume(resourceGroupName, name, context); + } + + public PagedIterable suspend() { + return serviceManager.appServiceEnvironments().suspend(resourceGroupName, name); + } + + public PagedIterable suspend(Context context) { + return serviceManager.appServiceEnvironments().suspend(resourceGroupName, name, context); + } + + public AppServiceEnvironmentResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AppServiceEnvironmentResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AppServiceEnvironmentResourceImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public AppServiceEnvironmentResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withKind(kind); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + if (isInCreateMode()) { + this.innerModel().withVirtualNetwork(virtualNetwork); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withVirtualNetwork(virtualNetwork); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withInternalLoadBalancingMode( + LoadBalancingMode internalLoadBalancingMode) { + if (isInCreateMode()) { + this.innerModel().withInternalLoadBalancingMode(internalLoadBalancingMode); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withInternalLoadBalancingMode(internalLoadBalancingMode); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withMultiSize(String multiSize) { + if (isInCreateMode()) { + this.innerModel().withMultiSize(multiSize); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withMultiSize(multiSize); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withIpsslAddressCount(Integer ipsslAddressCount) { + if (isInCreateMode()) { + this.innerModel().withIpsslAddressCount(ipsslAddressCount); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withIpsslAddressCount(ipsslAddressCount); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withDnsSuffix(String dnsSuffix) { + if (isInCreateMode()) { + this.innerModel().withDnsSuffix(dnsSuffix); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withDnsSuffix(dnsSuffix); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withFrontEndScaleFactor(Integer frontEndScaleFactor) { + if (isInCreateMode()) { + this.innerModel().withFrontEndScaleFactor(frontEndScaleFactor); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withFrontEndScaleFactor(frontEndScaleFactor); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withClusterSettings(List clusterSettings) { + if (isInCreateMode()) { + this.innerModel().withClusterSettings(clusterSettings); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withClusterSettings(clusterSettings); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + if (isInCreateMode()) { + this.innerModel().withUserWhitelistedIpRanges(userWhitelistedIpRanges); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withUserWhitelistedIpRanges(userWhitelistedIpRanges); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withDedicatedHostCount(Integer dedicatedHostCount) { + if (isInCreateMode()) { + this.innerModel().withDedicatedHostCount(dedicatedHostCount); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withDedicatedHostCount(dedicatedHostCount); + return this; + } + } + + public AppServiceEnvironmentResourceImpl withZoneRedundant(Boolean zoneRedundant) { + if (isInCreateMode()) { + this.innerModel().withZoneRedundant(zoneRedundant); + return this; + } else { + this.updateHostingEnvironmentEnvelope.withZoneRedundant(zoneRedundant); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentsClientImpl.java new file mode 100644 index 0000000000000..ae21cea7c1c25 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentsClientImpl.java @@ -0,0 +1,10982 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.AppServiceEnvironmentsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.AddressResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironmentResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AseV3NetworkingConfigurationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostingEnvironmentDiagnosticsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.InboundEnvironmentEndpointInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceMetricDefinitionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StampCapacityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UsageInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WorkerPoolResourceInner; +import com.azure.resourcemanager.appservice.generated.models.AppServiceEnvironmentCollection; +import com.azure.resourcemanager.appservice.generated.models.AppServiceEnvironmentPatchResource; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlanCollection; +import com.azure.resourcemanager.appservice.generated.models.CsmUsageQuotaCollection; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.InboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.appservice.generated.models.OutboundEnvironmentEndpointCollection; +import com.azure.resourcemanager.appservice.generated.models.PrivateEndpointConnectionCollection; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.ResourceMetricDefinitionCollection; +import com.azure.resourcemanager.appservice.generated.models.SkuInfoCollection; +import com.azure.resourcemanager.appservice.generated.models.StampCapacityCollection; +import com.azure.resourcemanager.appservice.generated.models.UsageCollection; +import com.azure.resourcemanager.appservice.generated.models.VirtualNetworkProfile; +import com.azure.resourcemanager.appservice.generated.models.WebAppCollection; +import com.azure.resourcemanager.appservice.generated.models.WorkerPoolCollection; +import java.nio.ByteBuffer; +import java.util.List; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AppServiceEnvironmentsClient. */ +public final class AppServiceEnvironmentsClientImpl implements AppServiceEnvironmentsClient { + private final ClientLogger logger = new ClientLogger(AppServiceEnvironmentsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final AppServiceEnvironmentsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of AppServiceEnvironmentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AppServiceEnvironmentsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy + .create(AppServiceEnvironmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientAppServiceEnvironments to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface AppServiceEnvironmentsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments") + @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.Web" + + "/hostingEnvironments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.Web" + + "/hostingEnvironments/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}") + @ExpectedResponses({202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("forceDelete") Boolean forceDelete, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/capacities/compute") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listCapacities( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/capacities/virtualip") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getVipInfo( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/changeVirtualNetwork") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> changeVnet( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VirtualNetworkProfile vnetInfo, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/configurations/networking") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAseV3NetworkingConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/configurations/networking") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateAseNetworkingConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AseV3NetworkingConfigurationInner aseNetworkingConfiguration, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/diagnostics") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listDiagnostics( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/diagnostics/{diagnosticsName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDiagnosticsItem( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("diagnosticsName") String diagnosticsName, + @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.Web" + + "/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getInboundNetworkDependenciesEndpoints( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/multiRolePools") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listMultiRolePools( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/multiRolePools/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getMultiRolePool( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/multiRolePools/default") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdateMultiRolePool( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkerPoolResourceInner multiRolePoolEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/multiRolePools/default") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateMultiRolePool( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkerPoolResourceInner multiRolePoolEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listMultiRolePoolInstanceMetricDefinitions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("instance") String instance, + @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.Web" + + "/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listMultiRoleMetricDefinitions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/multiRolePools/default/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listMultiRolePoolSkus( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/multiRolePools/default/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listMultiRoleUsages( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listOperations( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getOutboundNetworkDependenciesEndpoints( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateEndpointConnectionList( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> approveOrRejectPrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> deletePrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @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.Web" + + "/hostingEnvironments/{name}/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateLinkResources( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/reboot") + @ExpectedResponses({202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> reboot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/resume") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> resume( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/serverfarms") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listAppServicePlans( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/sites") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWebApps( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("propertiesToInclude") String propertiesToInclude, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/suspend") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> suspend( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listUsages( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/workerPools") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWorkerPools( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/workerPools/{workerPoolName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getWorkerPool( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("workerPoolName") String workerPoolName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/workerPools/{workerPoolName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdateWorkerPool( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("workerPoolName") String workerPoolName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkerPoolResourceInner workerPoolEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/workerPools/{workerPoolName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateWorkerPool( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("workerPoolName") String workerPoolName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") WorkerPoolResourceInner workerPoolEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWorkerPoolInstanceMetricDefinitions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("workerPoolName") String workerPoolName, + @PathParam("instance") String instance, + @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.Web" + + "/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWebWorkerMetricDefinitions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("workerPoolName") String workerPoolName, + @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.Web" + + "/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWorkerPoolSkus( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("workerPoolName") String workerPoolName, + @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.Web" + + "/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWebWorkerUsages( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("workerPoolName") String workerPoolName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listCapacitiesNext( + @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, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> changeVnetNext( + @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> getInboundNetworkDependenciesEndpointsNext( + @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> listMultiRolePoolsNext( + @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> listMultiRolePoolInstanceMetricDefinitionsNext( + @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> listMultiRoleMetricDefinitionsNext( + @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> listMultiRolePoolSkusNext( + @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> listMultiRoleUsagesNext( + @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> getOutboundNetworkDependenciesEndpointsNext( + @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> getPrivateEndpointConnectionListNext( + @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, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resumeNext( + @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> listAppServicePlansNext( + @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> listWebAppsNext( + @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, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> suspendNext( + @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> listUsagesNext( + @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> listWorkerPoolsNext( + @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> listWorkerPoolInstanceMetricDefinitionsNext( + @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> listWebWorkerMetricDefinitionsNext( + @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> listWorkerPoolSkusNext( + @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> listWebWorkerUsagesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Get all App Service Environments for a subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @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())); + } + + /** + * Description for Get all App Service Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @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)); + } + + /** + * Description for Get all App Service Environments for a subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all App Service Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all App Service Environments for a subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for Get all App Service Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Environments. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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())); + } + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Environments. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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)); + } + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup( + String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceEnvironmentResourceInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (hostingEnvironmentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter hostingEnvironmentEnvelope is required and cannot be null.")); + } else { + hostingEnvironmentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + hostingEnvironmentEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String name, + AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (hostingEnvironmentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter hostingEnvironmentEnvelope is required and cannot be null.")); + } else { + hostingEnvironmentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + hostingEnvironmentEnvelope, + accept, + context); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AppServiceEnvironmentResourceInner> + beginCreateOrUpdateAsync( + String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AppServiceEnvironmentResourceInner.class, + AppServiceEnvironmentResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AppServiceEnvironmentResourceInner> + beginCreateOrUpdateAsync( + String resourceGroupName, + String name, + AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AppServiceEnvironmentResourceInner.class, + AppServiceEnvironmentResourceInner.class, + context); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AppServiceEnvironmentResourceInner> + beginCreateOrUpdate( + String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope).getSyncPoller(); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AppServiceEnvironmentResourceInner> + beginCreateOrUpdate( + String resourceGroupName, + String name, + AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context).getSyncPoller(); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String name, + AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceEnvironmentResourceInner createOrUpdate( + String resourceGroupName, String name, AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope) { + return createOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope).block(); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceEnvironmentResourceInner createOrUpdate( + String resourceGroupName, + String name, + AppServiceEnvironmentResourceInner hostingEnvironmentEnvelope, + Context context) { + return createOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context).block(); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String name, Boolean forceDelete) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + forceDelete, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String name, Boolean forceDelete, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + forceDelete, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String name, Boolean forceDelete) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String name, Boolean forceDelete, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, forceDelete, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Boolean forceDelete) { + return beginDeleteAsync(resourceGroupName, name, forceDelete).getSyncPoller(); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete( + String resourceGroupName, String name, Boolean forceDelete, Context context) { + return beginDeleteAsync(resourceGroupName, name, forceDelete, context).getSyncPoller(); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name, Boolean forceDelete) { + return beginDeleteAsync(resourceGroupName, name, forceDelete) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name) { + final Boolean forceDelete = null; + return beginDeleteAsync(resourceGroupName, name, forceDelete) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name, Boolean forceDelete, Context context) { + return beginDeleteAsync(resourceGroupName, name, forceDelete, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 name, Boolean forceDelete) { + deleteAsync(resourceGroupName, name, forceDelete).block(); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String name) { + final Boolean forceDelete = null; + deleteAsync(resourceGroupName, name, forceDelete).block(); + } + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 name, Boolean forceDelete, Context context) { + deleteAsync(resourceGroupName, name, forceDelete, context).block(); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (hostingEnvironmentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter hostingEnvironmentEnvelope is required and cannot be null.")); + } else { + hostingEnvironmentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + hostingEnvironmentEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, + String name, + AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (hostingEnvironmentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter hostingEnvironmentEnvelope is required and cannot be null.")); + } else { + hostingEnvironmentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + hostingEnvironmentEnvelope, + accept, + context); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String name, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope) { + return updateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServiceEnvironmentResourceInner update( + String resourceGroupName, String name, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope) { + return updateAsync(resourceGroupName, name, hostingEnvironmentEnvelope).block(); + } + + /** + * Description for Create or update an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param hostingEnvironmentEnvelope Configuration details of the App Service 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 app Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, + String name, + AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope, + Context context) { + return updateWithResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope, context).block(); + } + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of stamp capacities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCapacitiesSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listCapacities( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of stamp capacities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCapacitiesSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listCapacities( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of stamp capacities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listCapacitiesAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listCapacitiesSinglePageAsync(resourceGroupName, name), + nextLink -> listCapacitiesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of stamp capacities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listCapacitiesAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listCapacitiesSinglePageAsync(resourceGroupName, name, context), + nextLink -> listCapacitiesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of stamp capacities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCapacities(String resourceGroupName, String name) { + return new PagedIterable<>(listCapacitiesAsync(resourceGroupName, name)); + } + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of stamp capacities. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCapacities(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listCapacitiesAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 describes main public IP address and any extra virtual IPs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVipInfoWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getVipInfo( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 describes main public IP address and any extra virtual IPs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVipInfoWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getVipInfo( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 describes main public IP address and any extra virtual IPs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVipInfoAsync(String resourceGroupName, String name) { + return getVipInfoWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 describes main public IP address and any extra virtual IPs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AddressResponseInner getVipInfo(String resourceGroupName, String name) { + return getVipInfoAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 describes main public IP address and any extra virtual IPs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVipInfoWithResponse( + String resourceGroupName, String name, Context context) { + return getVipInfoWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> changeVnetSinglePageAsync( + String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (vnetInfo == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetInfo is required and cannot be null.")); + } else { + vnetInfo.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> { + Mono>> mono = + service + .changeVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + vnetInfo, + accept, + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + WebAppCollection.class, + WebAppCollection.class, + this.client.getContext()) + .last() + .flatMap(this.client::getLroFinalResultOrError)); + }) + .>map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> changeVnetSinglePageAsync( + String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (vnetInfo == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetInfo is required and cannot be null.")); + } else { + vnetInfo.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + Mono>> mono = + service + .changeVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + vnetInfo, + accept, + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), WebAppCollection.class, WebAppCollection.class, context) + .last() + .flatMap(this.client::getLroFinalResultOrError)) + .map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)); + } + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux changeVnetAsync( + String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { + return new PagedFlux<>( + () -> changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo), + nextLink -> changeVnetNextSinglePageAsync(nextLink)); + } + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux changeVnetAsync( + String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { + return new PagedFlux<>( + () -> changeVnetSinglePageAsync(resourceGroupName, name, vnetInfo, context), + nextLink -> changeVnetNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable changeVnet(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { + return new PagedIterable<>(changeVnetAsync(resourceGroupName, name, vnetInfo)); + } + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable changeVnet( + String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { + return new PagedIterable<>(changeVnetAsync(resourceGroupName, name, vnetInfo, context)); + } + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAseV3NetworkingConfigurationWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAseV3NetworkingConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAseV3NetworkingConfigurationWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAseV3NetworkingConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAseV3NetworkingConfigurationAsync( + String resourceGroupName, String name) { + return getAseV3NetworkingConfigurationWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AseV3NetworkingConfigurationInner getAseV3NetworkingConfiguration(String resourceGroupName, String name) { + return getAseV3NetworkingConfigurationAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAseV3NetworkingConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + return getAseV3NetworkingConfigurationWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAseNetworkingConfigurationWithResponseAsync( + String resourceGroupName, String name, AseV3NetworkingConfigurationInner aseNetworkingConfiguration) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (aseNetworkingConfiguration == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter aseNetworkingConfiguration is required and cannot be null.")); + } else { + aseNetworkingConfiguration.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAseNetworkingConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + aseNetworkingConfiguration, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAseNetworkingConfigurationWithResponseAsync( + String resourceGroupName, + String name, + AseV3NetworkingConfigurationInner aseNetworkingConfiguration, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (aseNetworkingConfiguration == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter aseNetworkingConfiguration is required and cannot be null.")); + } else { + aseNetworkingConfiguration.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAseNetworkingConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + aseNetworkingConfiguration, + accept, + context); + } + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAseNetworkingConfigurationAsync( + String resourceGroupName, String name, AseV3NetworkingConfigurationInner aseNetworkingConfiguration) { + return updateAseNetworkingConfigurationWithResponseAsync(resourceGroupName, name, aseNetworkingConfiguration) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AseV3NetworkingConfigurationInner updateAseNetworkingConfiguration( + String resourceGroupName, String name, AseV3NetworkingConfigurationInner aseNetworkingConfiguration) { + return updateAseNetworkingConfigurationAsync(resourceGroupName, name, aseNetworkingConfiguration).block(); + } + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAseNetworkingConfigurationWithResponse( + String resourceGroupName, + String name, + AseV3NetworkingConfigurationInner aseNetworkingConfiguration, + Context context) { + return updateAseNetworkingConfigurationWithResponseAsync( + resourceGroupName, name, aseNetworkingConfiguration, context) + .block(); + } + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of HostingEnvironmentDiagnostics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listDiagnosticsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listDiagnostics( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of HostingEnvironmentDiagnostics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listDiagnosticsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listDiagnostics( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of HostingEnvironmentDiagnostics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDiagnosticsAsync(String resourceGroupName, String name) { + return listDiagnosticsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of HostingEnvironmentDiagnostics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listDiagnostics(String resourceGroupName, String name) { + return listDiagnosticsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of HostingEnvironmentDiagnostics. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listDiagnosticsWithResponse( + String resourceGroupName, String name, Context context) { + return listDiagnosticsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for an App Service Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDiagnosticsItemWithResponseAsync( + String resourceGroupName, String name, String diagnosticsName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (diagnosticsName == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticsName is required 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 + .getDiagnosticsItem( + this.client.getEndpoint(), + resourceGroupName, + name, + diagnosticsName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for an App Service Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDiagnosticsItemWithResponseAsync( + String resourceGroupName, String name, String diagnosticsName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (diagnosticsName == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticsName is required 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 + .getDiagnosticsItem( + this.client.getEndpoint(), + resourceGroupName, + name, + diagnosticsName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for an App Service Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDiagnosticsItemAsync( + String resourceGroupName, String name, String diagnosticsName) { + return getDiagnosticsItemWithResponseAsync(resourceGroupName, name, diagnosticsName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for an App Service Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HostingEnvironmentDiagnosticsInner getDiagnosticsItem( + String resourceGroupName, String name, String diagnosticsName) { + return getDiagnosticsItemAsync(resourceGroupName, name, diagnosticsName).block(); + } + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for an App Service Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiagnosticsItemWithResponse( + String resourceGroupName, String name, String diagnosticsName, Context context) { + return getDiagnosticsItemWithResponseAsync(resourceGroupName, name, diagnosticsName, context).block(); + } + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInboundNetworkDependenciesEndpointsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getInboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInboundNetworkDependenciesEndpointsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getInboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getInboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getInboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, name), + nextLink -> getInboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getInboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getInboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, name, context), + nextLink -> getInboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getInboundNetworkDependenciesEndpoints( + String resourceGroupName, String name) { + return new PagedIterable<>(getInboundNetworkDependenciesEndpointsAsync(resourceGroupName, name)); + } + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getInboundNetworkDependenciesEndpoints( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getInboundNetworkDependenciesEndpointsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRolePoolsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMultiRolePools( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRolePoolsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMultiRolePools( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRolePoolsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listMultiRolePoolsSinglePageAsync(resourceGroupName, name), + nextLink -> listMultiRolePoolsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRolePoolsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listMultiRolePoolsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listMultiRolePoolsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRolePools(String resourceGroupName, String name) { + return new PagedIterable<>(listMultiRolePoolsAsync(resourceGroupName, name)); + } + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRolePools( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listMultiRolePoolsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMultiRolePoolWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getMultiRolePool( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMultiRolePoolWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getMultiRolePool( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMultiRolePoolAsync(String resourceGroupName, String name) { + return getMultiRolePoolWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner getMultiRolePool(String resourceGroupName, String name) { + return getMultiRolePoolAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMultiRolePoolWithResponse( + String resourceGroupName, String name, Context context) { + return getMultiRolePoolWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateMultiRolePoolWithResponseAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (multiRolePoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null.")); + } else { + multiRolePoolEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateMultiRolePool( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + multiRolePoolEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateMultiRolePoolWithResponseAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (multiRolePoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null.")); + } else { + multiRolePoolEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateMultiRolePool( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + multiRolePoolEnvelope, + accept, + context); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkerPoolResourceInner> + beginCreateOrUpdateMultiRolePoolAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + Mono>> mono = + createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + WorkerPoolResourceInner.class, + WorkerPoolResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkerPoolResourceInner> + beginCreateOrUpdateMultiRolePoolAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + WorkerPoolResourceInner.class, + WorkerPoolResourceInner.class, + context); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope).getSyncPoller(); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope, context) + .getSyncPoller(); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateMultiRolePoolAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateMultiRolePoolAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + return beginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner createOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return createOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope).block(); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner createOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + return createOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope, context).block(); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateMultiRolePoolWithResponseAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (multiRolePoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null.")); + } else { + multiRolePoolEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateMultiRolePool( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + multiRolePoolEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateMultiRolePoolWithResponseAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (multiRolePoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter multiRolePoolEnvelope is required and cannot be null.")); + } else { + multiRolePoolEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateMultiRolePool( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + multiRolePoolEnvelope, + accept, + context); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateMultiRolePoolAsync( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return updateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner updateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + return updateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope).block(); + } + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateMultiRolePoolWithResponse( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + return updateMultiRolePoolWithResponseAsync(resourceGroupName, name, multiRolePoolEnvelope, context).block(); + } + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync( + String resourceGroupName, String name, String instance) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instance == null) { + return Mono.error(new IllegalArgumentException("Parameter instance is required 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 + .listMultiRolePoolInstanceMetricDefinitions( + this.client.getEndpoint(), + resourceGroupName, + name, + instance, + 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())); + } + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync( + String resourceGroupName, String name, String instance, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instance == null) { + return Mono.error(new IllegalArgumentException("Parameter instance is required 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 + .listMultiRolePoolInstanceMetricDefinitions( + this.client.getEndpoint(), + resourceGroupName, + name, + instance, + 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)); + } + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRolePoolInstanceMetricDefinitionsAsync( + String resourceGroupName, String name, String instance) { + return new PagedFlux<>( + () -> listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, instance), + nextLink -> listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRolePoolInstanceMetricDefinitionsAsync( + String resourceGroupName, String name, String instance, Context context) { + return new PagedFlux<>( + () -> listMultiRolePoolInstanceMetricDefinitionsSinglePageAsync(resourceGroupName, name, instance, context), + nextLink -> listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRolePoolInstanceMetricDefinitions( + String resourceGroupName, String name, String instance) { + return new PagedIterable<>(listMultiRolePoolInstanceMetricDefinitionsAsync(resourceGroupName, name, instance)); + } + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRolePoolInstanceMetricDefinitions( + String resourceGroupName, String name, String instance, Context context) { + return new PagedIterable<>( + listMultiRolePoolInstanceMetricDefinitionsAsync(resourceGroupName, name, instance, context)); + } + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRoleMetricDefinitionsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMultiRoleMetricDefinitions( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRoleMetricDefinitionsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMultiRoleMetricDefinitions( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRoleMetricDefinitionsAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name), + nextLink -> listMultiRoleMetricDefinitionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRoleMetricDefinitionsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listMultiRoleMetricDefinitionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRoleMetricDefinitions( + String resourceGroupName, String name) { + return new PagedIterable<>(listMultiRoleMetricDefinitionsAsync(resourceGroupName, name)); + } + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRoleMetricDefinitions( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listMultiRoleMetricDefinitionsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRolePoolSkusSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMultiRolePoolSkus( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRolePoolSkusSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMultiRolePoolSkus( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRolePoolSkusAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name), + nextLink -> listMultiRolePoolSkusNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRolePoolSkusAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listMultiRolePoolSkusSinglePageAsync(resourceGroupName, name, context), + nextLink -> listMultiRolePoolSkusNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRolePoolSkus(String resourceGroupName, String name) { + return new PagedIterable<>(listMultiRolePoolSkusAsync(resourceGroupName, name)); + } + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRolePoolSkus(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listMultiRolePoolSkusAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of usages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRoleUsagesSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMultiRoleUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of usages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRoleUsagesSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMultiRoleUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRoleUsagesAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listMultiRoleUsagesSinglePageAsync(resourceGroupName, name), + nextLink -> listMultiRoleUsagesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listMultiRoleUsagesAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listMultiRoleUsagesSinglePageAsync(resourceGroupName, name, context), + nextLink -> listMultiRoleUsagesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRoleUsages(String resourceGroupName, String name) { + return new PagedIterable<>(listMultiRoleUsagesAsync(resourceGroupName, name)); + } + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listMultiRoleUsages(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listMultiRoleUsagesAsync(resourceGroupName, name, context)); + } + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listOperationsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listOperations( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listOperationsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listOperations( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsAsync(String resourceGroupName, String name) { + return listOperationsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listOperations(String resourceGroupName, String name) { + return listOperationsAsync(resourceGroupName, name).block(); + } + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 array of Operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listOperationsWithResponse( + String resourceGroupName, String name, Context context) { + return listOperationsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getOutboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getOutboundNetworkDependenciesEndpointsSinglePageAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getOutboundNetworkDependenciesEndpoints( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, name), + nextLink -> getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getOutboundNetworkDependenciesEndpointsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getOutboundNetworkDependenciesEndpointsSinglePageAsync(resourceGroupName, name, context), + nextLink -> getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String name) { + return new PagedIterable<>(getOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, name)); + } + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateEndpointConnectionList( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSinglePageAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateEndpointConnectionList( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getPrivateEndpointConnectionListAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getPrivateEndpointConnectionListSinglePageAsync(resourceGroupName, name), + nextLink -> getPrivateEndpointConnectionListNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getPrivateEndpointConnectionListAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getPrivateEndpointConnectionListSinglePageAsync(resourceGroupName, name, context), + nextLink -> getPrivateEndpointConnectionListNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name) { + return new PagedIterable<>(getPrivateEndpointConnectionListAsync(resourceGroupName, name)); + } + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getPrivateEndpointConnectionListAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .getPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .getPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return getPrivateEndpointConnectionWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return getPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).block(); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return getPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .block(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveOrRejectPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 (privateEndpointWrapper == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); + } else { + privateEndpointWrapper.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .approveOrRejectPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + privateEndpointWrapper, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveOrRejectPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 (privateEndpointWrapper == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); + } else { + privateEndpointWrapper.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .approveOrRejectPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + privateEndpointWrapper, + accept, + context); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + Mono>> mono = + approveOrRejectPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + RemotePrivateEndpointConnectionArmResourceInner.class, + RemotePrivateEndpointConnectionArmResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + approveOrRejectPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + RemotePrivateEndpointConnectionArmResourceInner.class, + RemotePrivateEndpointConnectionArmResourceInner.class, + context); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return approveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .block(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return approveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .block(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .deletePrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .deletePrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginDeletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + Mono>> mono = + deletePrivateEndpointConnectionWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Object.class, Object.class, this.client.getContext()); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginDeletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deletePrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Object.class, Object.class, context); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return beginDeletePrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return beginDeletePrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return deletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).block(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return deletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, context) + .block(); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourcesWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateLinkResources( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourcesWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateLinkResources( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateLinkResourcesAsync(String resourceGroupName, String name) { + return getPrivateLinkResourcesWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourcesWrapperInner getPrivateLinkResources(String resourceGroupName, String name) { + return getPrivateLinkResourcesAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context) { + return getPrivateLinkResourcesWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> rebootWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .reboot( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> rebootWithResponseAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .reboot( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rebootAsync(String resourceGroupName, String name) { + return rebootWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void reboot(String resourceGroupName, String name) { + rebootAsync(resourceGroupName, name).block(); + } + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response rebootWithResponse(String resourceGroupName, String name, Context context) { + return rebootWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resumeSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 -> { + Mono>> mono = + service + .resume( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + WebAppCollection.class, + WebAppCollection.class, + this.client.getContext()) + .last() + .flatMap(this.client::getLroFinalResultOrError)); + }) + .>map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resumeSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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); + Mono>> mono = + service + .resume( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), WebAppCollection.class, WebAppCollection.class, context) + .last() + .flatMap(this.client::getLroFinalResultOrError)) + .map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)); + } + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux resumeAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> resumeSinglePageAsync(resourceGroupName, name), nextLink -> resumeNextSinglePageAsync(nextLink)); + } + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux resumeAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> resumeSinglePageAsync(resourceGroupName, name, context), + nextLink -> resumeNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable resume(String resourceGroupName, String name) { + return new PagedIterable<>(resumeAsync(resourceGroupName, name)); + } + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable resume(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(resumeAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAppServicePlansSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listAppServicePlans( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAppServicePlansSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listAppServicePlans( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAppServicePlansAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listAppServicePlansSinglePageAsync(resourceGroupName, name), + nextLink -> listAppServicePlansNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAppServicePlansAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listAppServicePlansSinglePageAsync(resourceGroupName, name, context), + nextLink -> listAppServicePlansNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAppServicePlans(String resourceGroupName, String name) { + return new PagedIterable<>(listAppServicePlansAsync(resourceGroupName, name)); + } + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAppServicePlans( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listAppServicePlansAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsSinglePageAsync( + String resourceGroupName, String name, String propertiesToInclude) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listWebApps( + this.client.getEndpoint(), + resourceGroupName, + name, + propertiesToInclude, + 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())); + } + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsSinglePageAsync( + String resourceGroupName, String name, String propertiesToInclude, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listWebApps( + this.client.getEndpoint(), + resourceGroupName, + name, + propertiesToInclude, + 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)); + } + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebAppsAsync(String resourceGroupName, String name, String propertiesToInclude) { + return new PagedFlux<>( + () -> listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude), + nextLink -> listWebAppsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebAppsAsync(String resourceGroupName, String name) { + final String propertiesToInclude = null; + return new PagedFlux<>( + () -> listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude), + nextLink -> listWebAppsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebAppsAsync( + String resourceGroupName, String name, String propertiesToInclude, Context context) { + return new PagedFlux<>( + () -> listWebAppsSinglePageAsync(resourceGroupName, name, propertiesToInclude, context), + nextLink -> listWebAppsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebApps(String resourceGroupName, String name) { + final String propertiesToInclude = null; + return new PagedIterable<>(listWebAppsAsync(resourceGroupName, name, propertiesToInclude)); + } + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebApps( + String resourceGroupName, String name, String propertiesToInclude, Context context) { + return new PagedIterable<>(listWebAppsAsync(resourceGroupName, name, propertiesToInclude, context)); + } + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> suspendSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 -> { + Mono>> mono = + service + .suspend( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + WebAppCollection.class, + WebAppCollection.class, + this.client.getContext()) + .last() + .flatMap(this.client::getLroFinalResultOrError)); + }) + .>map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> suspendSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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); + Mono>> mono = + service + .suspend( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .cache(); + return Mono + .zip( + mono, + this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), WebAppCollection.class, WebAppCollection.class, context) + .last() + .flatMap(this.client::getLroFinalResultOrError)) + .map( + res -> + new PagedResponseBase<>( + res.getT1().getRequest(), + res.getT1().getStatusCode(), + res.getT1().getHeaders(), + res.getT2().value(), + res.getT2().nextLink(), + null)); + } + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux suspendAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> suspendSinglePageAsync(resourceGroupName, name), nextLink -> suspendNextSinglePageAsync(nextLink)); + } + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux suspendAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> suspendSinglePageAsync(resourceGroupName, name, context), + nextLink -> suspendNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable suspend(String resourceGroupName, String name) { + return new PagedIterable<>(suspendAsync(resourceGroupName, name)); + } + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable suspend(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(suspendAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSinglePageAsync( + String resourceGroupName, String name, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSinglePageAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync(String resourceGroupName, String name, String filter) { + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter), + nextLink -> listUsagesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync(String resourceGroupName, String name) { + final String filter = null; + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter), + nextLink -> listUsagesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync( + String resourceGroupName, String name, String filter, Context context) { + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter, context), + nextLink -> listUsagesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsages(String resourceGroupName, String name) { + final String filter = null; + return new PagedIterable<>(listUsagesAsync(resourceGroupName, name, filter)); + } + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsages( + String resourceGroupName, String name, String filter, Context context) { + return new PagedIterable<>(listUsagesAsync(resourceGroupName, name, filter, context)); + } + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listWorkerPools( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listWorkerPools( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWorkerPoolsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listWorkerPoolsSinglePageAsync(resourceGroupName, name), + nextLink -> listWorkerPoolsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWorkerPoolsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listWorkerPoolsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listWorkerPoolsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWorkerPools(String resourceGroupName, String name) { + return new PagedIterable<>(listWorkerPoolsAsync(resourceGroupName, name)); + } + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service 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 collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWorkerPools( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listWorkerPoolsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWorkerPoolWithResponseAsync( + String resourceGroupName, String name, String workerPoolName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 + .getWorkerPool( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWorkerPoolWithResponseAsync( + String resourceGroupName, String name, String workerPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 + .getWorkerPool( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWorkerPoolAsync( + String resourceGroupName, String name, String workerPoolName) { + return getWorkerPoolWithResponseAsync(resourceGroupName, name, workerPoolName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner getWorkerPool(String resourceGroupName, String name, String workerPoolName) { + return getWorkerPoolAsync(resourceGroupName, name, workerPoolName).block(); + } + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWorkerPoolWithResponse( + String resourceGroupName, String name, String workerPoolName, Context context) { + return getWorkerPoolWithResponseAsync(resourceGroupName, name, workerPoolName, context).block(); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWorkerPoolWithResponseAsync( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 (workerPoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null.")); + } else { + workerPoolEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateWorkerPool( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + workerPoolEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWorkerPoolWithResponseAsync( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 (workerPoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null.")); + } else { + workerPoolEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateWorkerPool( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + workerPoolEnvelope, + accept, + context); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPoolAsync( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + Mono>> mono = + createOrUpdateWorkerPoolWithResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + WorkerPoolResourceInner.class, + WorkerPoolResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPoolAsync( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWorkerPoolWithResponseAsync( + resourceGroupName, name, workerPoolName, workerPoolEnvelope, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + WorkerPoolResourceInner.class, + WorkerPoolResourceInner.class, + context); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPool( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return beginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope) + .getSyncPoller(); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, WorkerPoolResourceInner> beginCreateOrUpdateWorkerPool( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context) { + return beginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) + .getSyncPoller(); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateWorkerPoolAsync( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return beginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateWorkerPoolAsync( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context) { + return beginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner createOrUpdateWorkerPool( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return createOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).block(); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner createOrUpdateWorkerPool( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context) { + return createOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) + .block(); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWorkerPoolWithResponseAsync( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 (workerPoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null.")); + } else { + workerPoolEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateWorkerPool( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + workerPoolEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWorkerPoolWithResponseAsync( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 (workerPoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter workerPoolEnvelope is required and cannot be null.")); + } else { + workerPoolEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateWorkerPool( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + workerPoolEnvelope, + accept, + context); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateWorkerPoolAsync( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return updateWorkerPoolWithResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WorkerPoolResourceInner updateWorkerPool( + String resourceGroupName, String name, String workerPoolName, WorkerPoolResourceInner workerPoolEnvelope) { + return updateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).block(); + } + + /** + * Description for Create or update a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param workerPoolEnvelope Properties of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWorkerPoolWithResponse( + String resourceGroupName, + String name, + String workerPoolName, + WorkerPoolResourceInner workerPoolEnvelope, + Context context) { + return updateWorkerPoolWithResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, context) + .block(); + } + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolInstanceMetricDefinitionsSinglePageAsync( + String resourceGroupName, String name, String workerPoolName, String instance) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required and cannot be null.")); + } + if (instance == null) { + return Mono.error(new IllegalArgumentException("Parameter instance is required 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 + .listWorkerPoolInstanceMetricDefinitions( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + instance, + 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())); + } + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolInstanceMetricDefinitionsSinglePageAsync( + String resourceGroupName, String name, String workerPoolName, String instance, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required and cannot be null.")); + } + if (instance == null) { + return Mono.error(new IllegalArgumentException("Parameter instance is required 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 + .listWorkerPoolInstanceMetricDefinitions( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + instance, + 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)); + } + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWorkerPoolInstanceMetricDefinitionsAsync( + String resourceGroupName, String name, String workerPoolName, String instance) { + return new PagedFlux<>( + () -> + listWorkerPoolInstanceMetricDefinitionsSinglePageAsync( + resourceGroupName, name, workerPoolName, instance), + nextLink -> listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWorkerPoolInstanceMetricDefinitionsAsync( + String resourceGroupName, String name, String workerPoolName, String instance, Context context) { + return new PagedFlux<>( + () -> + listWorkerPoolInstanceMetricDefinitionsSinglePageAsync( + resourceGroupName, name, workerPoolName, instance, context), + nextLink -> listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWorkerPoolInstanceMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, String instance) { + return new PagedIterable<>( + listWorkerPoolInstanceMetricDefinitionsAsync(resourceGroupName, name, workerPoolName, instance)); + } + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWorkerPoolInstanceMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, String instance, Context context) { + return new PagedIterable<>( + listWorkerPoolInstanceMetricDefinitionsAsync(resourceGroupName, name, workerPoolName, instance, context)); + } + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebWorkerMetricDefinitionsSinglePageAsync( + String resourceGroupName, String name, String workerPoolName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 + .listWebWorkerMetricDefinitions( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + 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())); + } + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebWorkerMetricDefinitionsSinglePageAsync( + String resourceGroupName, String name, String workerPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 + .listWebWorkerMetricDefinitions( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + 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)); + } + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebWorkerMetricDefinitionsAsync( + String resourceGroupName, String name, String workerPoolName) { + return new PagedFlux<>( + () -> listWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName), + nextLink -> listWebWorkerMetricDefinitionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebWorkerMetricDefinitionsAsync( + String resourceGroupName, String name, String workerPoolName, Context context) { + return new PagedFlux<>( + () -> listWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName, context), + nextLink -> listWebWorkerMetricDefinitionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebWorkerMetricDefinitions( + String resourceGroupName, String name, String workerPoolName) { + return new PagedIterable<>(listWebWorkerMetricDefinitionsAsync(resourceGroupName, name, workerPoolName)); + } + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metric definitions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebWorkerMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, Context context) { + return new PagedIterable<>( + listWebWorkerMetricDefinitionsAsync(resourceGroupName, name, workerPoolName, context)); + } + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolSkusSinglePageAsync( + String resourceGroupName, String name, String workerPoolName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 + .listWorkerPoolSkus( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + 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())); + } + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolSkusSinglePageAsync( + String resourceGroupName, String name, String workerPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 + .listWorkerPoolSkus( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + 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)); + } + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWorkerPoolSkusAsync( + String resourceGroupName, String name, String workerPoolName) { + return new PagedFlux<>( + () -> listWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName), + nextLink -> listWorkerPoolSkusNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWorkerPoolSkusAsync( + String resourceGroupName, String name, String workerPoolName, Context context) { + return new PagedFlux<>( + () -> listWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName, context), + nextLink -> listWorkerPoolSkusNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWorkerPoolSkus( + String resourceGroupName, String name, String workerPoolName) { + return new PagedIterable<>(listWorkerPoolSkusAsync(resourceGroupName, name, workerPoolName)); + } + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWorkerPoolSkus( + String resourceGroupName, String name, String workerPoolName, Context context) { + return new PagedIterable<>(listWorkerPoolSkusAsync(resourceGroupName, name, workerPoolName, context)); + } + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 usages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebWorkerUsagesSinglePageAsync( + String resourceGroupName, String name, String workerPoolName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 + .listWebWorkerUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + 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())); + } + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 usages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebWorkerUsagesSinglePageAsync( + String resourceGroupName, String name, String workerPoolName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerPoolName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerPoolName is required 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 + .listWebWorkerUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + workerPoolName, + 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)); + } + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebWorkerUsagesAsync( + String resourceGroupName, String name, String workerPoolName) { + return new PagedFlux<>( + () -> listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName), + nextLink -> listWebWorkerUsagesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebWorkerUsagesAsync( + String resourceGroupName, String name, String workerPoolName, Context context) { + return new PagedFlux<>( + () -> listWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName, context), + nextLink -> listWebWorkerUsagesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebWorkerUsages(String resourceGroupName, String name, String workerPoolName) { + return new PagedIterable<>(listWebWorkerUsagesAsync(resourceGroupName, name, workerPoolName)); + } + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 usages. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebWorkerUsages( + String resourceGroupName, String name, String workerPoolName, Context context) { + return new PagedIterable<>(listWebWorkerUsagesAsync(resourceGroupName, name, workerPoolName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service Environments. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of stamp capacities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCapacitiesNextSinglePageAsync(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.listCapacitiesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of stamp capacities. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCapacitiesNextSinglePageAsync( + 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 + .listCapacitiesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> changeVnetNextSinglePageAsync(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.changeVnetNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> changeVnetNextSinglePageAsync(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 + .changeVnetNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getInboundNetworkDependenciesEndpointsNextSinglePageAsync(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 + .getInboundNetworkDependenciesEndpointsNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Inbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getInboundNetworkDependenciesEndpointsNextSinglePageAsync(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 + .getInboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRolePoolsNextSinglePageAsync(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.listMultiRolePoolsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRolePoolsNextSinglePageAsync( + 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 + .listMultiRolePoolsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(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 + .listMultiRolePoolInstanceMetricDefinitionsNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listMultiRolePoolInstanceMetricDefinitionsNextSinglePageAsync(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 + .listMultiRolePoolInstanceMetricDefinitionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRoleMetricDefinitionsNextSinglePageAsync( + 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.listMultiRoleMetricDefinitionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRoleMetricDefinitionsNextSinglePageAsync( + 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 + .listMultiRoleMetricDefinitionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRolePoolSkusNextSinglePageAsync(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.listMultiRolePoolSkusNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRolePoolSkusNextSinglePageAsync( + 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 + .listMultiRolePoolSkusNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of usages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRoleUsagesNextSinglePageAsync(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.listMultiRoleUsagesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of usages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMultiRoleUsagesNextSinglePageAsync(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 + .listMultiRoleUsagesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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 + .getOutboundNetworkDependenciesEndpointsNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Outbound Environment Endpoints. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getOutboundNetworkDependenciesEndpointsNextSinglePageAsync(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 + .getOutboundNetworkDependenciesEndpointsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListNextSinglePageAsync(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.getPrivateEndpointConnectionListNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListNextSinglePageAsync(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 + .getPrivateEndpointConnectionListNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resumeNextSinglePageAsync(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.resumeNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resumeNextSinglePageAsync(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 + .resumeNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAppServicePlansNextSinglePageAsync(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.listAppServicePlansNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAppServicePlansNextSinglePageAsync( + 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 + .listAppServicePlansNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsNextSinglePageAsync(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.listWebAppsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsNextSinglePageAsync(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 + .listWebAppsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> suspendNextSinglePageAsync(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.suspendNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> suspendNextSinglePageAsync(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 + .suspendNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesNextSinglePageAsync(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.listUsagesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesNextSinglePageAsync(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 + .listUsagesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolsNextSinglePageAsync(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.listWorkerPoolsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of worker pools. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolsNextSinglePageAsync( + 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 + .listWorkerPoolsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(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 + .listWorkerPoolInstanceMetricDefinitionsNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listWorkerPoolInstanceMetricDefinitionsNextSinglePageAsync(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 + .listWorkerPoolInstanceMetricDefinitionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebWorkerMetricDefinitionsNextSinglePageAsync( + 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.listWebWorkerMetricDefinitionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metric definitions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebWorkerMetricDefinitionsNextSinglePageAsync( + 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 + .listWebWorkerMetricDefinitionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolSkusNextSinglePageAsync(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.listWorkerPoolSkusNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkerPoolSkusNextSinglePageAsync(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 + .listWorkerPoolSkusNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of usages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebWorkerUsagesNextSinglePageAsync(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.listWebWorkerUsagesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of usages. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebWorkerUsagesNextSinglePageAsync(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 + .listWebWorkerUsagesNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentsImpl.java new file mode 100644 index 0000000000000..a421bcdcf0fec --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServiceEnvironmentsImpl.java @@ -0,0 +1,1012 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.AppServiceEnvironmentsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.AddressResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironmentResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AseV3NetworkingConfigurationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostingEnvironmentDiagnosticsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.InboundEnvironmentEndpointInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceMetricDefinitionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StampCapacityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UsageInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WorkerPoolResourceInner; +import com.azure.resourcemanager.appservice.generated.models.AddressResponse; +import com.azure.resourcemanager.appservice.generated.models.AppServiceEnvironmentResource; +import com.azure.resourcemanager.appservice.generated.models.AppServiceEnvironments; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlan; +import com.azure.resourcemanager.appservice.generated.models.AseV3NetworkingConfiguration; +import com.azure.resourcemanager.appservice.generated.models.CsmUsageQuota; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentDiagnostics; +import com.azure.resourcemanager.appservice.generated.models.InboundEnvironmentEndpoint; +import com.azure.resourcemanager.appservice.generated.models.Operation; +import com.azure.resourcemanager.appservice.generated.models.OutboundEnvironmentEndpoint; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkResourcesWrapper; +import com.azure.resourcemanager.appservice.generated.models.RemotePrivateEndpointConnectionArmResource; +import com.azure.resourcemanager.appservice.generated.models.ResourceMetricDefinition; +import com.azure.resourcemanager.appservice.generated.models.Site; +import com.azure.resourcemanager.appservice.generated.models.SkuInfo; +import com.azure.resourcemanager.appservice.generated.models.StampCapacity; +import com.azure.resourcemanager.appservice.generated.models.Usage; +import com.azure.resourcemanager.appservice.generated.models.VirtualNetworkProfile; +import com.azure.resourcemanager.appservice.generated.models.WorkerPoolResource; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class AppServiceEnvironmentsImpl implements AppServiceEnvironments { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceEnvironmentsImpl.class); + + private final AppServiceEnvironmentsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public AppServiceEnvironmentsImpl( + AppServiceEnvironmentsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new AppServiceEnvironmentResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new AppServiceEnvironmentResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new AppServiceEnvironmentResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new AppServiceEnvironmentResourceImpl(inner1, this.manager())); + } + + public AppServiceEnvironmentResource getByResourceGroup(String resourceGroupName, String name) { + AppServiceEnvironmentResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name); + if (inner != null) { + return new AppServiceEnvironmentResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AppServiceEnvironmentResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String name, Boolean forceDelete) { + this.serviceClient().delete(resourceGroupName, name, forceDelete); + } + + public void delete(String resourceGroupName, String name) { + this.serviceClient().delete(resourceGroupName, name); + } + + public void delete(String resourceGroupName, String name, Boolean forceDelete, Context context) { + this.serviceClient().delete(resourceGroupName, name, forceDelete, context); + } + + public PagedIterable listCapacities(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listCapacities(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new StampCapacityImpl(inner1, this.manager())); + } + + public PagedIterable listCapacities(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listCapacities(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new StampCapacityImpl(inner1, this.manager())); + } + + public AddressResponse getVipInfo(String resourceGroupName, String name) { + AddressResponseInner inner = this.serviceClient().getVipInfo(resourceGroupName, name); + if (inner != null) { + return new AddressResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getVipInfoWithResponse(String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getVipInfoWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AddressResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable changeVnet(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo) { + PagedIterable inner = this.serviceClient().changeVnet(resourceGroupName, name, vnetInfo); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable changeVnet( + String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context) { + PagedIterable inner = this.serviceClient().changeVnet(resourceGroupName, name, vnetInfo, context); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public AseV3NetworkingConfiguration getAseV3NetworkingConfiguration(String resourceGroupName, String name) { + AseV3NetworkingConfigurationInner inner = + this.serviceClient().getAseV3NetworkingConfiguration(resourceGroupName, name); + if (inner != null) { + return new AseV3NetworkingConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAseV3NetworkingConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getAseV3NetworkingConfigurationWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AseV3NetworkingConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AseV3NetworkingConfiguration updateAseNetworkingConfiguration( + String resourceGroupName, String name, AseV3NetworkingConfigurationInner aseNetworkingConfiguration) { + AseV3NetworkingConfigurationInner inner = + this.serviceClient().updateAseNetworkingConfiguration(resourceGroupName, name, aseNetworkingConfiguration); + if (inner != null) { + return new AseV3NetworkingConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateAseNetworkingConfigurationWithResponse( + String resourceGroupName, + String name, + AseV3NetworkingConfigurationInner aseNetworkingConfiguration, + Context context) { + Response inner = + this + .serviceClient() + .updateAseNetworkingConfigurationWithResponse( + resourceGroupName, name, aseNetworkingConfiguration, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AseV3NetworkingConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public List listDiagnostics(String resourceGroupName, String name) { + List inner = this.serviceClient().listDiagnostics(resourceGroupName, name); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new HostingEnvironmentDiagnosticsImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> listDiagnosticsWithResponse( + String resourceGroupName, String name, Context context) { + Response> inner = + this.serviceClient().listDiagnosticsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new HostingEnvironmentDiagnosticsImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public HostingEnvironmentDiagnostics getDiagnosticsItem( + String resourceGroupName, String name, String diagnosticsName) { + HostingEnvironmentDiagnosticsInner inner = + this.serviceClient().getDiagnosticsItem(resourceGroupName, name, diagnosticsName); + if (inner != null) { + return new HostingEnvironmentDiagnosticsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDiagnosticsItemWithResponse( + String resourceGroupName, String name, String diagnosticsName, Context context) { + Response inner = + this.serviceClient().getDiagnosticsItemWithResponse(resourceGroupName, name, diagnosticsName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HostingEnvironmentDiagnosticsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getInboundNetworkDependenciesEndpoints( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getInboundNetworkDependenciesEndpoints(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new InboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public PagedIterable getInboundNetworkDependenciesEndpoints( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getInboundNetworkDependenciesEndpoints(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new InboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRolePools(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listMultiRolePools(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new WorkerPoolResourceImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRolePools( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listMultiRolePools(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new WorkerPoolResourceImpl(inner1, this.manager())); + } + + public WorkerPoolResource getMultiRolePool(String resourceGroupName, String name) { + WorkerPoolResourceInner inner = this.serviceClient().getMultiRolePool(resourceGroupName, name); + if (inner != null) { + return new WorkerPoolResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getMultiRolePoolWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getMultiRolePoolWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WorkerPoolResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public WorkerPoolResource createOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + WorkerPoolResourceInner inner = + this.serviceClient().createOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope); + if (inner != null) { + return new WorkerPoolResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public WorkerPoolResource createOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + WorkerPoolResourceInner inner = + this.serviceClient().createOrUpdateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope, context); + if (inner != null) { + return new WorkerPoolResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public WorkerPoolResource updateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope) { + WorkerPoolResourceInner inner = + this.serviceClient().updateMultiRolePool(resourceGroupName, name, multiRolePoolEnvelope); + if (inner != null) { + return new WorkerPoolResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateMultiRolePoolWithResponse( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context) { + Response inner = + this + .serviceClient() + .updateMultiRolePoolWithResponse(resourceGroupName, name, multiRolePoolEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WorkerPoolResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listMultiRolePoolInstanceMetricDefinitions( + String resourceGroupName, String name, String instance) { + PagedIterable inner = + this.serviceClient().listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance); + return Utils.mapPage(inner, inner1 -> new ResourceMetricDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRolePoolInstanceMetricDefinitions( + String resourceGroupName, String name, String instance, Context context) { + PagedIterable inner = + this.serviceClient().listMultiRolePoolInstanceMetricDefinitions(resourceGroupName, name, instance, context); + return Utils.mapPage(inner, inner1 -> new ResourceMetricDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRoleMetricDefinitions( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listMultiRoleMetricDefinitions(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new ResourceMetricDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRoleMetricDefinitions( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listMultiRoleMetricDefinitions(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new ResourceMetricDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRolePoolSkus(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listMultiRolePoolSkus(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SkuInfoImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRolePoolSkus(String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listMultiRolePoolSkus(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SkuInfoImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRoleUsages(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listMultiRoleUsages(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + public PagedIterable listMultiRoleUsages(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listMultiRoleUsages(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + public List listOperations(String resourceGroupName, String name) { + List inner = this.serviceClient().listOperations(resourceGroupName, name); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new OperationImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> listOperationsWithResponse( + String resourceGroupName, String name, Context context) { + Response> inner = + this.serviceClient().listOperationsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new OperationImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public PagedIterable getOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getOutboundNetworkDependenciesEndpoints(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public PagedIterable getOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getOutboundNetworkDependenciesEndpoints(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new OutboundEnvironmentEndpointImpl(inner1, this.manager())); + } + + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getPrivateEndpointConnectionList(resourceGroupName, name); + return Utils + .mapPage(inner, inner1 -> new RemotePrivateEndpointConnectionArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getPrivateEndpointConnectionList(resourceGroupName, name, context); + return Utils + .mapPage(inner, inner1 -> new RemotePrivateEndpointConnectionArmResourceImpl(inner1, this.manager())); + } + + public RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this.serviceClient().getPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + Response inner = + this + .serviceClient() + .getPrivateEndpointConnectionWithResponse( + resourceGroupName, name, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RemotePrivateEndpointConnectionArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return this + .serviceClient() + .deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName); + } + + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return this + .serviceClient() + .deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, context); + } + + public PrivateLinkResourcesWrapper getPrivateLinkResources(String resourceGroupName, String name) { + PrivateLinkResourcesWrapperInner inner = this.serviceClient().getPrivateLinkResources(resourceGroupName, name); + if (inner != null) { + return new PrivateLinkResourcesWrapperImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getPrivateLinkResourcesWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourcesWrapperImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void reboot(String resourceGroupName, String name) { + this.serviceClient().reboot(resourceGroupName, name); + } + + public Response rebootWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().rebootWithResponse(resourceGroupName, name, context); + } + + public PagedIterable resume(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().resume(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable resume(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().resume(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable listAppServicePlans(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listAppServicePlans(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new AppServicePlanImpl(inner1, this.manager())); + } + + public PagedIterable listAppServicePlans(String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listAppServicePlans(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new AppServicePlanImpl(inner1, this.manager())); + } + + public PagedIterable listWebApps(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listWebApps(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable listWebApps( + String resourceGroupName, String name, String propertiesToInclude, Context context) { + PagedIterable inner = + this.serviceClient().listWebApps(resourceGroupName, name, propertiesToInclude, context); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable suspend(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().suspend(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable suspend(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().suspend(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable listUsages(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listUsages(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new CsmUsageQuotaImpl(inner1, this.manager())); + } + + public PagedIterable listUsages( + String resourceGroupName, String name, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listUsages(resourceGroupName, name, filter, context); + return Utils.mapPage(inner, inner1 -> new CsmUsageQuotaImpl(inner1, this.manager())); + } + + public PagedIterable listWorkerPools(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listWorkerPools(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new WorkerPoolResourceImpl(inner1, this.manager())); + } + + public PagedIterable listWorkerPools(String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listWorkerPools(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new WorkerPoolResourceImpl(inner1, this.manager())); + } + + public WorkerPoolResource getWorkerPool(String resourceGroupName, String name, String workerPoolName) { + WorkerPoolResourceInner inner = this.serviceClient().getWorkerPool(resourceGroupName, name, workerPoolName); + if (inner != null) { + return new WorkerPoolResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWorkerPoolWithResponse( + String resourceGroupName, String name, String workerPoolName, Context context) { + Response inner = + this.serviceClient().getWorkerPoolWithResponse(resourceGroupName, name, workerPoolName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WorkerPoolResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listWorkerPoolInstanceMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, String instance) { + PagedIterable inner = + this + .serviceClient() + .listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance); + return Utils.mapPage(inner, inner1 -> new ResourceMetricDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listWorkerPoolInstanceMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, String instance, Context context) { + PagedIterable inner = + this + .serviceClient() + .listWorkerPoolInstanceMetricDefinitions(resourceGroupName, name, workerPoolName, instance, context); + return Utils.mapPage(inner, inner1 -> new ResourceMetricDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listWebWorkerMetricDefinitions( + String resourceGroupName, String name, String workerPoolName) { + PagedIterable inner = + this.serviceClient().listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName); + return Utils.mapPage(inner, inner1 -> new ResourceMetricDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listWebWorkerMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, Context context) { + PagedIterable inner = + this.serviceClient().listWebWorkerMetricDefinitions(resourceGroupName, name, workerPoolName, context); + return Utils.mapPage(inner, inner1 -> new ResourceMetricDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listWorkerPoolSkus(String resourceGroupName, String name, String workerPoolName) { + PagedIterable inner = + this.serviceClient().listWorkerPoolSkus(resourceGroupName, name, workerPoolName); + return Utils.mapPage(inner, inner1 -> new SkuInfoImpl(inner1, this.manager())); + } + + public PagedIterable listWorkerPoolSkus( + String resourceGroupName, String name, String workerPoolName, Context context) { + PagedIterable inner = + this.serviceClient().listWorkerPoolSkus(resourceGroupName, name, workerPoolName, context); + return Utils.mapPage(inner, inner1 -> new SkuInfoImpl(inner1, this.manager())); + } + + public PagedIterable listWebWorkerUsages(String resourceGroupName, String name, String workerPoolName) { + PagedIterable inner = + this.serviceClient().listWebWorkerUsages(resourceGroupName, name, workerPoolName); + return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + public PagedIterable listWebWorkerUsages( + String resourceGroupName, String name, String workerPoolName, Context context) { + PagedIterable inner = + this.serviceClient().listWebWorkerUsages(resourceGroupName, name, workerPoolName, context); + return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + public AppServiceEnvironmentResource 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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, context); + } + + public RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnectionById(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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this + .getPrivateEndpointConnectionWithResponse( + resourceGroupName, name, privateEndpointConnectionName, Context.NONE) + .getValue(); + } + + public Response getPrivateEndpointConnectionByIdWithResponse( + 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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this + .getPrivateEndpointConnectionWithResponse(resourceGroupName, name, privateEndpointConnectionName, context); + } + + public WorkerPoolResource getWorkerPoolById(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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + String workerPoolName = Utils.getValueFromIdByName(id, "workerPools"); + if (workerPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workerPools'.", id))); + } + return this.getWorkerPoolWithResponse(resourceGroupName, name, workerPoolName, Context.NONE).getValue(); + } + + public Response getWorkerPoolByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + String workerPoolName = Utils.getValueFromIdByName(id, "workerPools"); + if (workerPoolName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'workerPools'.", id))); + } + return this.getWorkerPoolWithResponse(resourceGroupName, name, workerPoolName, 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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + Boolean localForceDelete = null; + this.delete(resourceGroupName, name, localForceDelete, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Boolean forceDelete, 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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + this.delete(resourceGroupName, name, forceDelete, context); + } + + public Object deletePrivateEndpointConnectionById(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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this + .deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, Context.NONE); + } + + public Object deletePrivateEndpointConnectionByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "hostingEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostingEnvironments'.", id))); + } + String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", + id))); + } + return this.deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, context); + } + + private AppServiceEnvironmentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public AppServiceEnvironmentResourceImpl define(String name) { + return new AppServiceEnvironmentResourceImpl(name, this.manager()); + } + + public RemotePrivateEndpointConnectionArmResourceImpl defineRemotePrivateEndpointConnectionArmResource( + String name) { + return new RemotePrivateEndpointConnectionArmResourceImpl(name, this.manager()); + } + + public WorkerPoolResourceImpl defineWorkerPool(String name) { + return new WorkerPoolResourceImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlanImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlanImpl.java new file mode 100644 index 0000000000000..645742f36a443 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlanImpl.java @@ -0,0 +1,436 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlan; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlanPatchResource; +import com.azure.resourcemanager.appservice.generated.models.ExtendedLocation; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.azure.resourcemanager.appservice.generated.models.StatusOptions; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +public final class AppServicePlanImpl implements AppServicePlan, AppServicePlan.Definition, AppServicePlan.Update { + private AppServicePlanInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 SkuDescription sku() { + return this.innerModel().sku(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String workerTierName() { + return this.innerModel().workerTierName(); + } + + public StatusOptions status() { + return this.innerModel().status(); + } + + public String subscription() { + return this.innerModel().subscription(); + } + + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerModel().hostingEnvironmentProfile(); + } + + public Integer maximumNumberOfWorkers() { + return this.innerModel().maximumNumberOfWorkers(); + } + + public String geoRegion() { + return this.innerModel().geoRegion(); + } + + public Boolean perSiteScaling() { + return this.innerModel().perSiteScaling(); + } + + public Boolean elasticScaleEnabled() { + return this.innerModel().elasticScaleEnabled(); + } + + public Integer maximumElasticWorkerCount() { + return this.innerModel().maximumElasticWorkerCount(); + } + + public Integer numberOfSites() { + return this.innerModel().numberOfSites(); + } + + public Boolean isSpot() { + return this.innerModel().isSpot(); + } + + public OffsetDateTime spotExpirationTime() { + return this.innerModel().spotExpirationTime(); + } + + public OffsetDateTime freeOfferExpirationTime() { + return this.innerModel().freeOfferExpirationTime(); + } + + public String resourceGroup() { + return this.innerModel().resourceGroup(); + } + + public Boolean reserved() { + return this.innerModel().reserved(); + } + + public Boolean isXenon() { + return this.innerModel().isXenon(); + } + + public Boolean hyperV() { + return this.innerModel().hyperV(); + } + + public Integer targetWorkerCount() { + return this.innerModel().targetWorkerCount(); + } + + public Integer targetWorkerSizeId() { + return this.innerModel().targetWorkerSizeId(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public KubeEnvironmentProfile kubeEnvironmentProfile() { + return this.innerModel().kubeEnvironmentProfile(); + } + + public Boolean zoneRedundant() { + return this.innerModel().zoneRedundant(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public AppServicePlanInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private AppServicePlanPatchResource updateAppServicePlan; + + public AppServicePlanImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public AppServicePlan create() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .createOrUpdate(resourceGroupName, name, this.innerModel(), Context.NONE); + return this; + } + + public AppServicePlan create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .createOrUpdate(resourceGroupName, name, this.innerModel(), context); + return this; + } + + AppServicePlanImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new AppServicePlanInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public AppServicePlanImpl update() { + this.updateAppServicePlan = new AppServicePlanPatchResource(); + return this; + } + + public AppServicePlan apply() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .updateWithResponse(resourceGroupName, name, updateAppServicePlan, Context.NONE) + .getValue(); + return this; + } + + public AppServicePlan apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .updateWithResponse(resourceGroupName, name, updateAppServicePlan, context) + .getValue(); + return this; + } + + AppServicePlanImpl( + AppServicePlanInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "serverfarms"); + } + + public AppServicePlan refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE) + .getValue(); + return this; + } + + public AppServicePlan refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .getByResourceGroupWithResponse(resourceGroupName, name, context) + .getValue(); + return this; + } + + public void restartWebApps() { + serviceManager.appServicePlans().restartWebApps(resourceGroupName, name); + } + + public Response restartWebAppsWithResponse(Boolean softRestart, Context context) { + return serviceManager + .appServicePlans() + .restartWebAppsWithResponse(resourceGroupName, name, softRestart, context); + } + + public AppServicePlanImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public AppServicePlanImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public AppServicePlanImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public AppServicePlanImpl withSku(SkuDescription sku) { + this.innerModel().withSku(sku); + return this; + } + + public AppServicePlanImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public AppServicePlanImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateAppServicePlan.withKind(kind); + return this; + } + } + + public AppServicePlanImpl withWorkerTierName(String workerTierName) { + if (isInCreateMode()) { + this.innerModel().withWorkerTierName(workerTierName); + return this; + } else { + this.updateAppServicePlan.withWorkerTierName(workerTierName); + return this; + } + } + + public AppServicePlanImpl withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.innerModel().withHostingEnvironmentProfile(hostingEnvironmentProfile); + return this; + } + + public AppServicePlanImpl withPerSiteScaling(Boolean perSiteScaling) { + if (isInCreateMode()) { + this.innerModel().withPerSiteScaling(perSiteScaling); + return this; + } else { + this.updateAppServicePlan.withPerSiteScaling(perSiteScaling); + return this; + } + } + + public AppServicePlanImpl withElasticScaleEnabled(Boolean elasticScaleEnabled) { + if (isInCreateMode()) { + this.innerModel().withElasticScaleEnabled(elasticScaleEnabled); + return this; + } else { + this.updateAppServicePlan.withElasticScaleEnabled(elasticScaleEnabled); + return this; + } + } + + public AppServicePlanImpl withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount) { + if (isInCreateMode()) { + this.innerModel().withMaximumElasticWorkerCount(maximumElasticWorkerCount); + return this; + } else { + this.updateAppServicePlan.withMaximumElasticWorkerCount(maximumElasticWorkerCount); + return this; + } + } + + public AppServicePlanImpl withIsSpot(Boolean isSpot) { + if (isInCreateMode()) { + this.innerModel().withIsSpot(isSpot); + return this; + } else { + this.updateAppServicePlan.withIsSpot(isSpot); + return this; + } + } + + public AppServicePlanImpl withSpotExpirationTime(OffsetDateTime spotExpirationTime) { + if (isInCreateMode()) { + this.innerModel().withSpotExpirationTime(spotExpirationTime); + return this; + } else { + this.updateAppServicePlan.withSpotExpirationTime(spotExpirationTime); + return this; + } + } + + public AppServicePlanImpl withFreeOfferExpirationTime(OffsetDateTime freeOfferExpirationTime) { + if (isInCreateMode()) { + this.innerModel().withFreeOfferExpirationTime(freeOfferExpirationTime); + return this; + } else { + this.updateAppServicePlan.withFreeOfferExpirationTime(freeOfferExpirationTime); + return this; + } + } + + public AppServicePlanImpl withReserved(Boolean reserved) { + this.innerModel().withReserved(reserved); + return this; + } + + public AppServicePlanImpl withIsXenon(Boolean isXenon) { + this.innerModel().withIsXenon(isXenon); + return this; + } + + public AppServicePlanImpl withHyperV(Boolean hyperV) { + this.innerModel().withHyperV(hyperV); + return this; + } + + public AppServicePlanImpl withTargetWorkerCount(Integer targetWorkerCount) { + if (isInCreateMode()) { + this.innerModel().withTargetWorkerCount(targetWorkerCount); + return this; + } else { + this.updateAppServicePlan.withTargetWorkerCount(targetWorkerCount); + return this; + } + } + + public AppServicePlanImpl withTargetWorkerSizeId(Integer targetWorkerSizeId) { + if (isInCreateMode()) { + this.innerModel().withTargetWorkerSizeId(targetWorkerSizeId); + return this; + } else { + this.updateAppServicePlan.withTargetWorkerSizeId(targetWorkerSizeId); + return this; + } + } + + public AppServicePlanImpl withKubeEnvironmentProfile(KubeEnvironmentProfile kubeEnvironmentProfile) { + if (isInCreateMode()) { + this.innerModel().withKubeEnvironmentProfile(kubeEnvironmentProfile); + return this; + } else { + this.updateAppServicePlan.withKubeEnvironmentProfile(kubeEnvironmentProfile); + return this; + } + } + + public AppServicePlanImpl withZoneRedundant(Boolean zoneRedundant) { + if (isInCreateMode()) { + this.innerModel().withZoneRedundant(zoneRedundant); + return this; + } else { + this.updateAppServicePlan.withZoneRedundant(zoneRedundant); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlansClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlansClientImpl.java new file mode 100644 index 0000000000000..ce953abbf5dff --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlansClientImpl.java @@ -0,0 +1,5829 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.AppServicePlansClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CapabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionKeyInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionLimitsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetRouteInner; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlanCollection; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlanPatchResource; +import com.azure.resourcemanager.appservice.generated.models.CsmUsageQuotaCollection; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.HybridConnectionCollection; +import com.azure.resourcemanager.appservice.generated.models.ResourceCollection; +import com.azure.resourcemanager.appservice.generated.models.WebAppCollection; +import java.nio.ByteBuffer; +import java.util.List; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AppServicePlansClient. */ +public final class AppServicePlansClientImpl implements AppServicePlansClient { + private final ClientLogger logger = new ClientLogger(AppServicePlansClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final AppServicePlansService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of AppServicePlansClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AppServicePlansClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(AppServicePlansService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientAppServicePlans to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface AppServicePlansService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/serverfarms") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("detailed") Boolean detailed, + @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.Web/serverfarms") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.Web/serverfarms" + + "/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServicePlanInner appServicePlan, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppServicePlanPatchResource appServicePlan, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/capabilities") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listCapabilities( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/serverfarms" + + "/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getHybridConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteHybridConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHybridConnectionKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @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.Web/serverfarms" + + "/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWebAppsByHybridConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @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.Web/serverfarms" + + "/{name}/hybridConnectionPlanLimits/limit") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getHybridConnectionPlanLimit( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/serverfarms" + + "/{name}/hybridConnectionRelays") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHybridConnections( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/restartSites") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> restartWebApps( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("softRestart") Boolean softRestart, + @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.Web/serverfarms" + + "/{name}/sites") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWebApps( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam("$skipToken") String skipToken, + @QueryParam(value = "$filter", encoded = true) String filter, + @QueryParam("$top") String top, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getServerFarmSkus( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/serverfarms" + + "/{name}/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listUsages( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/virtualNetworkConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listVnets( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/serverfarms" + + "/{name}/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getVnetFromServerFarm( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @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.Web/serverfarms" + + "/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getVnetGateway( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("gatewayName") String gatewayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateVnetGateway( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("gatewayName") String gatewayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetGatewayInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/virtualNetworkConnections/{vnetName}/routes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listRoutesForVnet( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @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.Web/serverfarms" + + "/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> getRouteForVnet( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("routeName") String routeName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdateVnetRoute( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("routeName") String routeName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetRouteInner route, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteVnetRoute( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("routeName") String routeName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> updateVnetRoute( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("routeName") String routeName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetRouteInner route, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms" + + "/{name}/workers/{workerName}/reboot") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> rebootWorker( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("workerName") String workerName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWebAppsByHybridConnectionNext( + @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> listHybridConnectionsNext( + @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> listWebAppsNext( + @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> listUsagesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Get all App Service plans for a subscription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is + * <code>false</code>, which returns a subset of the properties. Retrieval of all properties may + * increase the API latency. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Boolean detailed) { + 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(), + detailed, + 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())); + } + + /** + * Description for Get all App Service plans for a subscription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is + * <code>false</code>, which returns a subset of the properties. Retrieval of all properties may + * increase the API latency. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Boolean detailed, 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(), + detailed, + 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)); + } + + /** + * Description for Get all App Service plans for a subscription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is + * <code>false</code>, which returns a subset of the properties. Retrieval of all properties may + * increase the API latency. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Boolean detailed) { + return new PagedFlux<>(() -> listSinglePageAsync(detailed), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all App Service plans 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 collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Boolean detailed = null; + return new PagedFlux<>(() -> listSinglePageAsync(detailed), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all App Service plans for a subscription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is + * <code>false</code>, which returns a subset of the properties. Retrieval of all properties may + * increase the API latency. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Boolean detailed, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(detailed, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all App Service plans 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 collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Boolean detailed = null; + return new PagedIterable<>(listAsync(detailed)); + } + + /** + * Description for Get all App Service plans for a subscription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is + * <code>false</code>, which returns a subset of the properties. Retrieval of all properties may + * increase the API latency. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Boolean detailed, Context context) { + return new PagedIterable<>(listAsync(detailed, context)); + } + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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())); + } + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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)); + } + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service plans. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @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 app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServicePlanInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @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 app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appServicePlan == null) { + return Mono.error(new IllegalArgumentException("Parameter appServicePlan is required and cannot be null.")); + } else { + appServicePlan.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appServicePlan, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appServicePlan == null) { + return Mono.error(new IllegalArgumentException("Parameter appServicePlan is required and cannot be null.")); + } else { + appServicePlan.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appServicePlan, + accept, + context); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AppServicePlanInner> beginCreateOrUpdateAsync( + String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, appServicePlan); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + AppServicePlanInner.class, + AppServicePlanInner.class, + this.client.getContext()); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, AppServicePlanInner> beginCreateOrUpdateAsync( + String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, appServicePlan, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), AppServicePlanInner.class, AppServicePlanInner.class, context); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AppServicePlanInner> beginCreateOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return beginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan).getSyncPoller(); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, AppServicePlanInner> beginCreateOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan, context).getSyncPoller(); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return beginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServicePlanInner createOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan) { + return createOrUpdateAsync(resourceGroupName, name, appServicePlan).block(); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServicePlanInner createOrUpdate( + String resourceGroupName, String name, AppServicePlanInner appServicePlan, Context context) { + return createOrUpdateAsync(resourceGroupName, name, appServicePlan, context).block(); + } + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name) { + return deleteWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 name) { + deleteAsync(resourceGroupName, name).block(); + } + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, AppServicePlanPatchResource appServicePlan) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appServicePlan == null) { + return Mono.error(new IllegalArgumentException("Parameter appServicePlan is required and cannot be null.")); + } else { + appServicePlan.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appServicePlan, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, AppServicePlanPatchResource appServicePlan, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appServicePlan == null) { + return Mono.error(new IllegalArgumentException("Parameter appServicePlan is required and cannot be null.")); + } else { + appServicePlan.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appServicePlan, + accept, + context); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String name, AppServicePlanPatchResource appServicePlan) { + return updateWithResponseAsync(resourceGroupName, name, appServicePlan) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppServicePlanInner update( + String resourceGroupName, String name, AppServicePlanPatchResource appServicePlan) { + return updateAsync(resourceGroupName, name, appServicePlan).block(); + } + + /** + * Description for Creates or updates an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param appServicePlan Details of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String name, AppServicePlanPatchResource appServicePlan, Context context) { + return updateWithResponseAsync(resourceGroupName, name, appServicePlan, context).block(); + } + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listCapabilitiesWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listCapabilities( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listCapabilitiesWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listCapabilities( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCapabilitiesAsync(String resourceGroupName, String name) { + return listCapabilitiesWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listCapabilities(String resourceGroupName, String name) { + return listCapabilitiesAsync(resourceGroupName, name).block(); + } + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listCapabilitiesWithResponse( + String resourceGroupName, String name, Context context) { + return listCapabilitiesWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHybridConnectionWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .getHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHybridConnectionWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .getHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getHybridConnectionAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionWithResponseAsync(resourceGroupName, name, namespaceName, relayName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner getHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).block(); + } + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return getHybridConnectionWithResponseAsync(resourceGroupName, name, namespaceName, relayName, context).block(); + } + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHybridConnectionWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .deleteHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHybridConnectionWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .deleteHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteHybridConnectionAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + return deleteHybridConnectionWithResponseAsync(resourceGroupName, name, namespaceName, relayName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + deleteHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).block(); + } + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return deleteHybridConnectionWithResponseAsync(resourceGroupName, name, namespaceName, relayName, context) + .block(); + } + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionKeysWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .listHybridConnectionKeys( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionKeysWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .listHybridConnectionKeys( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listHybridConnectionKeysAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionKeysWithResponseAsync(resourceGroupName, name, namespaceName, relayName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionKeyInner listHybridConnectionKeys( + String resourceGroupName, String name, String namespaceName, String relayName) { + return listHybridConnectionKeysAsync(resourceGroupName, name, namespaceName, relayName).block(); + } + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listHybridConnectionKeysWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return listHybridConnectionKeysWithResponseAsync(resourceGroupName, name, namespaceName, relayName, context) + .block(); + } + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsByHybridConnectionSinglePageAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .listWebAppsByHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + 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())); + } + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsByHybridConnectionSinglePageAsync( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .listWebAppsByHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + 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)); + } + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resources. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebAppsByHybridConnectionAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + return new PagedFlux<>( + () -> listWebAppsByHybridConnectionSinglePageAsync(resourceGroupName, name, namespaceName, relayName), + nextLink -> listWebAppsByHybridConnectionNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resources. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebAppsByHybridConnectionAsync( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return new PagedFlux<>( + () -> + listWebAppsByHybridConnectionSinglePageAsync( + resourceGroupName, name, namespaceName, relayName, context), + nextLink -> listWebAppsByHybridConnectionNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resources. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebAppsByHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName) { + return new PagedIterable<>( + listWebAppsByHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName)); + } + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resources. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebAppsByHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return new PagedIterable<>( + listWebAppsByHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName, context)); + } + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHybridConnectionPlanLimitWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getHybridConnectionPlanLimit( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHybridConnectionPlanLimitWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getHybridConnectionPlanLimit( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getHybridConnectionPlanLimitAsync(String resourceGroupName, String name) { + return getHybridConnectionPlanLimitWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionLimitsInner getHybridConnectionPlanLimit(String resourceGroupName, String name) { + return getHybridConnectionPlanLimitAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getHybridConnectionPlanLimitWithResponse( + String resourceGroupName, String name, Context context) { + return getHybridConnectionPlanLimitWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHybridConnections( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHybridConnections( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHybridConnectionsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listHybridConnectionsSinglePageAsync(resourceGroupName, name), + nextLink -> listHybridConnectionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHybridConnectionsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listHybridConnectionsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listHybridConnectionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHybridConnections(String resourceGroupName, String name) { + return new PagedIterable<>(listHybridConnectionsAsync(resourceGroupName, name)); + } + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHybridConnections( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listHybridConnectionsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to perform a soft restart, applies the configuration + * settings and restarts the apps if necessary. The default is <code>false</code>, which always + * restarts and reprovisions the apps. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> restartWebAppsWithResponseAsync( + String resourceGroupName, String name, Boolean softRestart) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .restartWebApps( + this.client.getEndpoint(), + resourceGroupName, + name, + softRestart, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to perform a soft restart, applies the configuration + * settings and restarts the apps if necessary. The default is <code>false</code>, which always + * restarts and reprovisions the apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> restartWebAppsWithResponseAsync( + String resourceGroupName, String name, Boolean softRestart, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .restartWebApps( + this.client.getEndpoint(), + resourceGroupName, + name, + softRestart, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to perform a soft restart, applies the configuration + * settings and restarts the apps if necessary. The default is <code>false</code>, which always + * restarts and reprovisions the apps. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartWebAppsAsync(String resourceGroupName, String name, Boolean softRestart) { + return restartWebAppsWithResponseAsync(resourceGroupName, name, softRestart) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartWebAppsAsync(String resourceGroupName, String name) { + final Boolean softRestart = null; + return restartWebAppsWithResponseAsync(resourceGroupName, name, softRestart) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restartWebApps(String resourceGroupName, String name) { + final Boolean softRestart = null; + restartWebAppsAsync(resourceGroupName, name, softRestart).block(); + } + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to perform a soft restart, applies the configuration + * settings and restarts the apps if necessary. The default is <code>false</code>, which always + * restarts and reprovisions the apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response restartWebAppsWithResponse( + String resourceGroupName, String name, Boolean softRestart, Context context) { + return restartWebAppsWithResponseAsync(resourceGroupName, name, softRestart, context).block(); + } + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the + * resulting list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list + * contains web apps from the start of the list. + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running. + * @param top List page size. If specified, results are paged. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsSinglePageAsync( + String resourceGroupName, String name, String skipToken, String filter, String top) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listWebApps( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + skipToken, + filter, + top, + 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())); + } + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the + * resulting list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list + * contains web apps from the start of the list. + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running. + * @param top List page size. If specified, results are paged. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsSinglePageAsync( + String resourceGroupName, String name, String skipToken, String filter, String top, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listWebApps( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + skipToken, + filter, + top, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the + * resulting list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list + * contains web apps from the start of the list. + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running. + * @param top List page size. If specified, results are paged. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebAppsAsync( + String resourceGroupName, String name, String skipToken, String filter, String top) { + return new PagedFlux<>( + () -> listWebAppsSinglePageAsync(resourceGroupName, name, skipToken, filter, top), + nextLink -> listWebAppsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebAppsAsync(String resourceGroupName, String name) { + final String skipToken = null; + final String filter = null; + final String top = null; + return new PagedFlux<>( + () -> listWebAppsSinglePageAsync(resourceGroupName, name, skipToken, filter, top), + nextLink -> listWebAppsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the + * resulting list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list + * contains web apps from the start of the list. + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running. + * @param top List page size. If specified, results are paged. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebAppsAsync( + String resourceGroupName, String name, String skipToken, String filter, String top, Context context) { + return new PagedFlux<>( + () -> listWebAppsSinglePageAsync(resourceGroupName, name, skipToken, filter, top, context), + nextLink -> listWebAppsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebApps(String resourceGroupName, String name) { + final String skipToken = null; + final String filter = null; + final String top = null; + return new PagedIterable<>(listWebAppsAsync(resourceGroupName, name, skipToken, filter, top)); + } + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the + * resulting list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list + * contains web apps from the start of the list. + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running. + * @param top List page size. If specified, results are paged. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebApps( + String resourceGroupName, String name, String skipToken, String filter, String top, Context context) { + return new PagedIterable<>(listWebAppsAsync(resourceGroupName, name, skipToken, filter, top, context)); + } + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getServerFarmSkusWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getServerFarmSkus( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getServerFarmSkusWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getServerFarmSkus( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getServerFarmSkusAsync(String resourceGroupName, String name) { + return getServerFarmSkusWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object getServerFarmSkus(String resourceGroupName, String name) { + return getServerFarmSkusAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getServerFarmSkusWithResponse(String resourceGroupName, String name, Context context) { + return getServerFarmSkusWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSinglePageAsync( + String resourceGroupName, String name, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSinglePageAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync(String resourceGroupName, String name, String filter) { + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter), + nextLink -> listUsagesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync(String resourceGroupName, String name) { + final String filter = null; + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter), + nextLink -> listUsagesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync( + String resourceGroupName, String name, String filter, Context context) { + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter, context), + nextLink -> listUsagesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsages(String resourceGroupName, String name) { + final String filter = null; + return new PagedIterable<>(listUsagesAsync(resourceGroupName, name, filter)); + } + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsages( + String resourceGroupName, String name, String filter, Context context) { + return new PagedIterable<>(listUsagesAsync(resourceGroupName, name, filter, context)); + } + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listVnetsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listVnets( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listVnetsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listVnets( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVnetsAsync(String resourceGroupName, String name) { + return listVnetsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listVnets(String resourceGroupName, String name) { + return listVnetsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listVnetsWithResponse( + String resourceGroupName, String name, Context context) { + return listVnetsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetFromServerFarmWithResponseAsync( + String resourceGroupName, String name, String vnetName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 + .getVnetFromServerFarm( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @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 virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetFromServerFarmWithResponseAsync( + String resourceGroupName, String name, String vnetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 + .getVnetFromServerFarm( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVnetFromServerFarmAsync( + String resourceGroupName, String name, String vnetName) { + return getVnetFromServerFarmWithResponseAsync(resourceGroupName, name, vnetName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetInfoResourceInner getVnetFromServerFarm(String resourceGroupName, String name, String vnetName) { + return getVnetFromServerFarmAsync(resourceGroupName, name, vnetName).block(); + } + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @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 virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVnetFromServerFarmWithResponse( + String resourceGroupName, String name, String vnetName, Context context) { + return getVnetFromServerFarmWithResponseAsync(resourceGroupName, name, vnetName, context).block(); + } + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetGatewayWithResponseAsync( + String resourceGroupName, String name, String vnetName, String gatewayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 + .getVnetGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetGatewayWithResponseAsync( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 + .getVnetGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVnetGatewayAsync( + String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetGatewayWithResponseAsync(resourceGroupName, name, vnetName, gatewayName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetGatewayInner getVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetGatewayAsync(resourceGroupName, name, vnetName, gatewayName).block(); + } + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVnetGatewayWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context) { + return getVnetGatewayWithResponseAsync(resourceGroupName, name, vnetName, gatewayName, context).block(); + } + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetGatewayWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateVnetGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetGatewayWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateVnetGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateVnetGatewayAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + return updateVnetGatewayWithResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetGatewayInner updateVnetGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + return updateVnetGatewayAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).block(); + } + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateVnetGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + return updateVnetGatewayWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, context) + .block(); + } + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listRoutesForVnetWithResponseAsync( + String resourceGroupName, String name, String vnetName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 + .listRoutesForVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listRoutesForVnetWithResponseAsync( + String resourceGroupName, String name, String vnetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 + .listRoutesForVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRoutesForVnetAsync(String resourceGroupName, String name, String vnetName) { + return listRoutesForVnetWithResponseAsync(resourceGroupName, name, vnetName) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listRoutesForVnet(String resourceGroupName, String name, String vnetName) { + return listRoutesForVnetAsync(resourceGroupName, name, vnetName).block(); + } + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listRoutesForVnetWithResponse( + String resourceGroupName, String name, String vnetName, Context context) { + return listRoutesForVnetWithResponseAsync(resourceGroupName, name, vnetName, context).block(); + } + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getRouteForVnetWithResponseAsync( + String resourceGroupName, String name, String vnetName, String routeName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (routeName == null) { + return Mono.error(new IllegalArgumentException("Parameter routeName is required 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 + .getRouteForVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + routeName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @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 array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getRouteForVnetWithResponseAsync( + String resourceGroupName, String name, String vnetName, String routeName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (routeName == null) { + return Mono.error(new IllegalArgumentException("Parameter routeName is required 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 + .getRouteForVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + routeName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRouteForVnetAsync( + String resourceGroupName, String name, String vnetName, String routeName) { + return getRouteForVnetWithResponseAsync(resourceGroupName, name, vnetName, routeName) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List getRouteForVnet( + String resourceGroupName, String name, String vnetName, String routeName) { + return getRouteForVnetAsync(resourceGroupName, name, vnetName, routeName).block(); + } + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @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 array of VnetRoute. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> getRouteForVnetWithResponse( + String resourceGroupName, String name, String vnetName, String routeName, Context context) { + return getRouteForVnetWithResponseAsync(resourceGroupName, name, vnetName, routeName, context).block(); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetRouteWithResponseAsync( + String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (routeName == null) { + return Mono.error(new IllegalArgumentException("Parameter routeName is required 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 (route == null) { + return Mono.error(new IllegalArgumentException("Parameter route is required and cannot be null.")); + } else { + route.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateVnetRoute( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + routeName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + route, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @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 virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetRouteWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String routeName, + VnetRouteInner route, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (routeName == null) { + return Mono.error(new IllegalArgumentException("Parameter routeName is required 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 (route == null) { + return Mono.error(new IllegalArgumentException("Parameter route is required and cannot be null.")); + } else { + route.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateVnetRoute( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + routeName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + route, + accept, + context); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateVnetRouteAsync( + String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + return createOrUpdateVnetRouteWithResponseAsync(resourceGroupName, name, vnetName, routeName, route) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetRouteInner createOrUpdateVnetRoute( + String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + return createOrUpdateVnetRouteAsync(resourceGroupName, name, vnetName, routeName, route).block(); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @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 virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateVnetRouteWithResponse( + String resourceGroupName, + String name, + String vnetName, + String routeName, + VnetRouteInner route, + Context context) { + return createOrUpdateVnetRouteWithResponseAsync(resourceGroupName, name, vnetName, routeName, route, context) + .block(); + } + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteVnetRouteWithResponseAsync( + String resourceGroupName, String name, String vnetName, String routeName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (routeName == null) { + return Mono.error(new IllegalArgumentException("Parameter routeName is required 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 + .deleteVnetRoute( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + routeName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteVnetRouteWithResponseAsync( + String resourceGroupName, String name, String vnetName, String routeName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (routeName == null) { + return Mono.error(new IllegalArgumentException("Parameter routeName is required 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 + .deleteVnetRoute( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + routeName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName) { + return deleteVnetRouteWithResponseAsync(resourceGroupName, name, vnetName, routeName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) { + deleteVnetRouteAsync(resourceGroupName, name, vnetName, routeName).block(); + } + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteVnetRouteWithResponse( + String resourceGroupName, String name, String vnetName, String routeName, Context context) { + return deleteVnetRouteWithResponseAsync(resourceGroupName, name, vnetName, routeName, context).block(); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetRouteWithResponseAsync( + String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (routeName == null) { + return Mono.error(new IllegalArgumentException("Parameter routeName is required 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 (route == null) { + return Mono.error(new IllegalArgumentException("Parameter route is required and cannot be null.")); + } else { + route.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateVnetRoute( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + routeName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + route, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @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 virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetRouteWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String routeName, + VnetRouteInner route, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (routeName == null) { + return Mono.error(new IllegalArgumentException("Parameter routeName is required 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 (route == null) { + return Mono.error(new IllegalArgumentException("Parameter route is required and cannot be null.")); + } else { + route.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateVnetRoute( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + routeName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + route, + accept, + context); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateVnetRouteAsync( + String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + return updateVnetRouteWithResponseAsync(resourceGroupName, name, vnetName, routeName, route) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetRouteInner updateVnetRoute( + String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { + return updateVnetRouteAsync(resourceGroupName, name, vnetName, routeName, route).block(); + } + + /** + * Description for Create or update a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param route Definition of the Virtual Network route. + * @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 virtual Network route contract used to pass routing information for a Virtual Network. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateVnetRouteWithResponse( + String resourceGroupName, + String name, + String vnetName, + String routeName, + VnetRouteInner route, + Context context) { + return updateVnetRouteWithResponseAsync(resourceGroupName, name, vnetName, routeName, route, context).block(); + } + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> rebootWorkerWithResponseAsync( + String resourceGroupName, String name, String workerName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerName is required 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 + .rebootWorker( + this.client.getEndpoint(), + resourceGroupName, + name, + workerName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> rebootWorkerWithResponseAsync( + String resourceGroupName, String name, String workerName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (workerName == null) { + return Mono.error(new IllegalArgumentException("Parameter workerName is required 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 + .rebootWorker( + this.client.getEndpoint(), + resourceGroupName, + name, + workerName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono rebootWorkerAsync(String resourceGroupName, String name, String workerName) { + return rebootWorkerWithResponseAsync(resourceGroupName, name, workerName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 rebootWorker(String resourceGroupName, String name, String workerName) { + rebootWorkerAsync(resourceGroupName, name, workerName).block(); + } + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response rebootWorkerWithResponse( + String resourceGroupName, String name, String workerName, Context context) { + return rebootWorkerWithResponseAsync(resourceGroupName, name, workerName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service plans. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service plans. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service plans. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsByHybridConnectionNextSinglePageAsync(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.listWebAppsByHybridConnectionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsByHybridConnectionNextSinglePageAsync( + 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 + .listWebAppsByHybridConnectionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionsNextSinglePageAsync(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.listHybridConnectionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionsNextSinglePageAsync( + 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 + .listHybridConnectionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsNextSinglePageAsync(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.listWebAppsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebAppsNextSinglePageAsync(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 + .listWebAppsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesNextSinglePageAsync(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.listUsagesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesNextSinglePageAsync(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 + .listUsagesNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlansImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlansImpl.java new file mode 100644 index 0000000000000..c64d06a52a985 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AppServicePlansImpl.java @@ -0,0 +1,661 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.AppServicePlansClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CapabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionKeyInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionLimitsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetRouteInner; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlan; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlans; +import com.azure.resourcemanager.appservice.generated.models.Capability; +import com.azure.resourcemanager.appservice.generated.models.CsmUsageQuota; +import com.azure.resourcemanager.appservice.generated.models.HybridConnection; +import com.azure.resourcemanager.appservice.generated.models.HybridConnectionKey; +import com.azure.resourcemanager.appservice.generated.models.HybridConnectionLimits; +import com.azure.resourcemanager.appservice.generated.models.Site; +import com.azure.resourcemanager.appservice.generated.models.VnetGateway; +import com.azure.resourcemanager.appservice.generated.models.VnetInfoResource; +import com.azure.resourcemanager.appservice.generated.models.VnetRoute; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class AppServicePlansImpl implements AppServicePlans { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServicePlansImpl.class); + + private final AppServicePlansClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public AppServicePlansImpl( + AppServicePlansClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new AppServicePlanImpl(inner1, this.manager())); + } + + public PagedIterable list(Boolean detailed, Context context) { + PagedIterable inner = this.serviceClient().list(detailed, context); + return Utils.mapPage(inner, inner1 -> new AppServicePlanImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new AppServicePlanImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new AppServicePlanImpl(inner1, this.manager())); + } + + public AppServicePlan getByResourceGroup(String resourceGroupName, String name) { + AppServicePlanInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name); + if (inner != null) { + return new AppServicePlanImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AppServicePlanImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String name) { + this.serviceClient().delete(resourceGroupName, name); + } + + public Response deleteWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, name, context); + } + + public List listCapabilities(String resourceGroupName, String name) { + List inner = this.serviceClient().listCapabilities(resourceGroupName, name); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new CapabilityImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> listCapabilitiesWithResponse( + String resourceGroupName, String name, Context context) { + Response> inner = + this.serviceClient().listCapabilitiesWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new CapabilityImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public HybridConnection getHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName) { + HybridConnectionInner inner = + this.serviceClient().getHybridConnection(resourceGroupName, name, namespaceName, relayName); + if (inner != null) { + return new HybridConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + Response inner = + this + .serviceClient() + .getHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + this.serviceClient().deleteHybridConnection(resourceGroupName, name, namespaceName, relayName); + } + + public Response deleteHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return this + .serviceClient() + .deleteHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, context); + } + + public HybridConnectionKey listHybridConnectionKeys( + String resourceGroupName, String name, String namespaceName, String relayName) { + HybridConnectionKeyInner inner = + this.serviceClient().listHybridConnectionKeys(resourceGroupName, name, namespaceName, relayName); + if (inner != null) { + return new HybridConnectionKeyImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listHybridConnectionKeysWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + Response inner = + this + .serviceClient() + .listHybridConnectionKeysWithResponse(resourceGroupName, name, namespaceName, relayName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionKeyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listWebAppsByHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName) { + return this.serviceClient().listWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName); + } + + public PagedIterable listWebAppsByHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return this + .serviceClient() + .listWebAppsByHybridConnection(resourceGroupName, name, namespaceName, relayName, context); + } + + public HybridConnectionLimits getHybridConnectionPlanLimit(String resourceGroupName, String name) { + HybridConnectionLimitsInner inner = this.serviceClient().getHybridConnectionPlanLimit(resourceGroupName, name); + if (inner != null) { + return new HybridConnectionLimitsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getHybridConnectionPlanLimitWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getHybridConnectionPlanLimitWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionLimitsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listHybridConnections(String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listHybridConnections(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new HybridConnectionImpl(inner1, this.manager())); + } + + public PagedIterable listHybridConnections( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listHybridConnections(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new HybridConnectionImpl(inner1, this.manager())); + } + + public void restartWebApps(String resourceGroupName, String name) { + this.serviceClient().restartWebApps(resourceGroupName, name); + } + + public Response restartWebAppsWithResponse( + String resourceGroupName, String name, Boolean softRestart, Context context) { + return this.serviceClient().restartWebAppsWithResponse(resourceGroupName, name, softRestart, context); + } + + public PagedIterable listWebApps(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listWebApps(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable listWebApps( + String resourceGroupName, String name, String skipToken, String filter, String top, Context context) { + PagedIterable inner = + this.serviceClient().listWebApps(resourceGroupName, name, skipToken, filter, top, context); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public Object getServerFarmSkus(String resourceGroupName, String name) { + return this.serviceClient().getServerFarmSkus(resourceGroupName, name); + } + + public Response getServerFarmSkusWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().getServerFarmSkusWithResponse(resourceGroupName, name, context); + } + + public PagedIterable listUsages(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listUsages(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new CsmUsageQuotaImpl(inner1, this.manager())); + } + + public PagedIterable listUsages( + String resourceGroupName, String name, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listUsages(resourceGroupName, name, filter, context); + return Utils.mapPage(inner, inner1 -> new CsmUsageQuotaImpl(inner1, this.manager())); + } + + public List listVnets(String resourceGroupName, String name) { + List inner = this.serviceClient().listVnets(resourceGroupName, name); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new VnetInfoResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> listVnetsWithResponse( + String resourceGroupName, String name, Context context) { + Response> inner = + this.serviceClient().listVnetsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new VnetInfoResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public VnetInfoResource getVnetFromServerFarm(String resourceGroupName, String name, String vnetName) { + VnetInfoResourceInner inner = this.serviceClient().getVnetFromServerFarm(resourceGroupName, name, vnetName); + if (inner != null) { + return new VnetInfoResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getVnetFromServerFarmWithResponse( + String resourceGroupName, String name, String vnetName, Context context) { + Response inner = + this.serviceClient().getVnetFromServerFarmWithResponse(resourceGroupName, name, vnetName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetInfoResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VnetGateway getVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { + VnetGatewayInner inner = this.serviceClient().getVnetGateway(resourceGroupName, name, vnetName, gatewayName); + if (inner != null) { + return new VnetGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getVnetGatewayWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context) { + Response inner = + this.serviceClient().getVnetGatewayWithResponse(resourceGroupName, name, vnetName, gatewayName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VnetGateway updateVnetGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + VnetGatewayInner inner = + this.serviceClient().updateVnetGateway(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope); + if (inner != null) { + return new VnetGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateVnetGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateVnetGatewayWithResponse( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public List listRoutesForVnet(String resourceGroupName, String name, String vnetName) { + List inner = this.serviceClient().listRoutesForVnet(resourceGroupName, name, vnetName); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new VnetRouteImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> listRoutesForVnetWithResponse( + String resourceGroupName, String name, String vnetName, Context context) { + Response> inner = + this.serviceClient().listRoutesForVnetWithResponse(resourceGroupName, name, vnetName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new VnetRouteImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public List getRouteForVnet(String resourceGroupName, String name, String vnetName, String routeName) { + List inner = this.serviceClient().getRouteForVnet(resourceGroupName, name, vnetName, routeName); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new VnetRouteImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> getRouteForVnetWithResponse( + String resourceGroupName, String name, String vnetName, String routeName, Context context) { + Response> inner = + this.serviceClient().getRouteForVnetWithResponse(resourceGroupName, name, vnetName, routeName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new VnetRouteImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public void deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) { + this.serviceClient().deleteVnetRoute(resourceGroupName, name, vnetName, routeName); + } + + public Response deleteVnetRouteWithResponse( + String resourceGroupName, String name, String vnetName, String routeName, Context context) { + return this.serviceClient().deleteVnetRouteWithResponse(resourceGroupName, name, vnetName, routeName, context); + } + + public void rebootWorker(String resourceGroupName, String name, String workerName) { + this.serviceClient().rebootWorker(resourceGroupName, name, workerName); + } + + public Response rebootWorkerWithResponse( + String resourceGroupName, String name, String workerName, Context context) { + return this.serviceClient().rebootWorkerWithResponse(resourceGroupName, name, workerName, context); + } + + public AppServicePlan 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 name = Utils.getValueFromIdByName(id, "serverfarms"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverfarms'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "serverfarms"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverfarms'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "serverfarms"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverfarms'.", id))); + } + this.deleteWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "serverfarms"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverfarms'.", id))); + } + return this.deleteWithResponse(resourceGroupName, name, context); + } + + public void deleteVnetRouteById(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 name = Utils.getValueFromIdByName(id, "serverfarms"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverfarms'.", id))); + } + String vnetName = Utils.getValueFromIdByName(id, "virtualNetworkConnections"); + if (vnetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkConnections'.", + id))); + } + String routeName = Utils.getValueFromIdByName(id, "routes"); + if (routeName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'routes'.", id))); + } + this.deleteVnetRouteWithResponse(resourceGroupName, name, vnetName, routeName, Context.NONE); + } + + public Response deleteVnetRouteByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "serverfarms"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'serverfarms'.", id))); + } + String vnetName = Utils.getValueFromIdByName(id, "virtualNetworkConnections"); + if (vnetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkConnections'.", + id))); + } + String routeName = Utils.getValueFromIdByName(id, "routes"); + if (routeName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'routes'.", id))); + } + return this.deleteVnetRouteWithResponse(resourceGroupName, name, vnetName, routeName, context); + } + + private AppServicePlansClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public AppServicePlanImpl define(String name) { + return new AppServicePlanImpl(name, this.manager()); + } + + public VnetRouteImpl defineVnetRoute(String name) { + return new VnetRouteImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ApplicationStackResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ApplicationStackResourceImpl.java new file mode 100644 index 0000000000000..a3f27fbeac146 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ApplicationStackResourceImpl.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ApplicationStack; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApplicationStackResourceInner; +import com.azure.resourcemanager.appservice.generated.models.ApplicationStackResource; +import com.azure.resourcemanager.appservice.generated.models.StackMajorVersion; +import java.util.Collections; +import java.util.List; + +public final class ApplicationStackResourceImpl implements ApplicationStackResource { + private ApplicationStackResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ApplicationStackResourceImpl( + ApplicationStackResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String namePropertiesName() { + return this.innerModel().namePropertiesName(); + } + + public String display() { + return this.innerModel().display(); + } + + public String dependency() { + return this.innerModel().dependency(); + } + + public List majorVersions() { + List inner = this.innerModel().majorVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List frameworks() { + List inner = this.innerModel().frameworks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List isDeprecated() { + List inner = this.innerModel().isDeprecated(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ApplicationStackResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AseV3NetworkingConfigurationImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AseV3NetworkingConfigurationImpl.java new file mode 100644 index 0000000000000..8f18f54cea658 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AseV3NetworkingConfigurationImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AseV3NetworkingConfigurationInner; +import com.azure.resourcemanager.appservice.generated.models.AseV3NetworkingConfiguration; +import java.util.Collections; +import java.util.List; + +public final class AseV3NetworkingConfigurationImpl implements AseV3NetworkingConfiguration { + private AseV3NetworkingConfigurationInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + AseV3NetworkingConfigurationImpl( + AseV3NetworkingConfigurationInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public List windowsOutboundIpAddresses() { + List inner = this.innerModel().windowsOutboundIpAddresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List linuxOutboundIpAddresses() { + List inner = this.innerModel().linuxOutboundIpAddresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List externalInboundIpAddresses() { + List inner = this.innerModel().externalInboundIpAddresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List internalInboundIpAddresses() { + List inner = this.innerModel().internalInboundIpAddresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean allowNewPrivateEndpointConnections() { + return this.innerModel().allowNewPrivateEndpointConnections(); + } + + public AseV3NetworkingConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AzureStoragePropertyDictionaryResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AzureStoragePropertyDictionaryResourceImpl.java new file mode 100644 index 0000000000000..63ec8e2c7963c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/AzureStoragePropertyDictionaryResourceImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AzureStoragePropertyDictionaryResourceInner; +import com.azure.resourcemanager.appservice.generated.models.AzureStorageInfoValue; +import com.azure.resourcemanager.appservice.generated.models.AzureStoragePropertyDictionaryResource; +import java.util.Collections; +import java.util.Map; + +public final class AzureStoragePropertyDictionaryResourceImpl implements AzureStoragePropertyDictionaryResource { + private AzureStoragePropertyDictionaryResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + AzureStoragePropertyDictionaryResourceImpl( + AzureStoragePropertyDictionaryResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Map properties() { + Map inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public AzureStoragePropertyDictionaryResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BackupItemImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BackupItemImpl.java new file mode 100644 index 0000000000000..d50502fe64fbf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BackupItemImpl.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupItemInner; +import com.azure.resourcemanager.appservice.generated.models.BackupItem; +import com.azure.resourcemanager.appservice.generated.models.BackupItemStatus; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class BackupItemImpl implements BackupItem { + private BackupItemInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + BackupItemImpl( + BackupItemInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Integer backupId() { + return this.innerModel().backupId(); + } + + public String storageAccountUrl() { + return this.innerModel().storageAccountUrl(); + } + + public String blobName() { + return this.innerModel().blobName(); + } + + public String namePropertiesName() { + return this.innerModel().namePropertiesName(); + } + + public BackupItemStatus status() { + return this.innerModel().status(); + } + + public Long sizeInBytes() { + return this.innerModel().sizeInBytes(); + } + + public OffsetDateTime created() { + return this.innerModel().created(); + } + + public String log() { + return this.innerModel().log(); + } + + public List databases() { + List inner = this.innerModel().databases(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean scheduled() { + return this.innerModel().scheduled(); + } + + public OffsetDateTime lastRestoreTimestamp() { + return this.innerModel().lastRestoreTimestamp(); + } + + public OffsetDateTime finishedTimestamp() { + return this.innerModel().finishedTimestamp(); + } + + public String correlationId() { + return this.innerModel().correlationId(); + } + + public Long websiteSizeInBytes() { + return this.innerModel().websiteSizeInBytes(); + } + + public BackupItemInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BackupRequestImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BackupRequestImpl.java new file mode 100644 index 0000000000000..6bc0467fdc0d0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BackupRequestImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner; +import com.azure.resourcemanager.appservice.generated.models.BackupRequest; +import com.azure.resourcemanager.appservice.generated.models.BackupSchedule; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import java.util.Collections; +import java.util.List; + +public final class BackupRequestImpl implements BackupRequest { + private BackupRequestInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + BackupRequestImpl( + BackupRequestInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String backupName() { + return this.innerModel().backupName(); + } + + public Boolean enabled() { + return this.innerModel().enabled(); + } + + public String storageAccountUrl() { + return this.innerModel().storageAccountUrl(); + } + + public BackupSchedule backupSchedule() { + return this.innerModel().backupSchedule(); + } + + public List databases() { + List inner = this.innerModel().databases(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public BackupRequestInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BillingMeterImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BillingMeterImpl.java new file mode 100644 index 0000000000000..65a5d9b6a3c82 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/BillingMeterImpl.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.BillingMeterInner; +import com.azure.resourcemanager.appservice.generated.models.BillingMeter; + +public final class BillingMeterImpl implements BillingMeter { + private BillingMeterInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + BillingMeterImpl( + BillingMeterInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String meterId() { + return this.innerModel().meterId(); + } + + public String billingLocation() { + return this.innerModel().billingLocation(); + } + + public String shortName() { + return this.innerModel().shortName(); + } + + public String friendlyName() { + return this.innerModel().friendlyName(); + } + + public String resourceType() { + return this.innerModel().resourceType(); + } + + public String osType() { + return this.innerModel().osType(); + } + + public Double multiplier() { + return this.innerModel().multiplier(); + } + + public BillingMeterInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CapabilityImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CapabilityImpl.java new file mode 100644 index 0000000000000..047f96cb97a4c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CapabilityImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CapabilityInner; +import com.azure.resourcemanager.appservice.generated.models.Capability; + +public final class CapabilityImpl implements Capability { + private CapabilityInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + CapabilityImpl( + CapabilityInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public String value() { + return this.innerModel().value(); + } + + public String reason() { + return this.innerModel().reason(); + } + + public CapabilityInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateEmailImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateEmailImpl.java new file mode 100644 index 0000000000000..24630b75edf9f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateEmailImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateEmailInner; +import com.azure.resourcemanager.appservice.generated.models.CertificateEmail; +import java.time.OffsetDateTime; + +public final class CertificateEmailImpl implements CertificateEmail { + private CertificateEmailInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + CertificateEmailImpl( + CertificateEmailInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String emailId() { + return this.innerModel().emailId(); + } + + public OffsetDateTime timestamp() { + return this.innerModel().timestamp(); + } + + public CertificateEmailInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateImpl.java new file mode 100644 index 0000000000000..b640627a99e14 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateImpl.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.appservice.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateInner; +import com.azure.resourcemanager.appservice.generated.models.Certificate; +import com.azure.resourcemanager.appservice.generated.models.CertificatePatchResource; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.KeyVaultSecretStatus; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class CertificateImpl implements Certificate, Certificate.Definition, Certificate.Update { + private CertificateInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public String password() { + return this.innerModel().password(); + } + + public String friendlyName() { + return this.innerModel().friendlyName(); + } + + public String subjectName() { + return this.innerModel().subjectName(); + } + + public List hostNames() { + List inner = this.innerModel().hostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public byte[] pfxBlob() { + return this.innerModel().pfxBlob(); + } + + public String siteName() { + return this.innerModel().siteName(); + } + + public String selfLink() { + return this.innerModel().selfLink(); + } + + public String issuer() { + return this.innerModel().issuer(); + } + + public OffsetDateTime issueDate() { + return this.innerModel().issueDate(); + } + + public OffsetDateTime expirationDate() { + return this.innerModel().expirationDate(); + } + + public String thumbprint() { + return this.innerModel().thumbprint(); + } + + public Boolean valid() { + return this.innerModel().valid(); + } + + public byte[] cerBlob() { + return this.innerModel().cerBlob(); + } + + public String publicKeyHash() { + return this.innerModel().publicKeyHash(); + } + + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerModel().hostingEnvironmentProfile(); + } + + public String keyVaultId() { + return this.innerModel().keyVaultId(); + } + + public String keyVaultSecretName() { + return this.innerModel().keyVaultSecretName(); + } + + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.innerModel().keyVaultSecretStatus(); + } + + public String serverFarmId() { + return this.innerModel().serverFarmId(); + } + + public String canonicalName() { + return this.innerModel().canonicalName(); + } + + public String domainValidationMethod() { + return this.innerModel().domainValidationMethod(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public CertificateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private CertificatePatchResource updateCertificateEnvelope; + + public CertificateImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Certificate create() { + this.innerObject = + serviceManager + .serviceClient() + .getCertificates() + .createOrUpdateWithResponse(resourceGroupName, name, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Certificate create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCertificates() + .createOrUpdateWithResponse(resourceGroupName, name, this.innerModel(), context) + .getValue(); + return this; + } + + CertificateImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new CertificateInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public CertificateImpl update() { + this.updateCertificateEnvelope = new CertificatePatchResource(); + return this; + } + + public Certificate apply() { + this.innerObject = + serviceManager + .serviceClient() + .getCertificates() + .updateWithResponse(resourceGroupName, name, updateCertificateEnvelope, Context.NONE) + .getValue(); + return this; + } + + public Certificate apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCertificates() + .updateWithResponse(resourceGroupName, name, updateCertificateEnvelope, context) + .getValue(); + return this; + } + + CertificateImpl( + CertificateInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "certificates"); + } + + public Certificate refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getCertificates() + .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE) + .getValue(); + return this; + } + + public Certificate refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getCertificates() + .getByResourceGroupWithResponse(resourceGroupName, name, context) + .getValue(); + return this; + } + + public CertificateImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public CertificateImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public CertificateImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public CertificateImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateCertificateEnvelope.withKind(kind); + return this; + } + } + + public CertificateImpl withPassword(String password) { + this.innerModel().withPassword(password); + return this; + } + + public CertificateImpl withHostNames(List hostNames) { + if (isInCreateMode()) { + this.innerModel().withHostNames(hostNames); + return this; + } else { + this.updateCertificateEnvelope.withHostNames(hostNames); + return this; + } + } + + public CertificateImpl withPfxBlob(byte[] pfxBlob) { + if (isInCreateMode()) { + this.innerModel().withPfxBlob(pfxBlob); + return this; + } else { + this.updateCertificateEnvelope.withPfxBlob(pfxBlob); + return this; + } + } + + public CertificateImpl withKeyVaultId(String keyVaultId) { + if (isInCreateMode()) { + this.innerModel().withKeyVaultId(keyVaultId); + return this; + } else { + this.updateCertificateEnvelope.withKeyVaultId(keyVaultId); + return this; + } + } + + public CertificateImpl withKeyVaultSecretName(String keyVaultSecretName) { + if (isInCreateMode()) { + this.innerModel().withKeyVaultSecretName(keyVaultSecretName); + return this; + } else { + this.updateCertificateEnvelope.withKeyVaultSecretName(keyVaultSecretName); + return this; + } + } + + public CertificateImpl withServerFarmId(String serverFarmId) { + if (isInCreateMode()) { + this.innerModel().withServerFarmId(serverFarmId); + return this; + } else { + this.updateCertificateEnvelope.withServerFarmId(serverFarmId); + return this; + } + } + + public CertificateImpl withCanonicalName(String canonicalName) { + if (isInCreateMode()) { + this.innerModel().withCanonicalName(canonicalName); + return this; + } else { + this.updateCertificateEnvelope.withCanonicalName(canonicalName); + return this; + } + } + + public CertificateImpl withDomainValidationMethod(String domainValidationMethod) { + if (isInCreateMode()) { + this.innerModel().withDomainValidationMethod(domainValidationMethod); + return this; + } else { + this.updateCertificateEnvelope.withDomainValidationMethod(domainValidationMethod); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrderActionImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrderActionImpl.java new file mode 100644 index 0000000000000..608d10f2d7b9e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrderActionImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateOrderActionInner; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderAction; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrderActionType; +import java.time.OffsetDateTime; + +public final class CertificateOrderActionImpl implements CertificateOrderAction { + private CertificateOrderActionInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + CertificateOrderActionImpl( + CertificateOrderActionInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public CertificateOrderActionType actionType() { + return this.innerModel().actionType(); + } + + public OffsetDateTime createdAt() { + return this.innerModel().createdAt(); + } + + public CertificateOrderActionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrdersDiagnosticsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrdersDiagnosticsClientImpl.java new file mode 100644 index 0000000000000..1ccebad8ae1cf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrdersDiagnosticsClientImpl.java @@ -0,0 +1,619 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.CertificateOrdersDiagnosticsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.DetectorResponseCollection; +import java.time.OffsetDateTime; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CertificateOrdersDiagnosticsClient. */ +public final class CertificateOrdersDiagnosticsClientImpl implements CertificateOrdersDiagnosticsClient { + private final ClientLogger logger = new ClientLogger(CertificateOrdersDiagnosticsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final CertificateOrdersDiagnosticsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of CertificateOrdersDiagnosticsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CertificateOrdersDiagnosticsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy + .create( + CertificateOrdersDiagnosticsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientCertificateOrdersDiagnostics to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface CertificateOrdersDiagnosticsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers" + + "/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listAppServiceCertificateOrderDetectorResponse( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @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.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors" + + "/{detectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAppServiceCertificateOrderDetectorResponse( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("certificateOrderName") String certificateOrderName, + @PathParam("detectorName") String detectorName, + @QueryParam("startTime") OffsetDateTime startTime, + @QueryParam("endTime") OffsetDateTime endTime, + @QueryParam("timeGrain") String timeGrain, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listAppServiceCertificateOrderDetectorResponseNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response 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 collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAppServiceCertificateOrderDetectorResponseSinglePageAsync( + String resourceGroupName, String certificateOrderName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .listAppServiceCertificateOrderDetectorResponse( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + 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())); + } + + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response 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 collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAppServiceCertificateOrderDetectorResponseSinglePageAsync( + String resourceGroupName, String certificateOrderName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required 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 + .listAppServiceCertificateOrderDetectorResponse( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + 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)); + } + + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response 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 collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAppServiceCertificateOrderDetectorResponseAsync( + String resourceGroupName, String certificateOrderName) { + return new PagedFlux<>( + () -> + listAppServiceCertificateOrderDetectorResponseSinglePageAsync(resourceGroupName, certificateOrderName), + nextLink -> listAppServiceCertificateOrderDetectorResponseNextSinglePageAsync(nextLink)); + } + + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response 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 collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAppServiceCertificateOrderDetectorResponseAsync( + String resourceGroupName, String certificateOrderName, Context context) { + return new PagedFlux<>( + () -> + listAppServiceCertificateOrderDetectorResponseSinglePageAsync( + resourceGroupName, certificateOrderName, context), + nextLink -> listAppServiceCertificateOrderDetectorResponseNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response 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 collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName) { + return new PagedIterable<>( + listAppServiceCertificateOrderDetectorResponseAsync(resourceGroupName, certificateOrderName)); + } + + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response 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 collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName, Context context) { + return new PagedIterable<>( + listAppServiceCertificateOrderDetectorResponseAsync(resourceGroupName, certificateOrderName, context)); + } + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @param startTime The start time for detector response. + * @param endTime The end time for the detector response. + * @param timeGrain The time grain for the detector response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppServiceCertificateOrderDetectorResponseWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required 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 + .getAppServiceCertificateOrderDetectorResponse( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + detectorName, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @param startTime The start time for detector response. + * @param endTime The end time for the detector response. + * @param timeGrain The time grain for the detector response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppServiceCertificateOrderDetectorResponseWithResponseAsync( + String resourceGroupName, + String certificateOrderName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (certificateOrderName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateOrderName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required 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 + .getAppServiceCertificateOrderDetectorResponse( + this.client.getEndpoint(), + resourceGroupName, + certificateOrderName, + detectorName, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @param startTime The start time for detector response. + * @param endTime The end time for the detector response. + * @param timeGrain The time grain for the detector response. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAppServiceCertificateOrderDetectorResponseAsync( + String resourceGroupName, + String certificateOrderName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + return getAppServiceCertificateOrderDetectorResponseWithResponseAsync( + resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAppServiceCertificateOrderDetectorResponseAsync( + String resourceGroupName, String certificateOrderName, String detectorName) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return getAppServiceCertificateOrderDetectorResponseWithResponseAsync( + resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DetectorResponseInner getAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName, String detectorName) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return getAppServiceCertificateOrderDetectorResponseAsync( + resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain) + .block(); + } + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @param startTime The start time for detector response. + * @param endTime The end time for the detector response. + * @param timeGrain The time grain for the detector response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAppServiceCertificateOrderDetectorResponseWithResponse( + String resourceGroupName, + String certificateOrderName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + return getAppServiceCertificateOrderDetectorResponseWithResponseAsync( + resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listAppServiceCertificateOrderDetectorResponseNextSinglePageAsync(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 + .listAppServiceCertificateOrderDetectorResponseNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listAppServiceCertificateOrderDetectorResponseNextSinglePageAsync(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 + .listAppServiceCertificateOrderDetectorResponseNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrdersDiagnosticsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrdersDiagnosticsImpl.java new file mode 100644 index 0000000000000..d7b9c8b38208c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateOrdersDiagnosticsImpl.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.CertificateOrdersDiagnosticsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.models.CertificateOrdersDiagnostics; +import com.azure.resourcemanager.appservice.generated.models.DetectorResponse; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.time.OffsetDateTime; + +public final class CertificateOrdersDiagnosticsImpl implements CertificateOrdersDiagnostics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateOrdersDiagnosticsImpl.class); + + private final CertificateOrdersDiagnosticsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public CertificateOrdersDiagnosticsImpl( + CertificateOrdersDiagnosticsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName) { + PagedIterable inner = + this + .serviceClient() + .listAppServiceCertificateOrderDetectorResponse(resourceGroupName, certificateOrderName); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public PagedIterable listAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName, Context context) { + PagedIterable inner = + this + .serviceClient() + .listAppServiceCertificateOrderDetectorResponse(resourceGroupName, certificateOrderName, context); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public DetectorResponse getAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName, String detectorName) { + DetectorResponseInner inner = + this + .serviceClient() + .getAppServiceCertificateOrderDetectorResponse(resourceGroupName, certificateOrderName, detectorName); + if (inner != null) { + return new DetectorResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAppServiceCertificateOrderDetectorResponseWithResponse( + String resourceGroupName, + String certificateOrderName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + Response inner = + this + .serviceClient() + .getAppServiceCertificateOrderDetectorResponseWithResponse( + resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DetectorResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private CertificateOrdersDiagnosticsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateRegistrationProvidersClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateRegistrationProvidersClientImpl.java new file mode 100644 index 0000000000000..c00963bb0bc9f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateRegistrationProvidersClientImpl.java @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.CertificateRegistrationProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationCollection; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in CertificateRegistrationProvidersClient. + */ +public final class CertificateRegistrationProvidersClientImpl implements CertificateRegistrationProvidersClient { + private final ClientLogger logger = new ClientLogger(CertificateRegistrationProvidersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final CertificateRegistrationProvidersService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of CertificateRegistrationProvidersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CertificateRegistrationProvidersClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy + .create( + CertificateRegistrationProvidersService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientCertificateRegistrationProviders to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface CertificateRegistrationProvidersService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.CertificateRegistration/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listOperations( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listOperationsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsSinglePageAsync() { + 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.listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsSinglePageAsync(Context context) { + 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 + .listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOperationsAsync() { + return new PagedFlux<>( + () -> listOperationsSinglePageAsync(), nextLink -> listOperationsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOperationsAsync(Context context) { + return new PagedFlux<>( + () -> listOperationsSinglePageAsync(context), + nextLink -> listOperationsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperations() { + return new PagedIterable<>(listOperationsAsync()); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperations(Context context) { + return new PagedIterable<>(listOperationsAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsNextSinglePageAsync(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.listOperationsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsNextSinglePageAsync( + 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 + .listOperationsNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateRegistrationProvidersImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateRegistrationProvidersImpl.java new file mode 100644 index 0000000000000..820168fccaf0e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificateRegistrationProvidersImpl.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.appservice.generated.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.appservice.generated.fluent.CertificateRegistrationProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.azure.resourcemanager.appservice.generated.models.CertificateRegistrationProviders; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationDescription; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class CertificateRegistrationProvidersImpl implements CertificateRegistrationProviders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateRegistrationProvidersImpl.class); + + private final CertificateRegistrationProvidersClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public CertificateRegistrationProvidersImpl( + CertificateRegistrationProvidersClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listOperations() { + PagedIterable inner = this.serviceClient().listOperations(); + return Utils.mapPage(inner, inner1 -> new CsmOperationDescriptionImpl(inner1, this.manager())); + } + + public PagedIterable listOperations(Context context) { + PagedIterable inner = this.serviceClient().listOperations(context); + return Utils.mapPage(inner, inner1 -> new CsmOperationDescriptionImpl(inner1, this.manager())); + } + + private CertificateRegistrationProvidersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificatesClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificatesClientImpl.java new file mode 100644 index 0000000000000..7a7052c5be3aa --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificatesClientImpl.java @@ -0,0 +1,1274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.CertificatesClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateInner; +import com.azure.resourcemanager.appservice.generated.models.CertificateCollection; +import com.azure.resourcemanager.appservice.generated.models.CertificatePatchResource; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in CertificatesClient. */ +public final class CertificatesClientImpl implements CertificatesClient { + private final ClientLogger logger = new ClientLogger(CertificatesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final CertificatesService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of CertificatesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + CertificatesClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientCertificates to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface CertificatesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/certificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.Web/certificates" + + "/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates" + + "/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @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.Web/certificates" + + "/{name}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates" + + "/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CertificatePatchResource 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); + + @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); + } + + /** + * Description for Get all certificates for a subscription. + * + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=KeyVaultId eq 'KeyVaultId'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Get all certificates for a subscription. + * + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=KeyVaultId eq 'KeyVaultId'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get all certificates for a subscription. + * + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=KeyVaultId eq 'KeyVaultId'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter) { + return new PagedFlux<>(() -> listSinglePageAsync(filter), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all certificates 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 collection of certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String filter = null; + return new PagedFlux<>(() -> listSinglePageAsync(filter), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all certificates for a subscription. + * + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=KeyVaultId eq 'KeyVaultId'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String filter, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(filter, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all certificates 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 collection of certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String filter = null; + return new PagedIterable<>(listAsync(filter)); + } + + /** + * Description for Get all certificates for a subscription. + * + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=KeyVaultId eq 'KeyVaultId'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String filter, Context context) { + return new PagedIterable<>(listAsync(filter, context)); + } + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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())); + } + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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)); + } + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, CertificateInner certificateEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (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 + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + certificateEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (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 + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + certificateEnvelope, + accept, + context); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, CertificateInner certificateEnvelope) { + return createOrUpdateWithResponseAsync(resourceGroupName, name, certificateEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateInner createOrUpdate( + String resourceGroupName, String name, CertificateInner certificateEnvelope) { + return createOrUpdateAsync(resourceGroupName, name, certificateEnvelope).block(); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, String name, CertificateInner certificateEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, name, certificateEnvelope, context).block(); + } + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name) { + return deleteWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 name) { + deleteAsync(resourceGroupName, name).block(); + } + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, CertificatePatchResource certificateEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (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(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + certificateEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, CertificatePatchResource certificateEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (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(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + certificateEnvelope, + accept, + context); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String name, CertificatePatchResource certificateEnvelope) { + return updateWithResponseAsync(resourceGroupName, name, certificateEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateInner update( + String resourceGroupName, String name, CertificatePatchResource certificateEnvelope) { + return updateAsync(resourceGroupName, name, certificateEnvelope).block(); + } + + /** + * Description for Create or update a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @param certificateEnvelope Details of certificate, if it exists already. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String name, CertificatePatchResource certificateEnvelope, Context context) { + return updateWithResponseAsync(resourceGroupName, name, certificateEnvelope, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificates. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of certificates. + */ + @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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificatesImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificatesImpl.java new file mode 100644 index 0000000000000..6a1d8f58be5ab --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CertificatesImpl.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.CertificatesClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateInner; +import com.azure.resourcemanager.appservice.generated.models.Certificate; +import com.azure.resourcemanager.appservice.generated.models.Certificates; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class CertificatesImpl implements Certificates { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificatesImpl.class); + + private final CertificatesClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public CertificatesImpl( + CertificatesClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + } + + public PagedIterable list(String filter, Context context) { + PagedIterable inner = this.serviceClient().list(filter, context); + return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + } + + public Certificate getByResourceGroup(String resourceGroupName, String name) { + CertificateInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String name) { + this.serviceClient().delete(resourceGroupName, name); + } + + public Response deleteWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, name, context); + } + + public Certificate getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + this.deleteWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "certificates"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.deleteWithResponse(resourceGroupName, name, context); + } + + private CertificatesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public CertificateImpl define(String name) { + return new CertificateImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ConnectionStringDictionaryImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ConnectionStringDictionaryImpl.java new file mode 100644 index 0000000000000..7fd0cd88df7e0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ConnectionStringDictionaryImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ConnectionStringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.models.ConnStringValueTypePair; +import com.azure.resourcemanager.appservice.generated.models.ConnectionStringDictionary; +import java.util.Collections; +import java.util.Map; + +public final class ConnectionStringDictionaryImpl implements ConnectionStringDictionary { + private ConnectionStringDictionaryInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ConnectionStringDictionaryImpl( + ConnectionStringDictionaryInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Map properties() { + Map inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ConnectionStringDictionaryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppImpl.java new file mode 100644 index 0000000000000..52616de91c210 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appservice.generated.models.Configuration; +import com.azure.resourcemanager.appservice.generated.models.ContainerApp; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.Template; +import java.util.Collections; +import java.util.Map; + +public final class ContainerAppImpl implements ContainerApp, ContainerApp.Definition, ContainerApp.Update { + private ContainerAppInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public ContainerAppProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String kubeEnvironmentId() { + return this.innerModel().kubeEnvironmentId(); + } + + public String latestRevisionName() { + return this.innerModel().latestRevisionName(); + } + + public String latestRevisionFqdn() { + return this.innerModel().latestRevisionFqdn(); + } + + public Configuration configuration() { + return this.innerModel().configuration(); + } + + public Template template() { + return this.innerModel().template(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public ContainerAppInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + public ContainerAppImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ContainerApp create() { + this.innerObject = + serviceManager + .serviceClient() + .getContainerApps() + .createOrUpdate(resourceGroupName, name, this.innerModel(), Context.NONE); + return this; + } + + public ContainerApp create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getContainerApps() + .createOrUpdate(resourceGroupName, name, this.innerModel(), context); + return this; + } + + ContainerAppImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new ContainerAppInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public ContainerAppImpl update() { + return this; + } + + public ContainerApp apply() { + this.innerObject = + serviceManager + .serviceClient() + .getContainerApps() + .createOrUpdate(resourceGroupName, name, this.innerModel(), Context.NONE); + return this; + } + + public ContainerApp apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getContainerApps() + .createOrUpdate(resourceGroupName, name, this.innerModel(), context); + return this; + } + + ContainerAppImpl( + ContainerAppInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "containerApps"); + } + + public ContainerApp refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getContainerApps() + .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE) + .getValue(); + return this; + } + + public ContainerApp refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getContainerApps() + .getByResourceGroupWithResponse(resourceGroupName, name, context) + .getValue(); + return this; + } + + public ContainerAppImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ContainerAppImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ContainerAppImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public ContainerAppImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public ContainerAppImpl withKubeEnvironmentId(String kubeEnvironmentId) { + this.innerModel().withKubeEnvironmentId(kubeEnvironmentId); + return this; + } + + public ContainerAppImpl withConfiguration(Configuration configuration) { + this.innerModel().withConfiguration(configuration); + return this; + } + + public ContainerAppImpl withTemplate(Template template) { + this.innerModel().withTemplate(template); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsClientImpl.java new file mode 100644 index 0000000000000..31da223095e51 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsClientImpl.java @@ -0,0 +1,1397 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.ContainerAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SecretsCollectionInner; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppCollection; +import com.azure.resourcemanager.appservice.generated.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 ContainerAppsClient. */ +public final class ContainerAppsClientImpl implements ContainerAppsClient { + private final ClientLogger logger = new ClientLogger(ContainerAppsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ContainerAppsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of ContainerAppsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(ContainerAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientContainerApps to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface ContainerAppsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps") + @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.Web/containerApps") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.Web/containerApps" + + "/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps" + + "/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ContainerAppInner containerAppEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps" + + "/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSecrets( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @PathParam("name") String name, + @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 the Container Apps in a given subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + @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 the Container Apps in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + @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 the Container Apps in a given subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get the Container Apps in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the Container Apps in a given subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Get the Container Apps in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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 the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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) + private Mono getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupAsync(resourceGroupName, name).block(); + } + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (containerAppEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); + } else { + containerAppEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + containerAppEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (containerAppEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); + } else { + containerAppEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + containerAppEnvelope, + accept, + context); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContainerAppInner> beginCreateOrUpdateAsync( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, containerAppEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + ContainerAppInner.class, + ContainerAppInner.class, + this.client.getContext()); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContainerAppInner> beginCreateOrUpdateAsync( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, containerAppEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContainerAppInner> beginCreateOrUpdate( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope).getSyncPoller(); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContainerAppInner> beginCreateOrUpdate( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope, context).getSyncPoller(); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppInner createOrUpdate( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope) { + return createOrUpdateAsync(resourceGroupName, name, containerAppEnvelope).block(); + } + + /** + * Description for Create or update a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param containerAppEnvelope 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppInner createOrUpdate( + String resourceGroupName, String name, ContainerAppInner containerAppEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, name, containerAppEnvelope, context).block(); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String name) { + return beginDeleteAsync(resourceGroupName, name).getSyncPoller(); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, name, context).getSyncPoller(); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name) { + return beginDeleteAsync(resourceGroupName, name).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, name, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String name) { + deleteAsync(resourceGroupName, name).block(); + } + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String name, Context context) { + deleteAsync(resourceGroupName, name, context).block(); + } + + /** + * List secrets for a container app. + * + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Secrets Collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSecretsWithResponseAsync(String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSecrets( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + name, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List secrets for a container app. + * + * @param name 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSecretsWithResponseAsync(String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSecrets( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + name, + accept, + context); + } + + /** + * List secrets for a container app. + * + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Secrets Collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSecretsAsync(String name) { + return listSecretsWithResponseAsync(name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * List secrets for a container app. + * + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Secrets Collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SecretsCollectionInner listSecrets(String name) { + return listSecretsAsync(name).block(); + } + + /** + * List secrets for a container app. + * + * @param name 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSecretsWithResponse(String name, Context context) { + return listSecretsWithResponseAsync(name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App collection ARM resource. + */ + @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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsImpl.java new file mode 100644 index 0000000000000..84e26931c0e49 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsImpl.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.appservice.generated.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.appservice.generated.fluent.ContainerAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SecretsCollectionInner; +import com.azure.resourcemanager.appservice.generated.models.ContainerApp; +import com.azure.resourcemanager.appservice.generated.models.ContainerApps; +import com.azure.resourcemanager.appservice.generated.models.SecretsCollection; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ContainerAppsImpl implements ContainerApps { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerAppsImpl.class); + + private final ContainerAppsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public ContainerAppsImpl( + ContainerAppsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); + } + + public ContainerApp getByResourceGroup(String resourceGroupName, String name) { + ContainerAppInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name); + if (inner != null) { + return new ContainerAppImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ContainerAppImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String name) { + this.serviceClient().delete(resourceGroupName, name); + } + + public void delete(String resourceGroupName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, name, context); + } + + public SecretsCollection listSecrets(String name) { + SecretsCollectionInner inner = this.serviceClient().listSecrets(name); + if (inner != null) { + return new SecretsCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSecretsWithResponse(String name, Context context) { + Response inner = this.serviceClient().listSecretsWithResponse(name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SecretsCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ContainerApp 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 name = Utils.getValueFromIdByName(id, "containerApps"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "containerApps"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "containerApps"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + } + this.delete(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "containerApps"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + } + this.delete(resourceGroupName, name, context); + } + + private ContainerAppsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public ContainerAppImpl define(String name) { + return new ContainerAppImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsRevisionsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsRevisionsClientImpl.java new file mode 100644 index 0000000000000..98bc96b7f480c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsRevisionsClientImpl.java @@ -0,0 +1,1038 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.ContainerAppsRevisionsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.RevisionInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.RevisionCollection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. */ +public final class ContainerAppsRevisionsClientImpl implements ContainerAppsRevisionsClient { + private final ClientLogger logger = new ClientLogger(ContainerAppsRevisionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ContainerAppsRevisionsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of ContainerAppsRevisionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsRevisionsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy + .create(ContainerAppsRevisionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientContainerAppsRevisions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface ContainerAppsRevisionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps" + + "/{containerAppName}/revisions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listRevisions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, + @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.Web/containerApps" + + "/{containerAppName}/revisions/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getRevision( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps" + + "/{containerAppName}/revisions/{name}/activate") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> activateRevision( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps" + + "/{containerAppName}/revisions/{name}/deactivate") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deactivateRevision( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps" + + "/{containerAppName}/revisions/{name}/restart") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> restartRevision( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listRevisionsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRevisionsSinglePageAsync( + 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 (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 (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 + .listRevisions( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App for which Revisions are 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 Revisions for a given Container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRevisionsSinglePageAsync( + 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 (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 (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 + .listRevisions( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + 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 the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName) { + return new PagedFlux<>( + () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName), + nextLink -> listRevisionsNextSinglePageAsync(nextLink)); + } + + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App for which Revisions are 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 Revisions for a given Container App. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRevisionsAsync( + String resourceGroupName, String containerAppName, Context context) { + return new PagedFlux<>( + () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, context), + nextLink -> listRevisionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @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. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { + return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName)); + } + + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App for which Revisions are 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 Revisions for a given Container App. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRevisions( + String resourceGroupName, String containerAppName, Context context) { + return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, context)); + } + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name 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) + private Mono> getRevisionWithResponseAsync( + String resourceGroupName, String containerAppName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getRevision( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRevisionWithResponseAsync( + String resourceGroupName, String containerAppName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getRevision( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name 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) + private Mono getRevisionAsync(String resourceGroupName, String containerAppName, String name) { + return getRevisionWithResponseAsync(resourceGroupName, containerAppName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name 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 name) { + return getRevisionAsync(resourceGroupName, containerAppName, name).block(); + } + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context) { + return getRevisionWithResponseAsync(resourceGroupName, containerAppName, name, context).block(); + } + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> activateRevisionWithResponseAsync( + String resourceGroupName, String containerAppName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .activateRevision( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> activateRevisionWithResponseAsync( + String resourceGroupName, String containerAppName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .activateRevision( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono activateRevisionAsync(String resourceGroupName, String containerAppName, String name) { + return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 activateRevision(String resourceGroupName, String containerAppName, String name) { + activateRevisionAsync(resourceGroupName, containerAppName, name).block(); + } + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response activateRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context) { + return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, name, context).block(); + } + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deactivateRevisionWithResponseAsync( + String resourceGroupName, String containerAppName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deactivateRevision( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deactivateRevisionWithResponseAsync( + String resourceGroupName, String containerAppName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deactivateRevision( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deactivateRevisionAsync(String resourceGroupName, String containerAppName, String name) { + return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deactivateRevision(String resourceGroupName, String containerAppName, String name) { + deactivateRevisionAsync(resourceGroupName, containerAppName, name).block(); + } + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deactivateRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context) { + return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, name, context).block(); + } + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> restartRevisionWithResponseAsync( + String resourceGroupName, String containerAppName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .restartRevision( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> restartRevisionWithResponseAsync( + String resourceGroupName, String containerAppName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (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 (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .restartRevision( + this.client.getEndpoint(), + resourceGroupName, + containerAppName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartRevisionAsync(String resourceGroupName, String containerAppName, String name) { + return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restartRevision(String resourceGroupName, String containerAppName, String name) { + restartRevisionAsync(resourceGroupName, containerAppName, name).block(); + } + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response restartRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context) { + return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Revisions collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRevisionsNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Revisions collection ARM resource. + */ + @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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsRevisionsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsRevisionsImpl.java new file mode 100644 index 0000000000000..b0479e41704fb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContainerAppsRevisionsImpl.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.ContainerAppsRevisionsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.RevisionInner; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppsRevisions; +import com.azure.resourcemanager.appservice.generated.models.Revision; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ContainerAppsRevisionsImpl implements ContainerAppsRevisions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerAppsRevisionsImpl.class); + + private final ContainerAppsRevisionsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public ContainerAppsRevisionsImpl( + ContainerAppsRevisionsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + 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, Context context) { + PagedIterable inner = + this.serviceClient().listRevisions(resourceGroupName, containerAppName, context); + return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); + } + + public Revision getRevision(String resourceGroupName, String containerAppName, String name) { + RevisionInner inner = this.serviceClient().getRevision(resourceGroupName, containerAppName, name); + if (inner != null) { + return new RevisionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context) { + Response inner = + this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RevisionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void activateRevision(String resourceGroupName, String containerAppName, String name) { + this.serviceClient().activateRevision(resourceGroupName, containerAppName, name); + } + + public Response activateRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context) { + return this.serviceClient().activateRevisionWithResponse(resourceGroupName, containerAppName, name, context); + } + + public void deactivateRevision(String resourceGroupName, String containerAppName, String name) { + this.serviceClient().deactivateRevision(resourceGroupName, containerAppName, name); + } + + public Response deactivateRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context) { + return this.serviceClient().deactivateRevisionWithResponse(resourceGroupName, containerAppName, name, context); + } + + public void restartRevision(String resourceGroupName, String containerAppName, String name) { + this.serviceClient().restartRevision(resourceGroupName, containerAppName, name); + } + + public Response restartRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context) { + return this.serviceClient().restartRevisionWithResponse(resourceGroupName, containerAppName, name, context); + } + + private ContainerAppsRevisionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContinuousWebJobImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContinuousWebJobImpl.java new file mode 100644 index 0000000000000..3cff2a3e717d9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ContinuousWebJobImpl.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ContinuousWebJobInner; +import com.azure.resourcemanager.appservice.generated.models.ContinuousWebJob; +import com.azure.resourcemanager.appservice.generated.models.ContinuousWebJobStatus; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import java.util.Collections; +import java.util.Map; + +public final class ContinuousWebJobImpl implements ContinuousWebJob { + private ContinuousWebJobInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ContinuousWebJobImpl( + ContinuousWebJobInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public ContinuousWebJobStatus status() { + return this.innerModel().status(); + } + + public String detailedStatus() { + return this.innerModel().detailedStatus(); + } + + public String logUrl() { + return this.innerModel().logUrl(); + } + + public String runCommand() { + return this.innerModel().runCommand(); + } + + public String url() { + return this.innerModel().url(); + } + + public String extraInfoUrl() { + return this.innerModel().extraInfoUrl(); + } + + public WebJobType webJobType() { + return this.innerModel().webJobType(); + } + + public String error() { + return this.innerModel().error(); + } + + public Boolean usingSdk() { + return this.innerModel().usingSdk(); + } + + public Map settings() { + Map inner = this.innerModel().settings(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ContinuousWebJobInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmOperationDescriptionImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmOperationDescriptionImpl.java new file mode 100644 index 0000000000000..eb972759b96b9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmOperationDescriptionImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationDescription; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationDescriptionProperties; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationDisplay; + +public final class CsmOperationDescriptionImpl implements CsmOperationDescription { + private CsmOperationDescriptionInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + CsmOperationDescriptionImpl( + CsmOperationDescriptionInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean isDataAction() { + return this.innerModel().isDataAction(); + } + + public CsmOperationDisplay display() { + return this.innerModel().display(); + } + + public String origin() { + return this.innerModel().origin(); + } + + public CsmOperationDescriptionProperties properties() { + return this.innerModel().properties(); + } + + public CsmOperationDescriptionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmPublishingCredentialsPoliciesEntityImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmPublishingCredentialsPoliciesEntityImpl.java new file mode 100644 index 0000000000000..7c0d735b7953d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmPublishingCredentialsPoliciesEntityImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; +import com.azure.resourcemanager.appservice.generated.models.CsmPublishingCredentialsPoliciesEntity; + +public final class CsmPublishingCredentialsPoliciesEntityImpl implements CsmPublishingCredentialsPoliciesEntity { + private CsmPublishingCredentialsPoliciesEntityInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + CsmPublishingCredentialsPoliciesEntityImpl( + CsmPublishingCredentialsPoliciesEntityInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public boolean allow() { + return this.innerModel().allow(); + } + + public CsmPublishingCredentialsPoliciesEntityInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmUsageQuotaImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmUsageQuotaImpl.java new file mode 100644 index 0000000000000..1a9b33f5c2c99 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CsmUsageQuotaImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.models.CsmUsageQuota; +import com.azure.resourcemanager.appservice.generated.models.LocalizableString; +import java.time.OffsetDateTime; + +public final class CsmUsageQuotaImpl implements CsmUsageQuota { + private CsmUsageQuotaInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + CsmUsageQuotaImpl( + CsmUsageQuotaInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String unit() { + return this.innerModel().unit(); + } + + public OffsetDateTime nextResetTime() { + return this.innerModel().nextResetTime(); + } + + public Long currentValue() { + return this.innerModel().currentValue(); + } + + public Long limit() { + return this.innerModel().limit(); + } + + public LocalizableString name() { + return this.innerModel().name(); + } + + public CsmUsageQuotaInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CustomHostnameAnalysisResultImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CustomHostnameAnalysisResultImpl.java new file mode 100644 index 0000000000000..439493d45ef25 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CustomHostnameAnalysisResultImpl.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameAnalysisResultInner; +import com.azure.resourcemanager.appservice.generated.models.CustomHostnameAnalysisResult; +import com.azure.resourcemanager.appservice.generated.models.DnsVerificationTestResult; +import com.azure.resourcemanager.appservice.generated.models.ErrorEntity; +import java.util.Collections; +import java.util.List; + +public final class CustomHostnameAnalysisResultImpl implements CustomHostnameAnalysisResult { + private CustomHostnameAnalysisResultInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + CustomHostnameAnalysisResultImpl( + CustomHostnameAnalysisResultInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Boolean isHostnameAlreadyVerified() { + return this.innerModel().isHostnameAlreadyVerified(); + } + + public DnsVerificationTestResult customDomainVerificationTest() { + return this.innerModel().customDomainVerificationTest(); + } + + public ErrorEntity customDomainVerificationFailureInfo() { + return this.innerModel().customDomainVerificationFailureInfo(); + } + + public Boolean hasConflictOnScaleUnit() { + return this.innerModel().hasConflictOnScaleUnit(); + } + + public Boolean hasConflictAcrossSubscription() { + return this.innerModel().hasConflictAcrossSubscription(); + } + + public String conflictingAppResourceId() { + return this.innerModel().conflictingAppResourceId(); + } + + public List cNameRecords() { + List inner = this.innerModel().cNameRecords(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List txtRecords() { + List inner = this.innerModel().txtRecords(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List aRecords() { + List inner = this.innerModel().aRecords(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List alternateCNameRecords() { + List inner = this.innerModel().alternateCNameRecords(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List alternateTxtRecords() { + List inner = this.innerModel().alternateTxtRecords(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public CustomHostnameAnalysisResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CustomHostnameSitesImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CustomHostnameSitesImpl.java new file mode 100644 index 0000000000000..90e4e076ea6b3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/CustomHostnameSitesImpl.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameSitesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.models.CustomHostnameSites; +import com.azure.resourcemanager.appservice.generated.models.Identifier; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class CustomHostnameSitesImpl implements CustomHostnameSites { + private CustomHostnameSitesInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + CustomHostnameSitesImpl( + CustomHostnameSitesInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String customHostname() { + return this.innerModel().customHostname(); + } + + public String region() { + return this.innerModel().region(); + } + + public List siteResourceIds() { + List inner = this.innerModel().siteResourceIds(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new IdentifierImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public CustomHostnameSitesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedSiteImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedSiteImpl.java new file mode 100644 index 0000000000000..a327f84e4c6e9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedSiteImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DeletedSiteInner; +import com.azure.resourcemanager.appservice.generated.models.DeletedSite; + +public final class DeletedSiteImpl implements DeletedSite { + private DeletedSiteInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DeletedSiteImpl( + DeletedSiteInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Integer deletedSiteId() { + return this.innerModel().deletedSiteId(); + } + + public String deletedTimestamp() { + return this.innerModel().deletedTimestamp(); + } + + public String subscription() { + return this.innerModel().subscription(); + } + + public String resourceGroup() { + return this.innerModel().resourceGroup(); + } + + public String deletedSiteName() { + return this.innerModel().deletedSiteName(); + } + + public String slot() { + return this.innerModel().slot(); + } + + public String kindPropertiesKind() { + return this.innerModel().kindPropertiesKind(); + } + + public String geoRegionName() { + return this.innerModel().geoRegionName(); + } + + public DeletedSiteInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedWebAppsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedWebAppsClientImpl.java new file mode 100644 index 0000000000000..82472b6bb1b7a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedWebAppsClientImpl.java @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.DeletedWebAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeletedSiteInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.DeletedWebAppCollection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DeletedWebAppsClient. */ +public final class DeletedWebAppsClientImpl implements DeletedWebAppsClient { + private final ClientLogger logger = new ClientLogger(DeletedWebAppsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final DeletedWebAppsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of DeletedWebAppsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DeletedWebAppsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(DeletedWebAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientDeletedWebApps to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface DeletedWebAppsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites") + @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}/providers/Microsoft.Web/locations/{location}/deletedSites") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByLocation( + @HostParam("$host") String endpoint, + @PathParam("location") String location, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDeletedWebAppByLocation( + @HostParam("$host") String endpoint, + @PathParam("location") String location, + @PathParam("deletedSiteId") String deletedSiteId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByLocationNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Get all deleted apps 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 collection of deleted apps. + */ + @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())); + } + + /** + * Description for Get all deleted apps 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 collection of deleted apps. + */ + @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)); + } + + /** + * Description for Get all deleted apps 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 collection of deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all deleted apps 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 collection of deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all deleted apps 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 collection of deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for Get all deleted apps 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 collection of deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location 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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByLocation( + this.client.getEndpoint(), + location, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location 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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByLocation( + this.client.getEndpoint(), + location, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location 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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location) { + return new PagedFlux<>( + () -> listByLocationSinglePageAsync(location), nextLink -> listByLocationNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location 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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByLocationAsync(String location, Context context) { + return new PagedFlux<>( + () -> listByLocationSinglePageAsync(location, context), + nextLink -> listByLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location 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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location) { + return new PagedIterable<>(listByLocationAsync(location)); + } + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location 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 deleted apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByLocation(String location, Context context) { + return new PagedIterable<>(listByLocationAsync(location, context)); + } + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeletedWebAppByLocationWithResponseAsync( + String location, String deletedSiteId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (deletedSiteId == null) { + return Mono.error(new IllegalArgumentException("Parameter deletedSiteId is required 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 + .getDeletedWebAppByLocation( + this.client.getEndpoint(), + location, + deletedSiteId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeletedWebAppByLocationWithResponseAsync( + String location, String deletedSiteId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (deletedSiteId == null) { + return Mono.error(new IllegalArgumentException("Parameter deletedSiteId is required 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 + .getDeletedWebAppByLocation( + this.client.getEndpoint(), + location, + deletedSiteId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeletedWebAppByLocationAsync(String location, String deletedSiteId) { + return getDeletedWebAppByLocationWithResponseAsync(location, deletedSiteId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeletedSiteInner getDeletedWebAppByLocation(String location, String deletedSiteId) { + return getDeletedWebAppByLocationAsync(location, deletedSiteId).block(); + } + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeletedWebAppByLocationWithResponse( + String location, String deletedSiteId, Context context) { + return getDeletedWebAppByLocationWithResponseAsync(location, deletedSiteId, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of deleted apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of deleted apps. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of deleted apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(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.listByLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of deleted apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByLocationNextSinglePageAsync(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 + .listByLocationNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedWebAppsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedWebAppsImpl.java new file mode 100644 index 0000000000000..ba063a8256cf7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeletedWebAppsImpl.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.appservice.generated.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.appservice.generated.fluent.DeletedWebAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeletedSiteInner; +import com.azure.resourcemanager.appservice.generated.models.DeletedSite; +import com.azure.resourcemanager.appservice.generated.models.DeletedWebApps; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class DeletedWebAppsImpl implements DeletedWebApps { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedWebAppsImpl.class); + + private final DeletedWebAppsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public DeletedWebAppsImpl( + DeletedWebAppsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new DeletedSiteImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new DeletedSiteImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location) { + PagedIterable inner = this.serviceClient().listByLocation(location); + return Utils.mapPage(inner, inner1 -> new DeletedSiteImpl(inner1, this.manager())); + } + + public PagedIterable listByLocation(String location, Context context) { + PagedIterable inner = this.serviceClient().listByLocation(location, context); + return Utils.mapPage(inner, inner1 -> new DeletedSiteImpl(inner1, this.manager())); + } + + public DeletedSite getDeletedWebAppByLocation(String location, String deletedSiteId) { + DeletedSiteInner inner = this.serviceClient().getDeletedWebAppByLocation(location, deletedSiteId); + if (inner != null) { + return new DeletedSiteImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDeletedWebAppByLocationWithResponse( + String location, String deletedSiteId, Context context) { + Response inner = + this.serviceClient().getDeletedWebAppByLocationWithResponse(location, deletedSiteId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeletedSiteImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private DeletedWebAppsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeploymentImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeploymentImpl.java new file mode 100644 index 0000000000000..383f7a82d642f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeploymentImpl.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentInner; +import com.azure.resourcemanager.appservice.generated.models.Deployment; +import java.time.OffsetDateTime; + +public final class DeploymentImpl implements Deployment, Deployment.Definition { + private DeploymentInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DeploymentImpl( + DeploymentInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Integer status() { + return this.innerModel().status(); + } + + public String message() { + return this.innerModel().message(); + } + + public String author() { + return this.innerModel().author(); + } + + public String deployer() { + return this.innerModel().deployer(); + } + + public String authorEmail() { + return this.innerModel().authorEmail(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public Boolean active() { + return this.innerModel().active(); + } + + public String details() { + return this.innerModel().details(); + } + + public DeploymentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String id; + + public DeploymentImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public Deployment create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createDeploymentWithResponse(resourceGroupName, name, id, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Deployment create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createDeploymentWithResponse(resourceGroupName, name, id, this.innerModel(), context) + .getValue(); + return this; + } + + DeploymentImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new DeploymentInner(); + this.serviceManager = serviceManager; + this.id = name; + } + + public Deployment refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getDeploymentWithResponse(resourceGroupName, name, id, Context.NONE) + .getValue(); + return this; + } + + public Deployment refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getDeploymentWithResponse(resourceGroupName, name, id, context) + .getValue(); + return this; + } + + public DeploymentImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public DeploymentImpl withStatus(Integer status) { + this.innerModel().withStatus(status); + return this; + } + + public DeploymentImpl withMessage(String message) { + this.innerModel().withMessage(message); + return this; + } + + public DeploymentImpl withAuthor(String author) { + this.innerModel().withAuthor(author); + return this; + } + + public DeploymentImpl withDeployer(String deployer) { + this.innerModel().withDeployer(deployer); + return this; + } + + public DeploymentImpl withAuthorEmail(String authorEmail) { + this.innerModel().withAuthorEmail(authorEmail); + return this; + } + + public DeploymentImpl withStartTime(OffsetDateTime startTime) { + this.innerModel().withStartTime(startTime); + return this; + } + + public DeploymentImpl withEndTime(OffsetDateTime endTime) { + this.innerModel().withEndTime(endTime); + return this; + } + + public DeploymentImpl withActive(Boolean active) { + this.innerModel().withActive(active); + return this; + } + + public DeploymentImpl withDetails(String details) { + this.innerModel().withDetails(details); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeploymentLocationsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeploymentLocationsImpl.java new file mode 100644 index 0000000000000..5ea30c37c60bb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DeploymentLocationsImpl.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironment; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentLocationsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.GeoRegionInner; +import com.azure.resourcemanager.appservice.generated.models.DeploymentLocations; +import com.azure.resourcemanager.appservice.generated.models.GeoRegion; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentDeploymentInfo; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class DeploymentLocationsImpl implements DeploymentLocations { + private DeploymentLocationsInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DeploymentLocationsImpl( + DeploymentLocationsInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List locations() { + List inner = this.innerModel().locations(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new GeoRegionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public List hostingEnvironments() { + List inner = this.innerModel().hostingEnvironments(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List hostingEnvironmentDeploymentInfos() { + List inner = this.innerModel().hostingEnvironmentDeploymentInfos(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DeploymentLocationsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DetectorDefinitionResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DetectorDefinitionResourceImpl.java new file mode 100644 index 0000000000000..d25d532441a5c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DetectorDefinitionResourceImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinitionResourceInner; +import com.azure.resourcemanager.appservice.generated.models.DetectorDefinitionResource; + +public final class DetectorDefinitionResourceImpl implements DetectorDefinitionResource { + private DetectorDefinitionResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DetectorDefinitionResourceImpl( + DetectorDefinitionResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String description() { + return this.innerModel().description(); + } + + public Double rank() { + return this.innerModel().rank(); + } + + public Boolean isEnabled() { + return this.innerModel().isEnabled(); + } + + public DetectorDefinitionResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DetectorResponseImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DetectorResponseImpl.java new file mode 100644 index 0000000000000..6203df578251c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DetectorResponseImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.models.DataProviderMetadata; +import com.azure.resourcemanager.appservice.generated.models.DetectorInfo; +import com.azure.resourcemanager.appservice.generated.models.DetectorResponse; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticData; +import com.azure.resourcemanager.appservice.generated.models.QueryUtterancesResults; +import com.azure.resourcemanager.appservice.generated.models.Status; +import java.util.Collections; +import java.util.List; + +public final class DetectorResponseImpl implements DetectorResponse { + private DetectorResponseInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DetectorResponseImpl( + DetectorResponseInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public DetectorInfo metadata() { + return this.innerModel().metadata(); + } + + public List dataset() { + List inner = this.innerModel().dataset(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Status status() { + return this.innerModel().status(); + } + + public List dataProvidersMetadata() { + List inner = this.innerModel().dataProvidersMetadata(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public QueryUtterancesResults suggestedUtterances() { + return this.innerModel().suggestedUtterances(); + } + + public DetectorResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticAnalysisImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticAnalysisImpl.java new file mode 100644 index 0000000000000..315670892f187 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticAnalysisImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinition; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticAnalysisInner; +import com.azure.resourcemanager.appservice.generated.models.AbnormalTimePeriod; +import com.azure.resourcemanager.appservice.generated.models.AnalysisData; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticAnalysis; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class DiagnosticAnalysisImpl implements DiagnosticAnalysis { + private DiagnosticAnalysisInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DiagnosticAnalysisImpl( + DiagnosticAnalysisInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public List abnormalTimePeriods() { + List inner = this.innerModel().abnormalTimePeriods(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List payload() { + List inner = this.innerModel().payload(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List nonCorrelatedDetectors() { + List inner = this.innerModel().nonCorrelatedDetectors(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DiagnosticAnalysisInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticCategoryImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticCategoryImpl.java new file mode 100644 index 0000000000000..181c6992a9901 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticCategoryImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticCategoryInner; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticCategory; + +public final class DiagnosticCategoryImpl implements DiagnosticCategory { + private DiagnosticCategoryInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DiagnosticCategoryImpl( + DiagnosticCategoryInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String description() { + return this.innerModel().description(); + } + + public DiagnosticCategoryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticDetectorResponseImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticDetectorResponseImpl.java new file mode 100644 index 0000000000000..00859676b716f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticDetectorResponseImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinition; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticDetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.models.DetectorAbnormalTimePeriod; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticDetectorResponse; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticMetricSet; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.ResponseMetadata; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class DiagnosticDetectorResponseImpl implements DiagnosticDetectorResponse { + private DiagnosticDetectorResponseInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DiagnosticDetectorResponseImpl( + DiagnosticDetectorResponseInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public Boolean issueDetected() { + return this.innerModel().issueDetected(); + } + + public DetectorDefinition detectorDefinition() { + return this.innerModel().detectorDefinition(); + } + + public List metrics() { + List inner = this.innerModel().metrics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List abnormalTimePeriods() { + List inner = this.innerModel().abnormalTimePeriods(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List> data() { + List> inner = this.innerModel().data(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ResponseMetadata responseMetadata() { + return this.innerModel().responseMetadata(); + } + + public DiagnosticDetectorResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticsClientImpl.java new file mode 100644 index 0000000000000..0eaf007df7d72 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticsClientImpl.java @@ -0,0 +1,5924 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.DiagnosticsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.AnalysisDefinitionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinitionResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticAnalysisInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticCategoryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticDetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.DetectorResponseCollection; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticAnalysisCollection; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticCategoryCollection; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticDetectorCollection; +import java.time.OffsetDateTime; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DiagnosticsClient. */ +public final class DiagnosticsClientImpl implements DiagnosticsClient { + private final ClientLogger logger = new ClientLogger(DiagnosticsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final DiagnosticsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of DiagnosticsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DiagnosticsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(DiagnosticsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientDiagnostics to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface DiagnosticsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{name}/detectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHostingEnvironmentDetectorResponses( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{name}/detectors/{detectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getHostingEnvironmentDetectorResponse( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("detectorName") String detectorName, + @QueryParam("startTime") OffsetDateTime startTime, + @QueryParam("endTime") OffsetDateTime endTime, + @QueryParam("timeGrain") String timeGrain, + @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.Web/sites" + + "/{siteName}/detectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteDetectorResponses( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @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.Web/sites" + + "/{siteName}/detectors/{detectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteDetectorResponse( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("detectorName") String detectorName, + @QueryParam("startTime") OffsetDateTime startTime, + @QueryParam("endTime") OffsetDateTime endTime, + @QueryParam("timeGrain") String timeGrain, + @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.Web/sites" + + "/{siteName}/diagnostics") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteDiagnosticCategories( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @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.Web/sites" + + "/{siteName}/diagnostics/{diagnosticCategory}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteDiagnosticCategory( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @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.Web/sites" + + "/{siteName}/diagnostics/{diagnosticCategory}/analyses") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteAnalyses( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @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.Web/sites" + + "/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteAnalysis( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("analysisName") String analysisName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + + "/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> executeSiteAnalysis( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("analysisName") String analysisName, + @QueryParam("startTime") OffsetDateTime startTime, + @QueryParam("endTime") OffsetDateTime endTime, + @QueryParam("timeGrain") String timeGrain, + @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.Web/sites" + + "/{siteName}/diagnostics/{diagnosticCategory}/detectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteDetectors( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @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.Web/sites" + + "/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteDetector( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("detectorName") String detectorName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + + "/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> executeSiteDetector( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("detectorName") String detectorName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @QueryParam("startTime") OffsetDateTime startTime, + @QueryParam("endTime") OffsetDateTime endTime, + @QueryParam("timeGrain") String timeGrain, + @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.Web/sites" + + "/{siteName}/slots/{slot}/detectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteDetectorResponsesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("slot") String slot, + @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.Web/sites" + + "/{siteName}/slots/{slot}/detectors/{detectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteDetectorResponseSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("detectorName") String detectorName, + @PathParam("slot") String slot, + @QueryParam("startTime") OffsetDateTime startTime, + @QueryParam("endTime") OffsetDateTime endTime, + @QueryParam("timeGrain") String timeGrain, + @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.Web/sites" + + "/{siteName}/slots/{slot}/diagnostics") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteDiagnosticCategoriesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("slot") String slot, + @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.Web/sites" + + "/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteDiagnosticCategorySlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("slot") String slot, + @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.Web/sites" + + "/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteAnalysesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("slot") String slot, + @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.Web/sites" + + "/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteAnalysisSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("analysisName") String analysisName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + + "/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> executeSiteAnalysisSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("analysisName") String analysisName, + @PathParam("slot") String slot, + @QueryParam("startTime") OffsetDateTime startTime, + @QueryParam("endTime") OffsetDateTime endTime, + @QueryParam("timeGrain") String timeGrain, + @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.Web/sites" + + "/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteDetectorsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("slot") String slot, + @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.Web/sites" + + "/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteDetectorSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("detectorName") String detectorName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + + "/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> executeSiteDetectorSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("detectorName") String detectorName, + @PathParam("diagnosticCategory") String diagnosticCategory, + @PathParam("slot") String slot, + @QueryParam("startTime") OffsetDateTime startTime, + @QueryParam("endTime") OffsetDateTime endTime, + @QueryParam("timeGrain") String timeGrain, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHostingEnvironmentDetectorResponsesNext( + @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> listSiteDetectorResponsesNext( + @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> listSiteDiagnosticCategoriesNext( + @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> listSiteAnalysesNext( + @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> listSiteDetectorsNext( + @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> listSiteDetectorResponsesSlotNext( + @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> listSiteDiagnosticCategoriesSlotNext( + @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> listSiteAnalysesSlotNext( + @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> listSiteDetectorsSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostingEnvironmentDetectorResponsesSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHostingEnvironmentDetectorResponses( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostingEnvironmentDetectorResponsesSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHostingEnvironmentDetectorResponses( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHostingEnvironmentDetectorResponsesAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listHostingEnvironmentDetectorResponsesSinglePageAsync(resourceGroupName, name), + nextLink -> listHostingEnvironmentDetectorResponsesNextSinglePageAsync(nextLink)); + } + + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHostingEnvironmentDetectorResponsesAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listHostingEnvironmentDetectorResponsesSinglePageAsync(resourceGroupName, name, context), + nextLink -> listHostingEnvironmentDetectorResponsesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHostingEnvironmentDetectorResponses( + String resourceGroupName, String name) { + return new PagedIterable<>(listHostingEnvironmentDetectorResponsesAsync(resourceGroupName, name)); + } + + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHostingEnvironmentDetectorResponses( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listHostingEnvironmentDetectorResponsesAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHostingEnvironmentDetectorResponseWithResponseAsync( + String resourceGroupName, + String name, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required 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 + .getHostingEnvironmentDetectorResponse( + this.client.getEndpoint(), + resourceGroupName, + name, + detectorName, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHostingEnvironmentDetectorResponseWithResponseAsync( + String resourceGroupName, + String name, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required 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 + .getHostingEnvironmentDetectorResponse( + this.client.getEndpoint(), + resourceGroupName, + name, + detectorName, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getHostingEnvironmentDetectorResponseAsync( + String resourceGroupName, + String name, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + return getHostingEnvironmentDetectorResponseWithResponseAsync( + resourceGroupName, name, detectorName, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getHostingEnvironmentDetectorResponseAsync( + String resourceGroupName, String name, String detectorName) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return getHostingEnvironmentDetectorResponseWithResponseAsync( + resourceGroupName, name, detectorName, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DetectorResponseInner getHostingEnvironmentDetectorResponse( + String resourceGroupName, String name, String detectorName) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return getHostingEnvironmentDetectorResponseAsync( + resourceGroupName, name, detectorName, startTime, endTime, timeGrain) + .block(); + } + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getHostingEnvironmentDetectorResponseWithResponse( + String resourceGroupName, + String name, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + return getHostingEnvironmentDetectorResponseWithResponseAsync( + resourceGroupName, name, detectorName, startTime, endTime, timeGrain, context) + .block(); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorResponsesSinglePageAsync( + String resourceGroupName, String siteName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .listSiteDetectorResponses( + this.client.getEndpoint(), + resourceGroupName, + siteName, + 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())); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorResponsesSinglePageAsync( + String resourceGroupName, String siteName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .listSiteDetectorResponses( + this.client.getEndpoint(), + resourceGroupName, + siteName, + 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)); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDetectorResponsesAsync(String resourceGroupName, String siteName) { + return new PagedFlux<>( + () -> listSiteDetectorResponsesSinglePageAsync(resourceGroupName, siteName), + nextLink -> listSiteDetectorResponsesNextSinglePageAsync(nextLink)); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDetectorResponsesAsync( + String resourceGroupName, String siteName, Context context) { + return new PagedFlux<>( + () -> listSiteDetectorResponsesSinglePageAsync(resourceGroupName, siteName, context), + nextLink -> listSiteDetectorResponsesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDetectorResponses(String resourceGroupName, String siteName) { + return new PagedIterable<>(listSiteDetectorResponsesAsync(resourceGroupName, siteName)); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDetectorResponses( + String resourceGroupName, String siteName, Context context) { + return new PagedIterable<>(listSiteDetectorResponsesAsync(resourceGroupName, siteName, context)); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDetectorResponseWithResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required 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 + .getSiteDetectorResponse( + this.client.getEndpoint(), + resourceGroupName, + siteName, + detectorName, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDetectorResponseWithResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required 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 + .getSiteDetectorResponse( + this.client.getEndpoint(), + resourceGroupName, + siteName, + detectorName, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteDetectorResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + return getSiteDetectorResponseWithResponseAsync( + resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteDetectorResponseAsync( + String resourceGroupName, String siteName, String detectorName) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return getSiteDetectorResponseWithResponseAsync( + resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DetectorResponseInner getSiteDetectorResponse( + String resourceGroupName, String siteName, String detectorName) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return getSiteDetectorResponseAsync(resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain) + .block(); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteDetectorResponseWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + return getSiteDetectorResponseWithResponseAsync( + resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain, context) + .block(); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDiagnosticCategoriesSinglePageAsync( + String resourceGroupName, String siteName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .listSiteDiagnosticCategories( + this.client.getEndpoint(), + resourceGroupName, + siteName, + 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())); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDiagnosticCategoriesSinglePageAsync( + String resourceGroupName, String siteName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .listSiteDiagnosticCategories( + this.client.getEndpoint(), + resourceGroupName, + siteName, + 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)); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDiagnosticCategoriesAsync( + String resourceGroupName, String siteName) { + return new PagedFlux<>( + () -> listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName), + nextLink -> listSiteDiagnosticCategoriesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDiagnosticCategoriesAsync( + String resourceGroupName, String siteName, Context context) { + return new PagedFlux<>( + () -> listSiteDiagnosticCategoriesSinglePageAsync(resourceGroupName, siteName, context), + nextLink -> listSiteDiagnosticCategoriesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDiagnosticCategories( + String resourceGroupName, String siteName) { + return new PagedIterable<>(listSiteDiagnosticCategoriesAsync(resourceGroupName, siteName)); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDiagnosticCategories( + String resourceGroupName, String siteName, Context context) { + return new PagedIterable<>(listSiteDiagnosticCategoriesAsync(resourceGroupName, siteName, context)); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDiagnosticCategoryWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required 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 + .getSiteDiagnosticCategory( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDiagnosticCategoryWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required 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 + .getSiteDiagnosticCategory( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteDiagnosticCategoryAsync( + String resourceGroupName, String siteName, String diagnosticCategory) { + return getSiteDiagnosticCategoryWithResponseAsync(resourceGroupName, siteName, diagnosticCategory) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticCategoryInner getSiteDiagnosticCategory( + String resourceGroupName, String siteName, String diagnosticCategory) { + return getSiteDiagnosticCategoryAsync(resourceGroupName, siteName, diagnosticCategory).block(); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteDiagnosticCategoryWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + return getSiteDiagnosticCategoryWithResponseAsync(resourceGroupName, siteName, diagnosticCategory, context) + .block(); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteAnalysesSinglePageAsync( + String resourceGroupName, String siteName, String diagnosticCategory) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required 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 + .listSiteAnalyses( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + 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())); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteAnalysesSinglePageAsync( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required 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 + .listSiteAnalyses( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + 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)); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteAnalysesAsync( + String resourceGroupName, String siteName, String diagnosticCategory) { + return new PagedFlux<>( + () -> listSiteAnalysesSinglePageAsync(resourceGroupName, siteName, diagnosticCategory), + nextLink -> listSiteAnalysesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteAnalysesAsync( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + return new PagedFlux<>( + () -> listSiteAnalysesSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, context), + nextLink -> listSiteAnalysesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteAnalyses( + String resourceGroupName, String siteName, String diagnosticCategory) { + return new PagedIterable<>(listSiteAnalysesAsync(resourceGroupName, siteName, diagnosticCategory)); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteAnalyses( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + return new PagedIterable<>(listSiteAnalysesAsync(resourceGroupName, siteName, diagnosticCategory, context)); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteAnalysisWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (analysisName == null) { + return Mono.error(new IllegalArgumentException("Parameter analysisName is required 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 + .getSiteAnalysis( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteAnalysisWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (analysisName == null) { + return Mono.error(new IllegalArgumentException("Parameter analysisName is required 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 + .getSiteAnalysis( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteAnalysisAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + return getSiteAnalysisWithResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AnalysisDefinitionInner getSiteAnalysis( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + return getSiteAnalysisAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).block(); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteAnalysisWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, Context context) { + return getSiteAnalysisWithResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, context) + .block(); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> executeSiteAnalysisWithResponseAsync( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (analysisName == null) { + return Mono.error(new IllegalArgumentException("Parameter analysisName is required 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 + .executeSiteAnalysis( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> executeSiteAnalysisWithResponseAsync( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (analysisName == null) { + return Mono.error(new IllegalArgumentException("Parameter analysisName is required 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 + .executeSiteAnalysis( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeSiteAnalysisAsync( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + return executeSiteAnalysisWithResponseAsync( + resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeSiteAnalysisAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return executeSiteAnalysisWithResponseAsync( + resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticAnalysisInner executeSiteAnalysis( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return executeSiteAnalysisAsync( + resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain) + .block(); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response executeSiteAnalysisWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + return executeSiteAnalysisWithResponseAsync( + resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain, context) + .block(); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorsSinglePageAsync( + String resourceGroupName, String siteName, String diagnosticCategory) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required 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 + .listSiteDetectors( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + 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())); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorsSinglePageAsync( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required 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 + .listSiteDetectors( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + 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)); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDetectorsAsync( + String resourceGroupName, String siteName, String diagnosticCategory) { + return new PagedFlux<>( + () -> listSiteDetectorsSinglePageAsync(resourceGroupName, siteName, diagnosticCategory), + nextLink -> listSiteDetectorsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDetectorsAsync( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + return new PagedFlux<>( + () -> listSiteDetectorsSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, context), + nextLink -> listSiteDetectorsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDetectors( + String resourceGroupName, String siteName, String diagnosticCategory) { + return new PagedIterable<>(listSiteDetectorsAsync(resourceGroupName, siteName, diagnosticCategory)); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDetectors( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + return new PagedIterable<>(listSiteDetectorsAsync(resourceGroupName, siteName, diagnosticCategory, context)); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDetectorWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required 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 + .getSiteDetector( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + detectorName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDetectorWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required 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 + .getSiteDetector( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + detectorName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteDetectorAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName) { + return getSiteDetectorWithResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DetectorDefinitionResourceInner getSiteDetector( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName) { + return getSiteDetectorAsync(resourceGroupName, siteName, diagnosticCategory, detectorName).block(); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteDetectorWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, Context context) { + return getSiteDetectorWithResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, context) + .block(); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> executeSiteDetectorWithResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required 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 + .executeSiteDetector( + this.client.getEndpoint(), + resourceGroupName, + siteName, + detectorName, + diagnosticCategory, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> executeSiteDetectorWithResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required 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 + .executeSiteDetector( + this.client.getEndpoint(), + resourceGroupName, + siteName, + detectorName, + diagnosticCategory, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeSiteDetectorAsync( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + return executeSiteDetectorWithResponseAsync( + resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeSiteDetectorAsync( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return executeSiteDetectorWithResponseAsync( + resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticDetectorResponseInner executeSiteDetector( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return executeSiteDetectorAsync( + resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain) + .block(); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response executeSiteDetectorWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + return executeSiteDetectorWithResponseAsync( + resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain, context) + .block(); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorResponsesSlotSinglePageAsync( + String resourceGroupName, String siteName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteDetectorResponsesSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + slot, + 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())); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorResponsesSlotSinglePageAsync( + String resourceGroupName, String siteName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteDetectorResponsesSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + slot, + 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)); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDetectorResponsesSlotAsync( + String resourceGroupName, String siteName, String slot) { + return new PagedFlux<>( + () -> listSiteDetectorResponsesSlotSinglePageAsync(resourceGroupName, siteName, slot), + nextLink -> listSiteDetectorResponsesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDetectorResponsesSlotAsync( + String resourceGroupName, String siteName, String slot, Context context) { + return new PagedFlux<>( + () -> listSiteDetectorResponsesSlotSinglePageAsync(resourceGroupName, siteName, slot, context), + nextLink -> listSiteDetectorResponsesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDetectorResponsesSlot( + String resourceGroupName, String siteName, String slot) { + return new PagedIterable<>(listSiteDetectorResponsesSlotAsync(resourceGroupName, siteName, slot)); + } + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDetectorResponsesSlot( + String resourceGroupName, String siteName, String slot, Context context) { + return new PagedIterable<>(listSiteDetectorResponsesSlotAsync(resourceGroupName, siteName, slot, context)); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDetectorResponseSlotWithResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteDetectorResponseSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + detectorName, + slot, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDetectorResponseSlotWithResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteDetectorResponseSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + detectorName, + slot, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteDetectorResponseSlotAsync( + String resourceGroupName, + String siteName, + String detectorName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + return getSiteDetectorResponseSlotWithResponseAsync( + resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteDetectorResponseSlotAsync( + String resourceGroupName, String siteName, String detectorName, String slot) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return getSiteDetectorResponseSlotWithResponseAsync( + resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DetectorResponseInner getSiteDetectorResponseSlot( + String resourceGroupName, String siteName, String detectorName, String slot) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return getSiteDetectorResponseSlotAsync( + resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain) + .block(); + } + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteDetectorResponseSlotWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + return getSiteDetectorResponseSlotWithResponseAsync( + resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain, context) + .block(); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDiagnosticCategoriesSlotSinglePageAsync( + String resourceGroupName, String siteName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteDiagnosticCategoriesSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + slot, + 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())); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDiagnosticCategoriesSlotSinglePageAsync( + String resourceGroupName, String siteName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteDiagnosticCategoriesSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + slot, + 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)); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDiagnosticCategoriesSlotAsync( + String resourceGroupName, String siteName, String slot) { + return new PagedFlux<>( + () -> listSiteDiagnosticCategoriesSlotSinglePageAsync(resourceGroupName, siteName, slot), + nextLink -> listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDiagnosticCategoriesSlotAsync( + String resourceGroupName, String siteName, String slot, Context context) { + return new PagedFlux<>( + () -> listSiteDiagnosticCategoriesSlotSinglePageAsync(resourceGroupName, siteName, slot, context), + nextLink -> listSiteDiagnosticCategoriesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDiagnosticCategoriesSlot( + String resourceGroupName, String siteName, String slot) { + return new PagedIterable<>(listSiteDiagnosticCategoriesSlotAsync(resourceGroupName, siteName, slot)); + } + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDiagnosticCategoriesSlot( + String resourceGroupName, String siteName, String slot, Context context) { + return new PagedIterable<>(listSiteDiagnosticCategoriesSlotAsync(resourceGroupName, siteName, slot, context)); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDiagnosticCategorySlotWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteDiagnosticCategorySlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDiagnosticCategorySlotWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteDiagnosticCategorySlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteDiagnosticCategorySlotAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + return getSiteDiagnosticCategorySlotWithResponseAsync(resourceGroupName, siteName, diagnosticCategory, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticCategoryInner getSiteDiagnosticCategorySlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + return getSiteDiagnosticCategorySlotAsync(resourceGroupName, siteName, diagnosticCategory, slot).block(); + } + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteDiagnosticCategorySlotWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + return getSiteDiagnosticCategorySlotWithResponseAsync( + resourceGroupName, siteName, diagnosticCategory, slot, context) + .block(); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteAnalysesSlotSinglePageAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteAnalysesSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + slot, + 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())); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteAnalysesSlotSinglePageAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteAnalysesSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + slot, + 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)); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteAnalysesSlotAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + return new PagedFlux<>( + () -> listSiteAnalysesSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot), + nextLink -> listSiteAnalysesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteAnalysesSlotAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + return new PagedFlux<>( + () -> listSiteAnalysesSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot, context), + nextLink -> listSiteAnalysesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteAnalysesSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + return new PagedIterable<>(listSiteAnalysesSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot)); + } + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteAnalysesSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + return new PagedIterable<>( + listSiteAnalysesSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot, context)); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteAnalysisSlotWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (analysisName == null) { + return Mono.error(new IllegalArgumentException("Parameter analysisName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteAnalysisSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteAnalysisSlotWithResponseAsync( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (analysisName == null) { + return Mono.error(new IllegalArgumentException("Parameter analysisName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteAnalysisSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteAnalysisSlotAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + return getSiteAnalysisSlotWithResponseAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AnalysisDefinitionInner getSiteAnalysisSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + return getSiteAnalysisSlotAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot).block(); + } + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteAnalysisSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + Context context) { + return getSiteAnalysisSlotWithResponseAsync( + resourceGroupName, siteName, diagnosticCategory, analysisName, slot, context) + .block(); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> executeSiteAnalysisSlotWithResponseAsync( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (analysisName == null) { + return Mono.error(new IllegalArgumentException("Parameter analysisName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .executeSiteAnalysisSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + slot, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> executeSiteAnalysisSlotWithResponseAsync( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (analysisName == null) { + return Mono.error(new IllegalArgumentException("Parameter analysisName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .executeSiteAnalysisSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + slot, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeSiteAnalysisSlotAsync( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + return executeSiteAnalysisSlotWithResponseAsync( + resourceGroupName, siteName, diagnosticCategory, analysisName, slot, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeSiteAnalysisSlotAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return executeSiteAnalysisSlotWithResponseAsync( + resourceGroupName, siteName, diagnosticCategory, analysisName, slot, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticAnalysisInner executeSiteAnalysisSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return executeSiteAnalysisSlotAsync( + resourceGroupName, siteName, diagnosticCategory, analysisName, slot, startTime, endTime, timeGrain) + .block(); + } + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response executeSiteAnalysisSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + return executeSiteAnalysisSlotWithResponseAsync( + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + slot, + startTime, + endTime, + timeGrain, + context) + .block(); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorsSlotSinglePageAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteDetectorsSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + slot, + 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())); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorsSlotSinglePageAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteDetectorsSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + slot, + 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)); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDetectorsSlotAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + return new PagedFlux<>( + () -> listSiteDetectorsSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot), + nextLink -> listSiteDetectorsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteDetectorsSlotAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + return new PagedFlux<>( + () -> listSiteDetectorsSlotSinglePageAsync(resourceGroupName, siteName, diagnosticCategory, slot, context), + nextLink -> listSiteDetectorsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDetectorsSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + return new PagedIterable<>(listSiteDetectorsSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot)); + } + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteDetectorsSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + return new PagedIterable<>( + listSiteDetectorsSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot, context)); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDetectorSlotWithResponseAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteDetectorSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + detectorName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteDetectorSlotWithResponseAsync( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String detectorName, + String slot, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteDetectorSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + diagnosticCategory, + detectorName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteDetectorSlotAsync( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot) { + return getSiteDetectorSlotWithResponseAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DetectorDefinitionResourceInner getSiteDetectorSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot) { + return getSiteDetectorSlotAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot).block(); + } + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteDetectorSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String detectorName, + String slot, + Context context) { + return getSiteDetectorSlotWithResponseAsync( + resourceGroupName, siteName, diagnosticCategory, detectorName, slot, context) + .block(); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> executeSiteDetectorSlotWithResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .executeSiteDetectorSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + detectorName, + diagnosticCategory, + slot, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> executeSiteDetectorSlotWithResponseAsync( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + if (diagnosticCategory == null) { + return Mono + .error(new IllegalArgumentException("Parameter diagnosticCategory is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .executeSiteDetectorSlot( + this.client.getEndpoint(), + resourceGroupName, + siteName, + detectorName, + diagnosticCategory, + slot, + startTime, + endTime, + timeGrain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeSiteDetectorSlotAsync( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain) { + return executeSiteDetectorSlotWithResponseAsync( + resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono executeSiteDetectorSlotAsync( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return executeSiteDetectorSlotWithResponseAsync( + resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticDetectorResponseInner executeSiteDetectorSlot( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) { + final OffsetDateTime startTime = null; + final OffsetDateTime endTime = null; + final String timeGrain = null; + return executeSiteDetectorSlotAsync( + resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain) + .block(); + } + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response executeSiteDetectorSlotWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + return executeSiteDetectorSlotWithResponseAsync( + resourceGroupName, + siteName, + detectorName, + diagnosticCategory, + slot, + startTime, + endTime, + timeGrain, + context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostingEnvironmentDetectorResponsesNextSinglePageAsync( + 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 + .listHostingEnvironmentDetectorResponsesNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostingEnvironmentDetectorResponsesNextSinglePageAsync( + 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 + .listHostingEnvironmentDetectorResponsesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorResponsesNextSinglePageAsync(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.listSiteDetectorResponsesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorResponsesNextSinglePageAsync( + 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 + .listSiteDetectorResponsesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDiagnosticCategoriesNextSinglePageAsync( + 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.listSiteDiagnosticCategoriesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDiagnosticCategoriesNextSinglePageAsync( + 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 + .listSiteDiagnosticCategoriesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteAnalysesNextSinglePageAsync(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.listSiteAnalysesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteAnalysesNextSinglePageAsync( + 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 + .listSiteAnalysesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorsNextSinglePageAsync(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.listSiteDetectorsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorsNextSinglePageAsync( + 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 + .listSiteDetectorsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorResponsesSlotNextSinglePageAsync( + 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.listSiteDetectorResponsesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of detector responses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorResponsesSlotNextSinglePageAsync( + 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 + .listSiteDetectorResponsesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDiagnosticCategoriesSlotNextSinglePageAsync( + 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.listSiteDiagnosticCategoriesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Categories. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDiagnosticCategoriesSlotNextSinglePageAsync( + 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 + .listSiteDiagnosticCategoriesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteAnalysesSlotNextSinglePageAsync(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.listSiteAnalysesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Analyses. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteAnalysesSlotNextSinglePageAsync( + 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 + .listSiteAnalysesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorsSlotNextSinglePageAsync( + 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.listSiteDetectorsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Diagnostic Detectors. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteDetectorsSlotNextSinglePageAsync( + 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 + .listSiteDetectorsSlotNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticsImpl.java new file mode 100644 index 0000000000000..108e554c36d5e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DiagnosticsImpl.java @@ -0,0 +1,644 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.DiagnosticsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.AnalysisDefinitionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinitionResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticAnalysisInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticCategoryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticDetectorResponseInner; +import com.azure.resourcemanager.appservice.generated.models.AnalysisDefinition; +import com.azure.resourcemanager.appservice.generated.models.DetectorDefinitionResource; +import com.azure.resourcemanager.appservice.generated.models.DetectorResponse; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticAnalysis; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticCategory; +import com.azure.resourcemanager.appservice.generated.models.DiagnosticDetectorResponse; +import com.azure.resourcemanager.appservice.generated.models.Diagnostics; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.time.OffsetDateTime; + +public final class DiagnosticsImpl implements Diagnostics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticsImpl.class); + + private final DiagnosticsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public DiagnosticsImpl( + DiagnosticsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listHostingEnvironmentDetectorResponses( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listHostingEnvironmentDetectorResponses(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public PagedIterable listHostingEnvironmentDetectorResponses( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listHostingEnvironmentDetectorResponses(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public DetectorResponse getHostingEnvironmentDetectorResponse( + String resourceGroupName, String name, String detectorName) { + DetectorResponseInner inner = + this.serviceClient().getHostingEnvironmentDetectorResponse(resourceGroupName, name, detectorName); + if (inner != null) { + return new DetectorResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getHostingEnvironmentDetectorResponseWithResponse( + String resourceGroupName, + String name, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + Response inner = + this + .serviceClient() + .getHostingEnvironmentDetectorResponseWithResponse( + resourceGroupName, name, detectorName, startTime, endTime, timeGrain, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DetectorResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteDetectorResponses(String resourceGroupName, String siteName) { + PagedIterable inner = + this.serviceClient().listSiteDetectorResponses(resourceGroupName, siteName); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public PagedIterable listSiteDetectorResponses( + String resourceGroupName, String siteName, Context context) { + PagedIterable inner = + this.serviceClient().listSiteDetectorResponses(resourceGroupName, siteName, context); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public DetectorResponse getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName) { + DetectorResponseInner inner = + this.serviceClient().getSiteDetectorResponse(resourceGroupName, siteName, detectorName); + if (inner != null) { + return new DetectorResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteDetectorResponseWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + Response inner = + this + .serviceClient() + .getSiteDetectorResponseWithResponse( + resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DetectorResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteDiagnosticCategories(String resourceGroupName, String siteName) { + PagedIterable inner = + this.serviceClient().listSiteDiagnosticCategories(resourceGroupName, siteName); + return Utils.mapPage(inner, inner1 -> new DiagnosticCategoryImpl(inner1, this.manager())); + } + + public PagedIterable listSiteDiagnosticCategories( + String resourceGroupName, String siteName, Context context) { + PagedIterable inner = + this.serviceClient().listSiteDiagnosticCategories(resourceGroupName, siteName, context); + return Utils.mapPage(inner, inner1 -> new DiagnosticCategoryImpl(inner1, this.manager())); + } + + public DiagnosticCategory getSiteDiagnosticCategory( + String resourceGroupName, String siteName, String diagnosticCategory) { + DiagnosticCategoryInner inner = + this.serviceClient().getSiteDiagnosticCategory(resourceGroupName, siteName, diagnosticCategory); + if (inner != null) { + return new DiagnosticCategoryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteDiagnosticCategoryWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + Response inner = + this + .serviceClient() + .getSiteDiagnosticCategoryWithResponse(resourceGroupName, siteName, diagnosticCategory, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticCategoryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteAnalyses( + String resourceGroupName, String siteName, String diagnosticCategory) { + PagedIterable inner = + this.serviceClient().listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory); + return Utils.mapPage(inner, inner1 -> new AnalysisDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listSiteAnalyses( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + PagedIterable inner = + this.serviceClient().listSiteAnalyses(resourceGroupName, siteName, diagnosticCategory, context); + return Utils.mapPage(inner, inner1 -> new AnalysisDefinitionImpl(inner1, this.manager())); + } + + public AnalysisDefinition getSiteAnalysis( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + AnalysisDefinitionInner inner = + this.serviceClient().getSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName); + if (inner != null) { + return new AnalysisDefinitionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteAnalysisWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, Context context) { + Response inner = + this + .serviceClient() + .getSiteAnalysisWithResponse(resourceGroupName, siteName, diagnosticCategory, analysisName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AnalysisDefinitionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticAnalysis executeSiteAnalysis( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName) { + DiagnosticAnalysisInner inner = + this.serviceClient().executeSiteAnalysis(resourceGroupName, siteName, diagnosticCategory, analysisName); + if (inner != null) { + return new DiagnosticAnalysisImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response executeSiteAnalysisWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + Response inner = + this + .serviceClient() + .executeSiteAnalysisWithResponse( + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + startTime, + endTime, + timeGrain, + context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticAnalysisImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteDetectors( + String resourceGroupName, String siteName, String diagnosticCategory) { + PagedIterable inner = + this.serviceClient().listSiteDetectors(resourceGroupName, siteName, diagnosticCategory); + return Utils.mapPage(inner, inner1 -> new DetectorDefinitionResourceImpl(inner1, this.manager())); + } + + public PagedIterable listSiteDetectors( + String resourceGroupName, String siteName, String diagnosticCategory, Context context) { + PagedIterable inner = + this.serviceClient().listSiteDetectors(resourceGroupName, siteName, diagnosticCategory, context); + return Utils.mapPage(inner, inner1 -> new DetectorDefinitionResourceImpl(inner1, this.manager())); + } + + public DetectorDefinitionResource getSiteDetector( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName) { + DetectorDefinitionResourceInner inner = + this.serviceClient().getSiteDetector(resourceGroupName, siteName, diagnosticCategory, detectorName); + if (inner != null) { + return new DetectorDefinitionResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteDetectorWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, Context context) { + Response inner = + this + .serviceClient() + .getSiteDetectorWithResponse(resourceGroupName, siteName, diagnosticCategory, detectorName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DetectorDefinitionResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticDetectorResponse executeSiteDetector( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory) { + DiagnosticDetectorResponseInner inner = + this.serviceClient().executeSiteDetector(resourceGroupName, siteName, detectorName, diagnosticCategory); + if (inner != null) { + return new DiagnosticDetectorResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response executeSiteDetectorWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + Response inner = + this + .serviceClient() + .executeSiteDetectorWithResponse( + resourceGroupName, + siteName, + detectorName, + diagnosticCategory, + startTime, + endTime, + timeGrain, + context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticDetectorResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteDetectorResponsesSlot( + String resourceGroupName, String siteName, String slot) { + PagedIterable inner = + this.serviceClient().listSiteDetectorResponsesSlot(resourceGroupName, siteName, slot); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public PagedIterable listSiteDetectorResponsesSlot( + String resourceGroupName, String siteName, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listSiteDetectorResponsesSlot(resourceGroupName, siteName, slot, context); + return Utils.mapPage(inner, inner1 -> new DetectorResponseImpl(inner1, this.manager())); + } + + public DetectorResponse getSiteDetectorResponseSlot( + String resourceGroupName, String siteName, String detectorName, String slot) { + DetectorResponseInner inner = + this.serviceClient().getSiteDetectorResponseSlot(resourceGroupName, siteName, detectorName, slot); + if (inner != null) { + return new DetectorResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteDetectorResponseSlotWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + Response inner = + this + .serviceClient() + .getSiteDetectorResponseSlotWithResponse( + resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DetectorResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteDiagnosticCategoriesSlot( + String resourceGroupName, String siteName, String slot) { + PagedIterable inner = + this.serviceClient().listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot); + return Utils.mapPage(inner, inner1 -> new DiagnosticCategoryImpl(inner1, this.manager())); + } + + public PagedIterable listSiteDiagnosticCategoriesSlot( + String resourceGroupName, String siteName, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, context); + return Utils.mapPage(inner, inner1 -> new DiagnosticCategoryImpl(inner1, this.manager())); + } + + public DiagnosticCategory getSiteDiagnosticCategorySlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + DiagnosticCategoryInner inner = + this.serviceClient().getSiteDiagnosticCategorySlot(resourceGroupName, siteName, diagnosticCategory, slot); + if (inner != null) { + return new DiagnosticCategoryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteDiagnosticCategorySlotWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + Response inner = + this + .serviceClient() + .getSiteDiagnosticCategorySlotWithResponse( + resourceGroupName, siteName, diagnosticCategory, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticCategoryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteAnalysesSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + PagedIterable inner = + this.serviceClient().listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, slot); + return Utils.mapPage(inner, inner1 -> new AnalysisDefinitionImpl(inner1, this.manager())); + } + + public PagedIterable listSiteAnalysesSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listSiteAnalysesSlot(resourceGroupName, siteName, diagnosticCategory, slot, context); + return Utils.mapPage(inner, inner1 -> new AnalysisDefinitionImpl(inner1, this.manager())); + } + + public AnalysisDefinition getSiteAnalysisSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + AnalysisDefinitionInner inner = + this + .serviceClient() + .getSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot); + if (inner != null) { + return new AnalysisDefinitionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteAnalysisSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + Context context) { + Response inner = + this + .serviceClient() + .getSiteAnalysisSlotWithResponse( + resourceGroupName, siteName, diagnosticCategory, analysisName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AnalysisDefinitionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticAnalysis executeSiteAnalysisSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot) { + DiagnosticAnalysisInner inner = + this + .serviceClient() + .executeSiteAnalysisSlot(resourceGroupName, siteName, diagnosticCategory, analysisName, slot); + if (inner != null) { + return new DiagnosticAnalysisImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response executeSiteAnalysisSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + Response inner = + this + .serviceClient() + .executeSiteAnalysisSlotWithResponse( + resourceGroupName, + siteName, + diagnosticCategory, + analysisName, + slot, + startTime, + endTime, + timeGrain, + context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticAnalysisImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteDetectorsSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot) { + PagedIterable inner = + this.serviceClient().listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, slot); + return Utils.mapPage(inner, inner1 -> new DetectorDefinitionResourceImpl(inner1, this.manager())); + } + + public PagedIterable listSiteDetectorsSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listSiteDetectorsSlot(resourceGroupName, siteName, diagnosticCategory, slot, context); + return Utils.mapPage(inner, inner1 -> new DetectorDefinitionResourceImpl(inner1, this.manager())); + } + + public DetectorDefinitionResource getSiteDetectorSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot) { + DetectorDefinitionResourceInner inner = + this + .serviceClient() + .getSiteDetectorSlot(resourceGroupName, siteName, diagnosticCategory, detectorName, slot); + if (inner != null) { + return new DetectorDefinitionResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteDetectorSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String detectorName, + String slot, + Context context) { + Response inner = + this + .serviceClient() + .getSiteDetectorSlotWithResponse( + resourceGroupName, siteName, diagnosticCategory, detectorName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DetectorDefinitionResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticDetectorResponse executeSiteDetectorSlot( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot) { + DiagnosticDetectorResponseInner inner = + this + .serviceClient() + .executeSiteDetectorSlot(resourceGroupName, siteName, detectorName, diagnosticCategory, slot); + if (inner != null) { + return new DiagnosticDetectorResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response executeSiteDetectorSlotWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context) { + Response inner = + this + .serviceClient() + .executeSiteDetectorSlotWithResponse( + resourceGroupName, + siteName, + detectorName, + diagnosticCategory, + slot, + startTime, + endTime, + timeGrain, + context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DiagnosticDetectorResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private DiagnosticsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainAvailabilityCheckResultImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainAvailabilityCheckResultImpl.java new file mode 100644 index 0000000000000..cec1f4987ed13 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainAvailabilityCheckResultImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainAvailabilityCheckResultInner; +import com.azure.resourcemanager.appservice.generated.models.DomainAvailabilityCheckResult; +import com.azure.resourcemanager.appservice.generated.models.DomainType; + +public final class DomainAvailabilityCheckResultImpl implements DomainAvailabilityCheckResult { + private DomainAvailabilityCheckResultInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DomainAvailabilityCheckResultImpl( + DomainAvailabilityCheckResultInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Boolean available() { + return this.innerModel().available(); + } + + public DomainType domainType() { + return this.innerModel().domainType(); + } + + public DomainAvailabilityCheckResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainControlCenterSsoRequestImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainControlCenterSsoRequestImpl.java new file mode 100644 index 0000000000000..acc479e23dfd2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainControlCenterSsoRequestImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainControlCenterSsoRequestInner; +import com.azure.resourcemanager.appservice.generated.models.DomainControlCenterSsoRequest; + +public final class DomainControlCenterSsoRequestImpl implements DomainControlCenterSsoRequest { + private DomainControlCenterSsoRequestInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + DomainControlCenterSsoRequestImpl( + DomainControlCenterSsoRequestInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String url() { + return this.innerModel().url(); + } + + public String postParameterKey() { + return this.innerModel().postParameterKey(); + } + + public String postParameterValue() { + return this.innerModel().postParameterValue(); + } + + public DomainControlCenterSsoRequestInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainImpl.java new file mode 100644 index 0000000000000..1e2680d037ffe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainImpl.java @@ -0,0 +1,374 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainInner; +import com.azure.resourcemanager.appservice.generated.models.Contact; +import com.azure.resourcemanager.appservice.generated.models.DnsType; +import com.azure.resourcemanager.appservice.generated.models.Domain; +import com.azure.resourcemanager.appservice.generated.models.DomainPatchResource; +import com.azure.resourcemanager.appservice.generated.models.DomainPropertiesDomainNotRenewableReasonsItem; +import com.azure.resourcemanager.appservice.generated.models.DomainPurchaseConsent; +import com.azure.resourcemanager.appservice.generated.models.DomainStatus; +import com.azure.resourcemanager.appservice.generated.models.Hostname; +import com.azure.resourcemanager.appservice.generated.models.ProvisioningState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class DomainImpl implements Domain, Domain.Definition, Domain.Update { + private DomainInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public Contact contactAdmin() { + return this.innerModel().contactAdmin(); + } + + public Contact contactBilling() { + return this.innerModel().contactBilling(); + } + + public Contact contactRegistrant() { + return this.innerModel().contactRegistrant(); + } + + public Contact contactTech() { + return this.innerModel().contactTech(); + } + + public DomainStatus registrationStatus() { + return this.innerModel().registrationStatus(); + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List nameServers() { + List inner = this.innerModel().nameServers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean privacy() { + return this.innerModel().privacy(); + } + + public OffsetDateTime createdTime() { + return this.innerModel().createdTime(); + } + + public OffsetDateTime expirationTime() { + return this.innerModel().expirationTime(); + } + + public OffsetDateTime lastRenewedTime() { + return this.innerModel().lastRenewedTime(); + } + + public Boolean autoRenew() { + return this.innerModel().autoRenew(); + } + + public Boolean readyForDnsRecordManagement() { + return this.innerModel().readyForDnsRecordManagement(); + } + + public List managedHostNames() { + List inner = this.innerModel().managedHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DomainPurchaseConsent consent() { + return this.innerModel().consent(); + } + + public List domainNotRenewableReasons() { + List inner = this.innerModel().domainNotRenewableReasons(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DnsType dnsType() { + return this.innerModel().dnsType(); + } + + public String dnsZoneId() { + return this.innerModel().dnsZoneId(); + } + + public DnsType targetDnsType() { + return this.innerModel().targetDnsType(); + } + + public String authCode() { + return this.innerModel().authCode(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public DomainInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String domainName; + + private DomainPatchResource updateDomain; + + public DomainImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Domain create() { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .createOrUpdate(resourceGroupName, domainName, this.innerModel(), Context.NONE); + return this; + } + + public Domain create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .createOrUpdate(resourceGroupName, domainName, this.innerModel(), context); + return this; + } + + DomainImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new DomainInner(); + this.serviceManager = serviceManager; + this.domainName = name; + } + + public DomainImpl update() { + this.updateDomain = new DomainPatchResource(); + return this; + } + + public Domain apply() { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .updateWithResponse(resourceGroupName, domainName, updateDomain, Context.NONE) + .getValue(); + return this; + } + + public Domain apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .updateWithResponse(resourceGroupName, domainName, updateDomain, context) + .getValue(); + return this; + } + + DomainImpl( + DomainInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.domainName = Utils.getValueFromIdByName(innerObject.id(), "domains"); + } + + public Domain refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .getByResourceGroupWithResponse(resourceGroupName, domainName, Context.NONE) + .getValue(); + return this; + } + + public Domain refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .getByResourceGroupWithResponse(resourceGroupName, domainName, context) + .getValue(); + return this; + } + + public void renew() { + serviceManager.domains().renew(resourceGroupName, domainName); + } + + public Response renewWithResponse(Context context) { + return serviceManager.domains().renewWithResponse(resourceGroupName, domainName, context); + } + + public DomainImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public DomainImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public DomainImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public DomainImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateDomain.withKind(kind); + return this; + } + } + + public DomainImpl withContactAdmin(Contact contactAdmin) { + this.innerModel().withContactAdmin(contactAdmin); + return this; + } + + public DomainImpl withContactBilling(Contact contactBilling) { + this.innerModel().withContactBilling(contactBilling); + return this; + } + + public DomainImpl withContactRegistrant(Contact contactRegistrant) { + this.innerModel().withContactRegistrant(contactRegistrant); + return this; + } + + public DomainImpl withContactTech(Contact contactTech) { + this.innerModel().withContactTech(contactTech); + return this; + } + + public DomainImpl withPrivacy(Boolean privacy) { + if (isInCreateMode()) { + this.innerModel().withPrivacy(privacy); + return this; + } else { + this.updateDomain.withPrivacy(privacy); + return this; + } + } + + public DomainImpl withAutoRenew(Boolean autoRenew) { + if (isInCreateMode()) { + this.innerModel().withAutoRenew(autoRenew); + return this; + } else { + this.updateDomain.withAutoRenew(autoRenew); + return this; + } + } + + public DomainImpl withConsent(DomainPurchaseConsent consent) { + this.innerModel().withConsent(consent); + return this; + } + + public DomainImpl withDnsType(DnsType dnsType) { + if (isInCreateMode()) { + this.innerModel().withDnsType(dnsType); + return this; + } else { + this.updateDomain.withDnsType(dnsType); + return this; + } + } + + public DomainImpl withDnsZoneId(String dnsZoneId) { + if (isInCreateMode()) { + this.innerModel().withDnsZoneId(dnsZoneId); + return this; + } else { + this.updateDomain.withDnsZoneId(dnsZoneId); + return this; + } + } + + public DomainImpl withTargetDnsType(DnsType targetDnsType) { + if (isInCreateMode()) { + this.innerModel().withTargetDnsType(targetDnsType); + return this; + } else { + this.updateDomain.withTargetDnsType(targetDnsType); + return this; + } + } + + public DomainImpl withAuthCode(String authCode) { + this.innerModel().withAuthCode(authCode); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainOwnershipIdentifierImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainOwnershipIdentifierImpl.java new file mode 100644 index 0000000000000..5f1b726703fc8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainOwnershipIdentifierImpl.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.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainOwnershipIdentifierInner; +import com.azure.resourcemanager.appservice.generated.models.DomainOwnershipIdentifier; + +public final class DomainOwnershipIdentifierImpl + implements DomainOwnershipIdentifier, DomainOwnershipIdentifier.Definition, DomainOwnershipIdentifier.Update { + private DomainOwnershipIdentifierInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String ownershipId() { + return this.innerModel().ownershipId(); + } + + public DomainOwnershipIdentifierInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String domainName; + + private String name; + + public DomainOwnershipIdentifierImpl withExistingDomain(String resourceGroupName, String domainName) { + this.resourceGroupName = resourceGroupName; + this.domainName = domainName; + return this; + } + + public DomainOwnershipIdentifier create() { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .createOrUpdateOwnershipIdentifierWithResponse( + resourceGroupName, domainName, name, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public DomainOwnershipIdentifier create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .createOrUpdateOwnershipIdentifierWithResponse( + resourceGroupName, domainName, name, this.innerModel(), context) + .getValue(); + return this; + } + + DomainOwnershipIdentifierImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new DomainOwnershipIdentifierInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public DomainOwnershipIdentifierImpl update() { + return this; + } + + public DomainOwnershipIdentifier apply() { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .updateOwnershipIdentifierWithResponse( + resourceGroupName, domainName, name, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public DomainOwnershipIdentifier apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .updateOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, this.innerModel(), context) + .getValue(); + return this; + } + + DomainOwnershipIdentifierImpl( + DomainOwnershipIdentifierInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.domainName = Utils.getValueFromIdByName(innerObject.id(), "domains"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "domainOwnershipIdentifiers"); + } + + public DomainOwnershipIdentifier refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .getOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, Context.NONE) + .getValue(); + return this; + } + + public DomainOwnershipIdentifier refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getDomains() + .getOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, context) + .getValue(); + return this; + } + + public DomainOwnershipIdentifierImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public DomainOwnershipIdentifierImpl withOwnershipId(String ownershipId) { + this.innerModel().withOwnershipId(ownershipId); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainRegistrationProvidersClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainRegistrationProvidersClientImpl.java new file mode 100644 index 0000000000000..8de689bdda7bf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainRegistrationProvidersClientImpl.java @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.DomainRegistrationProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationCollection; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in DomainRegistrationProvidersClient. */ +public final class DomainRegistrationProvidersClientImpl implements DomainRegistrationProvidersClient { + private final ClientLogger logger = new ClientLogger(DomainRegistrationProvidersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final DomainRegistrationProvidersService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of DomainRegistrationProvidersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DomainRegistrationProvidersClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy + .create( + DomainRegistrationProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientDomainRegistrationProviders to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface DomainRegistrationProvidersService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.DomainRegistration/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listOperations( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listOperationsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsSinglePageAsync() { + 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.listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsSinglePageAsync(Context context) { + 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 + .listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOperationsAsync() { + return new PagedFlux<>( + () -> listOperationsSinglePageAsync(), nextLink -> listOperationsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOperationsAsync(Context context) { + return new PagedFlux<>( + () -> listOperationsSinglePageAsync(context), + nextLink -> listOperationsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperations() { + return new PagedIterable<>(listOperationsAsync()); + } + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperations(Context context) { + return new PagedIterable<>(listOperationsAsync(context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsNextSinglePageAsync(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.listOperationsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsNextSinglePageAsync( + 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 + .listOperationsNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainRegistrationProvidersImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainRegistrationProvidersImpl.java new file mode 100644 index 0000000000000..2779924fff193 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainRegistrationProvidersImpl.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.appservice.generated.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.appservice.generated.fluent.DomainRegistrationProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationDescription; +import com.azure.resourcemanager.appservice.generated.models.DomainRegistrationProviders; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class DomainRegistrationProvidersImpl implements DomainRegistrationProviders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainRegistrationProvidersImpl.class); + + private final DomainRegistrationProvidersClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public DomainRegistrationProvidersImpl( + DomainRegistrationProvidersClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listOperations() { + PagedIterable inner = this.serviceClient().listOperations(); + return Utils.mapPage(inner, inner1 -> new CsmOperationDescriptionImpl(inner1, this.manager())); + } + + public PagedIterable listOperations(Context context) { + PagedIterable inner = this.serviceClient().listOperations(context); + return Utils.mapPage(inner, inner1 -> new CsmOperationDescriptionImpl(inner1, this.manager())); + } + + private DomainRegistrationProvidersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainsClientImpl.java new file mode 100644 index 0000000000000..08a071f47cb63 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainsClientImpl.java @@ -0,0 +1,3322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.DomainsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainAvailabilityCheckResultInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainControlCenterSsoRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainOwnershipIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.DomainCollection; +import com.azure.resourcemanager.appservice.generated.models.DomainOwnershipIdentifierCollection; +import com.azure.resourcemanager.appservice.generated.models.DomainPatchResource; +import com.azure.resourcemanager.appservice.generated.models.DomainRecommendationSearchParameters; +import com.azure.resourcemanager.appservice.generated.models.NameIdentifierCollection; +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 DomainsClient. */ +public final class DomainsClientImpl implements DomainsClient { + private final ClientLogger logger = new ClientLogger(DomainsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final DomainsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of DomainsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DomainsClientImpl(WebSiteManagementClientImpl client) { + this.service = RestProxy.create(DomainsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientDomains to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface DomainsService { + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> checkAvailability( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") NameIdentifierInner identifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains") + @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"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getControlCenterSsoRequest( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listRecommendations( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DomainRecommendationSearchParameters parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.DomainRegistration" + + "/domains/{domainName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DomainInner domain, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @QueryParam("forceHardDeleteDomain") Boolean forceHardDeleteDomain, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DomainPatchResource domain, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}/domainOwnershipIdentifiers") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listOwnershipIdentifiers( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @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.DomainRegistration" + + "/domains/{domainName}/domainOwnershipIdentifiers/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getOwnershipIdentifier( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}/domainOwnershipIdentifiers/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateOwnershipIdentifier( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DomainOwnershipIdentifierInner domainOwnershipIdentifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}/domainOwnershipIdentifiers/{name}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteOwnershipIdentifier( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}/domainOwnershipIdentifiers/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateOwnershipIdentifier( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DomainOwnershipIdentifierInner domainOwnershipIdentifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}/renew") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> renew( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration" + + "/domains/{domainName}/transferOut") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> transferOut( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listRecommendationsNext( + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listOwnershipIdentifiersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkAvailabilityWithResponseAsync( + NameIdentifierInner identifier) { + 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 (identifier == null) { + return Mono.error(new IllegalArgumentException("Parameter identifier is required and cannot be null.")); + } else { + identifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + identifier, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkAvailabilityWithResponseAsync( + NameIdentifierInner identifier, 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 (identifier == null) { + return Mono.error(new IllegalArgumentException("Parameter identifier is required and cannot be null.")); + } else { + identifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + identifier, + accept, + context); + } + + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkAvailabilityAsync(NameIdentifierInner identifier) { + return checkAvailabilityWithResponseAsync(identifier) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainAvailabilityCheckResultInner checkAvailability(NameIdentifierInner identifier) { + return checkAvailabilityAsync(identifier).block(); + } + + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkAvailabilityWithResponse( + NameIdentifierInner identifier, Context context) { + return checkAvailabilityWithResponseAsync(identifier, context).block(); + } + + /** + * Description for Get all domains in 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 collection of domains. + */ + @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())); + } + + /** + * Description for Get all domains in 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 collection of domains. + */ + @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)); + } + + /** + * Description for Get all domains in 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 collection of domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all domains in 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 collection of domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all domains in 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 collection of domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for Get all domains in 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 collection of domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getControlCenterSsoRequestWithResponseAsync() { + 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 + .getControlCenterSsoRequest( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getControlCenterSsoRequestWithResponseAsync( + 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 + .getControlCenterSsoRequest( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getControlCenterSsoRequestAsync() { + return getControlCenterSsoRequestWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainControlCenterSsoRequestInner getControlCenterSsoRequest() { + return getControlCenterSsoRequestAsync().block(); + } + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getControlCenterSsoRequestWithResponse(Context context) { + return getControlCenterSsoRequestWithResponseAsync(context).block(); + } + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendationsSinglePageAsync( + DomainRecommendationSearchParameters parameters) { + 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listRecommendations( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + parameters, + 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())); + } + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendationsSinglePageAsync( + DomainRecommendationSearchParameters parameters, 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listRecommendations( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + parameters, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendationsAsync(DomainRecommendationSearchParameters parameters) { + return new PagedFlux<>( + () -> listRecommendationsSinglePageAsync(parameters), + nextLink -> listRecommendationsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendationsAsync( + DomainRecommendationSearchParameters parameters, Context context) { + return new PagedFlux<>( + () -> listRecommendationsSinglePageAsync(parameters, context), + nextLink -> listRecommendationsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendations(DomainRecommendationSearchParameters parameters) { + return new PagedIterable<>(listRecommendationsAsync(parameters)); + } + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendations( + DomainRecommendationSearchParameters parameters, Context context) { + return new PagedIterable<>(listRecommendationsAsync(parameters, context)); + } + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domains. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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())); + } + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domains. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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)); + } + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String domainName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String domainName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String domainName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, domainName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainInner getByResourceGroup(String resourceGroupName, String domainName) { + return getByResourceGroupAsync(resourceGroupName, domainName).block(); + } + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String domainName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, domainName, context).block(); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String domainName, DomainInner domain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 (domain == null) { + return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); + } else { + domain.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domain, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String domainName, DomainInner domain, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 (domain == null) { + return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); + } else { + domain.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domain, + accept, + context); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DomainInner> beginCreateOrUpdateAsync( + String resourceGroupName, String domainName, DomainInner domain) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, domainName, domain); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DomainInner.class, DomainInner.class, this.client.getContext()); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DomainInner> beginCreateOrUpdateAsync( + String resourceGroupName, String domainName, DomainInner domain, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, domainName, domain, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), DomainInner.class, DomainInner.class, context); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DomainInner> beginCreateOrUpdate( + String resourceGroupName, String domainName, DomainInner domain) { + return beginCreateOrUpdateAsync(resourceGroupName, domainName, domain).getSyncPoller(); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DomainInner> beginCreateOrUpdate( + String resourceGroupName, String domainName, DomainInner domain, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, domainName, domain, context).getSyncPoller(); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String domainName, DomainInner domain) { + return beginCreateOrUpdateAsync(resourceGroupName, domainName, domain) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String domainName, DomainInner domain, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, domainName, domain, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainInner createOrUpdate(String resourceGroupName, String domainName, DomainInner domain) { + return createOrUpdateAsync(resourceGroupName, domainName, domain).block(); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainInner createOrUpdate( + String resourceGroupName, String domainName, DomainInner domain, Context context) { + return createOrUpdateAsync(resourceGroupName, domainName, domain, context).block(); + } + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default + * is <code>false</code> which deletes the domain after 24 hours. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + domainName, + forceHardDeleteDomain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default + * is <code>false</code> which deletes the domain after 24 hours. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String domainName, Boolean forceHardDeleteDomain, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + domainName, + forceHardDeleteDomain, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default + * is <code>false</code> which deletes the domain after 24 hours. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { + return deleteWithResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String domainName) { + final Boolean forceHardDeleteDomain = null; + return deleteWithResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 domainName) { + final Boolean forceHardDeleteDomain = null; + deleteAsync(resourceGroupName, domainName, forceHardDeleteDomain).block(); + } + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default + * is <code>false</code> which deletes the domain after 24 hours. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String domainName, Boolean forceHardDeleteDomain, Context context) { + return deleteWithResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain, context).block(); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String domainName, DomainPatchResource domain) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 (domain == null) { + return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); + } else { + domain.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domain, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String domainName, DomainPatchResource domain, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 (domain == null) { + return Mono.error(new IllegalArgumentException("Parameter domain is required and cannot be null.")); + } else { + domain.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domain, + accept, + context); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String domainName, DomainPatchResource domain) { + return updateWithResponseAsync(resourceGroupName, domainName, domain) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainInner update(String resourceGroupName, String domainName, DomainPatchResource domain) { + return updateAsync(resourceGroupName, domainName, domain).block(); + } + + /** + * Description for Creates or updates a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param domain Domain registration information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String domainName, DomainPatchResource domain, Context context) { + return updateWithResponseAsync(resourceGroupName, domainName, domain, context).block(); + } + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOwnershipIdentifiersSinglePageAsync( + String resourceGroupName, String domainName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .listOwnershipIdentifiers( + this.client.getEndpoint(), + resourceGroupName, + domainName, + 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())); + } + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOwnershipIdentifiersSinglePageAsync( + String resourceGroupName, String domainName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .listOwnershipIdentifiers( + this.client.getEndpoint(), + resourceGroupName, + domainName, + 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)); + } + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOwnershipIdentifiersAsync( + String resourceGroupName, String domainName) { + return new PagedFlux<>( + () -> listOwnershipIdentifiersSinglePageAsync(resourceGroupName, domainName), + nextLink -> listOwnershipIdentifiersNextSinglePageAsync(nextLink)); + } + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOwnershipIdentifiersAsync( + String resourceGroupName, String domainName, Context context) { + return new PagedFlux<>( + () -> listOwnershipIdentifiersSinglePageAsync(resourceGroupName, domainName, context), + nextLink -> listOwnershipIdentifiersNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOwnershipIdentifiers( + String resourceGroupName, String domainName) { + return new PagedIterable<>(listOwnershipIdentifiersAsync(resourceGroupName, domainName)); + } + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOwnershipIdentifiers( + String resourceGroupName, String domainName, Context context) { + return new PagedIterable<>(listOwnershipIdentifiersAsync(resourceGroupName, domainName, context)); + } + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getOwnershipIdentifierWithResponseAsync( + String resourceGroupName, String domainName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + domainName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getOwnershipIdentifierWithResponseAsync( + String resourceGroupName, String domainName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + domainName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getOwnershipIdentifierAsync( + String resourceGroupName, String domainName, String name) { + return getOwnershipIdentifierWithResponseAsync(resourceGroupName, domainName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainOwnershipIdentifierInner getOwnershipIdentifier( + String resourceGroupName, String domainName, String name) { + return getOwnershipIdentifierAsync(resourceGroupName, domainName, name).block(); + } + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOwnershipIdentifierWithResponse( + String resourceGroupName, String domainName, String name, Context context) { + return getOwnershipIdentifierWithResponseAsync(resourceGroupName, domainName, name, context).block(); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateOwnershipIdentifierWithResponseAsync( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + domainName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateOwnershipIdentifierWithResponseAsync( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + domainName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateOwnershipIdentifierAsync( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + return createOrUpdateOwnershipIdentifierWithResponseAsync( + resourceGroupName, domainName, name, domainOwnershipIdentifier) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainOwnershipIdentifierInner createOrUpdateOwnershipIdentifier( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + return createOrUpdateOwnershipIdentifierAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier) + .block(); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateOwnershipIdentifierWithResponse( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier, + Context context) { + return createOrUpdateOwnershipIdentifierWithResponseAsync( + resourceGroupName, domainName, name, domainOwnershipIdentifier, context) + .block(); + } + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteOwnershipIdentifierWithResponseAsync( + String resourceGroupName, String domainName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + domainName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteOwnershipIdentifierWithResponseAsync( + String resourceGroupName, String domainName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + domainName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteOwnershipIdentifierAsync(String resourceGroupName, String domainName, String name) { + return deleteOwnershipIdentifierWithResponseAsync(resourceGroupName, domainName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteOwnershipIdentifier(String resourceGroupName, String domainName, String name) { + deleteOwnershipIdentifierAsync(resourceGroupName, domainName, name).block(); + } + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteOwnershipIdentifierWithResponse( + String resourceGroupName, String domainName, String name, Context context) { + return deleteOwnershipIdentifierWithResponseAsync(resourceGroupName, domainName, name, context).block(); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateOwnershipIdentifierWithResponseAsync( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + domainName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateOwnershipIdentifierWithResponseAsync( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + domainName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateOwnershipIdentifierAsync( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + return updateOwnershipIdentifierWithResponseAsync( + resourceGroupName, domainName, name, domainOwnershipIdentifier) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainOwnershipIdentifierInner updateOwnershipIdentifier( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier) { + return updateOwnershipIdentifierAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier).block(); + } + + /** + * Description for Creates an ownership identifier for a domain or updates identifier details for an existing + * identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateOwnershipIdentifierWithResponse( + String resourceGroupName, + String domainName, + String name, + DomainOwnershipIdentifierInner domainOwnershipIdentifier, + Context context) { + return updateOwnershipIdentifierWithResponseAsync( + resourceGroupName, domainName, name, domainOwnershipIdentifier, context) + .block(); + } + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> renewWithResponseAsync(String resourceGroupName, String domainName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .renew( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> renewWithResponseAsync(String resourceGroupName, String domainName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .renew( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono renewAsync(String resourceGroupName, String domainName) { + return renewWithResponseAsync(resourceGroupName, domainName).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 renew(String resourceGroupName, String domainName) { + renewAsync(resourceGroupName, domainName).block(); + } + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response renewWithResponse(String resourceGroupName, String domainName, Context context) { + return renewWithResponseAsync(resourceGroupName, domainName, context).block(); + } + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> transferOutWithResponseAsync(String resourceGroupName, String domainName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .transferOut( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> transferOutWithResponseAsync( + String resourceGroupName, String domainName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .transferOut( + this.client.getEndpoint(), + resourceGroupName, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono transferOutAsync(String resourceGroupName, String domainName) { + return transferOutWithResponseAsync(resourceGroupName, domainName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DomainInner transferOut(String resourceGroupName, String domainName) { + return transferOutAsync(resourceGroupName, domainName).block(); + } + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response transferOutWithResponse(String resourceGroupName, String domainName, Context context) { + return transferOutWithResponseAsync(resourceGroupName, domainName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of domains. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendationsNextSinglePageAsync(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.listRecommendationsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of domain name identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendationsNextSinglePageAsync( + 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 + .listRecommendationsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of domains. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOwnershipIdentifiersNextSinglePageAsync( + 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.listOwnershipIdentifiersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of domain ownership identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOwnershipIdentifiersNextSinglePageAsync( + 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 + .listOwnershipIdentifiersNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainsImpl.java new file mode 100644 index 0000000000000..98d9943820e0e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/DomainsImpl.java @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.DomainsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainAvailabilityCheckResultInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainControlCenterSsoRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainOwnershipIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.models.Domain; +import com.azure.resourcemanager.appservice.generated.models.DomainAvailabilityCheckResult; +import com.azure.resourcemanager.appservice.generated.models.DomainControlCenterSsoRequest; +import com.azure.resourcemanager.appservice.generated.models.DomainOwnershipIdentifier; +import com.azure.resourcemanager.appservice.generated.models.DomainRecommendationSearchParameters; +import com.azure.resourcemanager.appservice.generated.models.Domains; +import com.azure.resourcemanager.appservice.generated.models.NameIdentifier; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class DomainsImpl implements Domains { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainsImpl.class); + + private final DomainsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public DomainsImpl( + DomainsClient innerClient, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public DomainAvailabilityCheckResult checkAvailability(NameIdentifierInner identifier) { + DomainAvailabilityCheckResultInner inner = this.serviceClient().checkAvailability(identifier); + if (inner != null) { + return new DomainAvailabilityCheckResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkAvailabilityWithResponse( + NameIdentifierInner identifier, Context context) { + Response inner = + this.serviceClient().checkAvailabilityWithResponse(identifier, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DomainAvailabilityCheckResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); + } + + public DomainControlCenterSsoRequest getControlCenterSsoRequest() { + DomainControlCenterSsoRequestInner inner = this.serviceClient().getControlCenterSsoRequest(); + if (inner != null) { + return new DomainControlCenterSsoRequestImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getControlCenterSsoRequestWithResponse(Context context) { + Response inner = + this.serviceClient().getControlCenterSsoRequestWithResponse(context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DomainControlCenterSsoRequestImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listRecommendations(DomainRecommendationSearchParameters parameters) { + PagedIterable inner = this.serviceClient().listRecommendations(parameters); + return Utils.mapPage(inner, inner1 -> new NameIdentifierImpl(inner1, this.manager())); + } + + public PagedIterable listRecommendations( + DomainRecommendationSearchParameters parameters, Context context) { + PagedIterable inner = this.serviceClient().listRecommendations(parameters, context); + return Utils.mapPage(inner, inner1 -> new NameIdentifierImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new DomainImpl(inner1, this.manager())); + } + + public Domain getByResourceGroup(String resourceGroupName, String domainName) { + DomainInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, domainName); + if (inner != null) { + return new DomainImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String domainName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, domainName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DomainImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String domainName) { + this.serviceClient().delete(resourceGroupName, domainName); + } + + public Response deleteWithResponse( + String resourceGroupName, String domainName, Boolean forceHardDeleteDomain, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, domainName, forceHardDeleteDomain, context); + } + + public PagedIterable listOwnershipIdentifiers( + String resourceGroupName, String domainName) { + PagedIterable inner = + this.serviceClient().listOwnershipIdentifiers(resourceGroupName, domainName); + return Utils.mapPage(inner, inner1 -> new DomainOwnershipIdentifierImpl(inner1, this.manager())); + } + + public PagedIterable listOwnershipIdentifiers( + String resourceGroupName, String domainName, Context context) { + PagedIterable inner = + this.serviceClient().listOwnershipIdentifiers(resourceGroupName, domainName, context); + return Utils.mapPage(inner, inner1 -> new DomainOwnershipIdentifierImpl(inner1, this.manager())); + } + + public DomainOwnershipIdentifier getOwnershipIdentifier(String resourceGroupName, String domainName, String name) { + DomainOwnershipIdentifierInner inner = + this.serviceClient().getOwnershipIdentifier(resourceGroupName, domainName, name); + if (inner != null) { + return new DomainOwnershipIdentifierImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getOwnershipIdentifierWithResponse( + String resourceGroupName, String domainName, String name, Context context) { + Response inner = + this.serviceClient().getOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DomainOwnershipIdentifierImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteOwnershipIdentifier(String resourceGroupName, String domainName, String name) { + this.serviceClient().deleteOwnershipIdentifier(resourceGroupName, domainName, name); + } + + public Response deleteOwnershipIdentifierWithResponse( + String resourceGroupName, String domainName, String name, Context context) { + return this.serviceClient().deleteOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, context); + } + + public void renew(String resourceGroupName, String domainName) { + this.serviceClient().renew(resourceGroupName, domainName); + } + + public Response renewWithResponse(String resourceGroupName, String domainName, Context context) { + return this.serviceClient().renewWithResponse(resourceGroupName, domainName, context); + } + + public Domain transferOut(String resourceGroupName, String domainName) { + DomainInner inner = this.serviceClient().transferOut(resourceGroupName, domainName); + if (inner != null) { + return new DomainImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response transferOutWithResponse(String resourceGroupName, String domainName, Context context) { + Response inner = + this.serviceClient().transferOutWithResponse(resourceGroupName, domainName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DomainImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Domain 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 domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, domainName, 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 domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, domainName, context); + } + + public DomainOwnershipIdentifier getOwnershipIdentifierById(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 domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + String name = Utils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'domainOwnershipIdentifiers'.", + id))); + } + return this.getOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, Context.NONE).getValue(); + } + + public Response getOwnershipIdentifierByIdWithResponse(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 domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + String name = Utils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'domainOwnershipIdentifiers'.", + id))); + } + return this.getOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, 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 domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + Boolean localForceHardDeleteDomain = null; + this.deleteWithResponse(resourceGroupName, domainName, localForceHardDeleteDomain, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Boolean forceHardDeleteDomain, 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 domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + return this.deleteWithResponse(resourceGroupName, domainName, forceHardDeleteDomain, context); + } + + public void deleteOwnershipIdentifierById(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 domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + String name = Utils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'domainOwnershipIdentifiers'.", + id))); + } + this.deleteOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, Context.NONE); + } + + public Response deleteOwnershipIdentifierByIdWithResponse(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 domainName = Utils.getValueFromIdByName(id, "domains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'domains'.", id))); + } + String name = Utils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'domainOwnershipIdentifiers'.", + id))); + } + return this.deleteOwnershipIdentifierWithResponse(resourceGroupName, domainName, name, context); + } + + private DomainsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public DomainImpl define(String name) { + return new DomainImpl(name, this.manager()); + } + + public DomainOwnershipIdentifierImpl defineOwnershipIdentifier(String name) { + return new DomainOwnershipIdentifierImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionAppStackImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionAppStackImpl.java new file mode 100644 index 0000000000000..d304361559a49 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionAppStackImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionAppStackInner; +import com.azure.resourcemanager.appservice.generated.models.FunctionAppMajorVersion; +import com.azure.resourcemanager.appservice.generated.models.FunctionAppStack; +import com.azure.resourcemanager.appservice.generated.models.StackPreferredOs; +import java.util.Collections; +import java.util.List; + +public final class FunctionAppStackImpl implements FunctionAppStack { + private FunctionAppStackInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + FunctionAppStackImpl( + FunctionAppStackInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String location() { + return this.innerModel().location(); + } + + public String displayText() { + return this.innerModel().displayText(); + } + + public String value() { + return this.innerModel().value(); + } + + public List majorVersions() { + List inner = this.innerModel().majorVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public StackPreferredOs preferredOs() { + return this.innerModel().preferredOs(); + } + + public FunctionAppStackInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionEnvelopeImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionEnvelopeImpl.java new file mode 100644 index 0000000000000..5cf28d8f61c30 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionEnvelopeImpl.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionEnvelopeInner; +import com.azure.resourcemanager.appservice.generated.models.FunctionEnvelope; +import com.azure.resourcemanager.appservice.generated.models.FunctionSecrets; +import com.azure.resourcemanager.appservice.generated.models.StringDictionary; +import java.util.Collections; +import java.util.Map; + +public final class FunctionEnvelopeImpl implements FunctionEnvelope, FunctionEnvelope.Definition { + private FunctionEnvelopeInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + FunctionEnvelopeImpl( + FunctionEnvelopeInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String functionAppId() { + return this.innerModel().functionAppId(); + } + + public String scriptRootPathHref() { + return this.innerModel().scriptRootPathHref(); + } + + public String scriptHref() { + return this.innerModel().scriptHref(); + } + + public String configHref() { + return this.innerModel().configHref(); + } + + public String testDataHref() { + return this.innerModel().testDataHref(); + } + + public String secretsFileHref() { + return this.innerModel().secretsFileHref(); + } + + public String href() { + return this.innerModel().href(); + } + + public Object config() { + return this.innerModel().config(); + } + + public Map files() { + Map inner = this.innerModel().files(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String testData() { + return this.innerModel().testData(); + } + + public String invokeUrlTemplate() { + return this.innerModel().invokeUrlTemplate(); + } + + public String language() { + return this.innerModel().language(); + } + + public Boolean isDisabled() { + return this.innerModel().isDisabled(); + } + + public FunctionEnvelopeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String functionName; + + public FunctionEnvelopeImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public FunctionEnvelope create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createFunction(resourceGroupName, name, functionName, this.innerModel(), Context.NONE); + return this; + } + + public FunctionEnvelope create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createFunction(resourceGroupName, name, functionName, this.innerModel(), context); + return this; + } + + FunctionEnvelopeImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new FunctionEnvelopeInner(); + this.serviceManager = serviceManager; + this.functionName = name; + } + + public FunctionEnvelope refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getFunctionWithResponse(resourceGroupName, name, functionName, Context.NONE) + .getValue(); + return this; + } + + public FunctionEnvelope refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getFunctionWithResponse(resourceGroupName, name, functionName, context) + .getValue(); + return this; + } + + public StringDictionary listFunctionKeys() { + return serviceManager.webApps().listFunctionKeys(resourceGroupName, name, functionName); + } + + public Response listFunctionKeysWithResponse(Context context) { + return serviceManager.webApps().listFunctionKeysWithResponse(resourceGroupName, name, functionName, context); + } + + public FunctionSecrets listFunctionSecrets() { + return serviceManager.webApps().listFunctionSecrets(resourceGroupName, name, functionName); + } + + public Response listFunctionSecretsWithResponse(Context context) { + return serviceManager.webApps().listFunctionSecretsWithResponse(resourceGroupName, name, functionName, context); + } + + public FunctionEnvelopeImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public FunctionEnvelopeImpl withFunctionAppId(String functionAppId) { + this.innerModel().withFunctionAppId(functionAppId); + return this; + } + + public FunctionEnvelopeImpl withScriptRootPathHref(String scriptRootPathHref) { + this.innerModel().withScriptRootPathHref(scriptRootPathHref); + return this; + } + + public FunctionEnvelopeImpl withScriptHref(String scriptHref) { + this.innerModel().withScriptHref(scriptHref); + return this; + } + + public FunctionEnvelopeImpl withConfigHref(String configHref) { + this.innerModel().withConfigHref(configHref); + return this; + } + + public FunctionEnvelopeImpl withTestDataHref(String testDataHref) { + this.innerModel().withTestDataHref(testDataHref); + return this; + } + + public FunctionEnvelopeImpl withSecretsFileHref(String secretsFileHref) { + this.innerModel().withSecretsFileHref(secretsFileHref); + return this; + } + + public FunctionEnvelopeImpl withHref(String href) { + this.innerModel().withHref(href); + return this; + } + + public FunctionEnvelopeImpl withConfig(Object config) { + this.innerModel().withConfig(config); + return this; + } + + public FunctionEnvelopeImpl withFiles(Map files) { + this.innerModel().withFiles(files); + return this; + } + + public FunctionEnvelopeImpl withTestData(String testData) { + this.innerModel().withTestData(testData); + return this; + } + + public FunctionEnvelopeImpl withInvokeUrlTemplate(String invokeUrlTemplate) { + this.innerModel().withInvokeUrlTemplate(invokeUrlTemplate); + return this; + } + + public FunctionEnvelopeImpl withLanguage(String language) { + this.innerModel().withLanguage(language); + return this; + } + + public FunctionEnvelopeImpl withIsDisabled(Boolean isDisabled) { + this.innerModel().withIsDisabled(isDisabled); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionSecretsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionSecretsImpl.java new file mode 100644 index 0000000000000..c71da624936f8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/FunctionSecretsImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionSecretsInner; +import com.azure.resourcemanager.appservice.generated.models.FunctionSecrets; + +public final class FunctionSecretsImpl implements FunctionSecrets { + private FunctionSecretsInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + FunctionSecretsImpl( + FunctionSecretsInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String key() { + return this.innerModel().key(); + } + + public String triggerUrl() { + return this.innerModel().triggerUrl(); + } + + public FunctionSecretsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GeoRegionImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GeoRegionImpl.java new file mode 100644 index 0000000000000..9a70f3f803d0f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GeoRegionImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.GeoRegionInner; +import com.azure.resourcemanager.appservice.generated.models.GeoRegion; + +public final class GeoRegionImpl implements GeoRegion { + private GeoRegionInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + GeoRegionImpl( + GeoRegionInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String description() { + return this.innerModel().description(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String orgDomain() { + return this.innerModel().orgDomain(); + } + + public GeoRegionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GlobalsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GlobalsClientImpl.java new file mode 100644 index 0000000000000..f3739f3355300 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GlobalsClientImpl.java @@ -0,0 +1,497 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.GlobalsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeletedSiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import java.util.List; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in GlobalsClient. */ +public final class GlobalsClientImpl implements GlobalsClient { + private final ClientLogger logger = new ClientLogger(GlobalsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final GlobalsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of GlobalsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + GlobalsClientImpl(WebSiteManagementClientImpl client) { + this.service = RestProxy.create(GlobalsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientGlobals to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface GlobalsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDeletedWebApp( + @HostParam("$host") String endpoint, + @PathParam("deletedSiteId") String deletedSiteId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> getDeletedWebAppSnapshots( + @HostParam("$host") String endpoint, + @PathParam("deletedSiteId") String deletedSiteId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSubscriptionOperationWithAsyncResponse( + @HostParam("$host") String endpoint, + @PathParam("location") String location, + @PathParam("operationId") String operationId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeletedWebAppWithResponseAsync(String deletedSiteId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deletedSiteId == null) { + return Mono.error(new IllegalArgumentException("Parameter deletedSiteId is required 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 + .getDeletedWebApp( + this.client.getEndpoint(), + deletedSiteId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeletedWebAppWithResponseAsync(String deletedSiteId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deletedSiteId == null) { + return Mono.error(new IllegalArgumentException("Parameter deletedSiteId is required 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 + .getDeletedWebApp( + this.client.getEndpoint(), + deletedSiteId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeletedWebAppAsync(String deletedSiteId) { + return getDeletedWebAppWithResponseAsync(deletedSiteId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeletedSiteInner getDeletedWebApp(String deletedSiteId) { + return getDeletedWebAppAsync(deletedSiteId).block(); + } + + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 deleted app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeletedWebAppWithResponse(String deletedSiteId, Context context) { + return getDeletedWebAppWithResponseAsync(deletedSiteId, context).block(); + } + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getDeletedWebAppSnapshotsWithResponseAsync(String deletedSiteId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deletedSiteId == null) { + return Mono.error(new IllegalArgumentException("Parameter deletedSiteId is required 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 + .getDeletedWebAppSnapshots( + this.client.getEndpoint(), + deletedSiteId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getDeletedWebAppSnapshotsWithResponseAsync( + String deletedSiteId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (deletedSiteId == null) { + return Mono.error(new IllegalArgumentException("Parameter deletedSiteId is required 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 + .getDeletedWebAppSnapshots( + this.client.getEndpoint(), + deletedSiteId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeletedWebAppSnapshotsAsync(String deletedSiteId) { + return getDeletedWebAppSnapshotsWithResponseAsync(deletedSiteId) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List getDeletedWebAppSnapshots(String deletedSiteId) { + return getDeletedWebAppSnapshotsAsync(deletedSiteId).block(); + } + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> getDeletedWebAppSnapshotsWithResponse(String deletedSiteId, Context context) { + return getDeletedWebAppSnapshotsWithResponseAsync(deletedSiteId, context).block(); + } + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSubscriptionOperationWithAsyncResponseWithResponseAsync( + String location, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getSubscriptionOperationWithAsyncResponse( + this.client.getEndpoint(), + location, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSubscriptionOperationWithAsyncResponseWithResponseAsync( + String location, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getSubscriptionOperationWithAsyncResponse( + this.client.getEndpoint(), + location, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSubscriptionOperationWithAsyncResponseAsync(String location, String operationId) { + return getSubscriptionOperationWithAsyncResponseWithResponseAsync(location, operationId) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 getSubscriptionOperationWithAsyncResponse(String location, String operationId) { + getSubscriptionOperationWithAsyncResponseAsync(location, operationId).block(); + } + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSubscriptionOperationWithAsyncResponseWithResponse( + String location, String operationId, Context context) { + return getSubscriptionOperationWithAsyncResponseWithResponseAsync(location, operationId, context).block(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GlobalsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GlobalsImpl.java new file mode 100644 index 0000000000000..8a0246b0b18c4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/GlobalsImpl.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.GlobalsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeletedSiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.appservice.generated.models.DeletedSite; +import com.azure.resourcemanager.appservice.generated.models.Globals; +import com.azure.resourcemanager.appservice.generated.models.Snapshot; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class GlobalsImpl implements Globals { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalsImpl.class); + + private final GlobalsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public GlobalsImpl( + GlobalsClient innerClient, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public DeletedSite getDeletedWebApp(String deletedSiteId) { + DeletedSiteInner inner = this.serviceClient().getDeletedWebApp(deletedSiteId); + if (inner != null) { + return new DeletedSiteImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDeletedWebAppWithResponse(String deletedSiteId, Context context) { + Response inner = this.serviceClient().getDeletedWebAppWithResponse(deletedSiteId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeletedSiteImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public List getDeletedWebAppSnapshots(String deletedSiteId) { + List inner = this.serviceClient().getDeletedWebAppSnapshots(deletedSiteId); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new SnapshotImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> getDeletedWebAppSnapshotsWithResponse(String deletedSiteId, Context context) { + Response> inner = + this.serviceClient().getDeletedWebAppSnapshotsWithResponse(deletedSiteId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new SnapshotImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public void getSubscriptionOperationWithAsyncResponse(String location, String operationId) { + this.serviceClient().getSubscriptionOperationWithAsyncResponse(location, operationId); + } + + public Response getSubscriptionOperationWithAsyncResponseWithResponse( + String location, String operationId, Context context) { + return this + .serviceClient() + .getSubscriptionOperationWithAsyncResponseWithResponse(location, operationId, context); + } + + private GlobalsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostKeysImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostKeysImpl.java new file mode 100644 index 0000000000000..bd1099efe8bb4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostKeysImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HostKeysInner; +import com.azure.resourcemanager.appservice.generated.models.HostKeys; +import java.util.Collections; +import java.util.Map; + +public final class HostKeysImpl implements HostKeys { + private HostKeysInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + HostKeysImpl( + HostKeysInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String masterKey() { + return this.innerModel().masterKey(); + } + + public Map functionKeys() { + Map inner = this.innerModel().functionKeys(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map systemKeys() { + Map inner = this.innerModel().systemKeys(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public HostKeysInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostingEnvironmentDiagnosticsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostingEnvironmentDiagnosticsImpl.java new file mode 100644 index 0000000000000..0ba81604aa733 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostingEnvironmentDiagnosticsImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HostingEnvironmentDiagnosticsInner; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentDiagnostics; + +public final class HostingEnvironmentDiagnosticsImpl implements HostingEnvironmentDiagnostics { + private HostingEnvironmentDiagnosticsInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + HostingEnvironmentDiagnosticsImpl( + HostingEnvironmentDiagnosticsInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public String diagnosticsOutput() { + return this.innerModel().diagnosticsOutput(); + } + + public HostingEnvironmentDiagnosticsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostnameBindingImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostnameBindingImpl.java new file mode 100644 index 0000000000000..f1ca714999f44 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HostnameBindingImpl.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.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostnameBindingInner; +import com.azure.resourcemanager.appservice.generated.models.AzureResourceType; +import com.azure.resourcemanager.appservice.generated.models.CustomHostnameDnsRecordType; +import com.azure.resourcemanager.appservice.generated.models.HostnameBinding; +import com.azure.resourcemanager.appservice.generated.models.HostnameType; +import com.azure.resourcemanager.appservice.generated.models.SslState; + +public final class HostnameBindingImpl implements HostnameBinding, HostnameBinding.Definition, HostnameBinding.Update { + private HostnameBindingInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String siteName() { + return this.innerModel().siteName(); + } + + public String domainId() { + return this.innerModel().domainId(); + } + + public String azureResourceName() { + return this.innerModel().azureResourceName(); + } + + public AzureResourceType azureResourceType() { + return this.innerModel().azureResourceType(); + } + + public CustomHostnameDnsRecordType customHostnameDnsRecordType() { + return this.innerModel().customHostnameDnsRecordType(); + } + + public HostnameType hostnameType() { + return this.innerModel().hostnameType(); + } + + public SslState sslState() { + return this.innerModel().sslState(); + } + + public String thumbprint() { + return this.innerModel().thumbprint(); + } + + public String virtualIp() { + return this.innerModel().virtualIp(); + } + + public HostnameBindingInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String hostname; + + public HostnameBindingImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public HostnameBinding create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateHostnameBindingWithResponse( + resourceGroupName, name, hostname, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public HostnameBinding create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateHostnameBindingWithResponse( + resourceGroupName, name, hostname, this.innerModel(), context) + .getValue(); + return this; + } + + HostnameBindingImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new HostnameBindingInner(); + this.serviceManager = serviceManager; + this.hostname = name; + } + + public HostnameBindingImpl update() { + return this; + } + + public HostnameBinding apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateHostnameBindingWithResponse( + resourceGroupName, name, hostname, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public HostnameBinding apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateHostnameBindingWithResponse( + resourceGroupName, name, hostname, this.innerModel(), context) + .getValue(); + return this; + } + + HostnameBindingImpl( + HostnameBindingInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + this.hostname = Utils.getValueFromIdByName(innerObject.id(), "hostNameBindings"); + } + + public HostnameBinding refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getHostnameBindingWithResponse(resourceGroupName, name, hostname, Context.NONE) + .getValue(); + return this; + } + + public HostnameBinding refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getHostnameBindingWithResponse(resourceGroupName, name, hostname, context) + .getValue(); + return this; + } + + public HostnameBindingImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public HostnameBindingImpl withSiteName(String siteName) { + this.innerModel().withSiteName(siteName); + return this; + } + + public HostnameBindingImpl withDomainId(String domainId) { + this.innerModel().withDomainId(domainId); + return this; + } + + public HostnameBindingImpl withAzureResourceName(String azureResourceName) { + this.innerModel().withAzureResourceName(azureResourceName); + return this; + } + + public HostnameBindingImpl withAzureResourceType(AzureResourceType azureResourceType) { + this.innerModel().withAzureResourceType(azureResourceType); + return this; + } + + public HostnameBindingImpl withCustomHostnameDnsRecordType( + CustomHostnameDnsRecordType customHostnameDnsRecordType) { + this.innerModel().withCustomHostnameDnsRecordType(customHostnameDnsRecordType); + return this; + } + + public HostnameBindingImpl withHostnameType(HostnameType hostnameType) { + this.innerModel().withHostnameType(hostnameType); + return this; + } + + public HostnameBindingImpl withSslState(SslState sslState) { + this.innerModel().withSslState(sslState); + return this; + } + + public HostnameBindingImpl withThumbprint(String thumbprint) { + this.innerModel().withThumbprint(thumbprint); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionImpl.java new file mode 100644 index 0000000000000..1c80689180a8e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionImpl.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.models.HybridConnection; + +public final class HybridConnectionImpl + implements HybridConnection, HybridConnection.Definition, HybridConnection.Update { + private HybridConnectionInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String serviceBusNamespace() { + return this.innerModel().serviceBusNamespace(); + } + + public String relayName() { + return this.innerModel().relayName(); + } + + public String relayArmUri() { + return this.innerModel().relayArmUri(); + } + + public String hostname() { + return this.innerModel().hostname(); + } + + public Integer port() { + return this.innerModel().port(); + } + + public String sendKeyName() { + return this.innerModel().sendKeyName(); + } + + public String sendKeyValue() { + return this.innerModel().sendKeyValue(); + } + + public String serviceBusSuffix() { + return this.innerModel().serviceBusSuffix(); + } + + public HybridConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String namespaceName; + + private String relayName; + + public HybridConnectionImpl withExistingHybridConnectionNamespace( + String resourceGroupName, String name, String namespaceName) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.namespaceName = namespaceName; + return this; + } + + public HybridConnection create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateHybridConnectionWithResponse( + resourceGroupName, name, namespaceName, relayName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public HybridConnection create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateHybridConnectionWithResponse( + resourceGroupName, name, namespaceName, relayName, this.innerModel(), context) + .getValue(); + return this; + } + + HybridConnectionImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new HybridConnectionInner(); + this.serviceManager = serviceManager; + this.relayName = name; + } + + public HybridConnectionImpl update() { + return this; + } + + public HybridConnection apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateHybridConnectionWithResponse( + resourceGroupName, name, namespaceName, relayName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public HybridConnection apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateHybridConnectionWithResponse( + resourceGroupName, name, namespaceName, relayName, this.innerModel(), context) + .getValue(); + return this; + } + + HybridConnectionImpl( + HybridConnectionInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + this.namespaceName = Utils.getValueFromIdByName(innerObject.id(), "hybridConnectionNamespaces"); + this.relayName = Utils.getValueFromIdByName(innerObject.id(), "relays"); + } + + public HybridConnection refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, Context.NONE) + .getValue(); + return this; + } + + public HybridConnection refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, context) + .getValue(); + return this; + } + + public HybridConnectionImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public HybridConnectionImpl withServiceBusNamespace(String serviceBusNamespace) { + this.innerModel().withServiceBusNamespace(serviceBusNamespace); + return this; + } + + public HybridConnectionImpl withRelayName(String relayName) { + this.innerModel().withRelayName(relayName); + return this; + } + + public HybridConnectionImpl withRelayArmUri(String relayArmUri) { + this.innerModel().withRelayArmUri(relayArmUri); + return this; + } + + public HybridConnectionImpl withHostname(String hostname) { + this.innerModel().withHostname(hostname); + return this; + } + + public HybridConnectionImpl withPort(Integer port) { + this.innerModel().withPort(port); + return this; + } + + public HybridConnectionImpl withSendKeyName(String sendKeyName) { + this.innerModel().withSendKeyName(sendKeyName); + return this; + } + + public HybridConnectionImpl withSendKeyValue(String sendKeyValue) { + this.innerModel().withSendKeyValue(sendKeyValue); + return this; + } + + public HybridConnectionImpl withServiceBusSuffix(String serviceBusSuffix) { + this.innerModel().withServiceBusSuffix(serviceBusSuffix); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionKeyImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionKeyImpl.java new file mode 100644 index 0000000000000..fb38008a9e8e7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionKeyImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionKeyInner; +import com.azure.resourcemanager.appservice.generated.models.HybridConnectionKey; + +public final class HybridConnectionKeyImpl implements HybridConnectionKey { + private HybridConnectionKeyInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + HybridConnectionKeyImpl( + HybridConnectionKeyInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String sendKeyName() { + return this.innerModel().sendKeyName(); + } + + public String sendKeyValue() { + return this.innerModel().sendKeyValue(); + } + + public HybridConnectionKeyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionLimitsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionLimitsImpl.java new file mode 100644 index 0000000000000..74718379ccdcf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/HybridConnectionLimitsImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionLimitsInner; +import com.azure.resourcemanager.appservice.generated.models.HybridConnectionLimits; + +public final class HybridConnectionLimitsImpl implements HybridConnectionLimits { + private HybridConnectionLimitsInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + HybridConnectionLimitsImpl( + HybridConnectionLimitsInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Integer current() { + return this.innerModel().current(); + } + + public Integer maximum() { + return this.innerModel().maximum(); + } + + public HybridConnectionLimitsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/IdentifierImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/IdentifierImpl.java new file mode 100644 index 0000000000000..d6832c7b427ca --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/IdentifierImpl.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.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.models.Identifier; + +public final class IdentifierImpl implements Identifier, Identifier.Definition, Identifier.Update { + private IdentifierInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String value() { + return this.innerModel().value(); + } + + public IdentifierInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String domainOwnershipIdentifierName; + + public IdentifierImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public Identifier create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Identifier create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, this.innerModel(), context) + .getValue(); + return this; + } + + IdentifierImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new IdentifierInner(); + this.serviceManager = serviceManager; + this.domainOwnershipIdentifierName = name; + } + + public IdentifierImpl update() { + return this; + } + + public Identifier apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public Identifier apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, this.innerModel(), context) + .getValue(); + return this; + } + + IdentifierImpl( + IdentifierInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + this.domainOwnershipIdentifierName = Utils.getValueFromIdByName(innerObject.id(), "domainOwnershipIdentifiers"); + } + + public Identifier refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, Context.NONE) + .getValue(); + return this; + } + + public Identifier refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, context) + .getValue(); + return this; + } + + public IdentifierImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public IdentifierImpl withValue(String value) { + this.innerModel().withValue(value); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/InboundEnvironmentEndpointImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/InboundEnvironmentEndpointImpl.java new file mode 100644 index 0000000000000..85891e181597d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/InboundEnvironmentEndpointImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.InboundEnvironmentEndpointInner; +import com.azure.resourcemanager.appservice.generated.models.InboundEnvironmentEndpoint; +import java.util.Collections; +import java.util.List; + +public final class InboundEnvironmentEndpointImpl implements InboundEnvironmentEndpoint { + private InboundEnvironmentEndpointInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + InboundEnvironmentEndpointImpl( + InboundEnvironmentEndpointInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String description() { + return this.innerModel().description(); + } + + public List endpoints() { + List inner = this.innerModel().endpoints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List ports() { + List inner = this.innerModel().ports(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public InboundEnvironmentEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KeyInfoImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KeyInfoImpl.java new file mode 100644 index 0000000000000..bbe1bebc93770 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KeyInfoImpl.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.KeyInfoInner; +import com.azure.resourcemanager.appservice.generated.models.KeyInfo; + +public final class KeyInfoImpl implements KeyInfo { + private KeyInfoInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + KeyInfoImpl( + KeyInfoInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public String value() { + return this.innerModel().value(); + } + + public KeyInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentImpl.java new file mode 100644 index 0000000000000..687cd2eecc40a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentImpl.java @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.KubeEnvironmentInner; +import com.azure.resourcemanager.appservice.generated.models.AppLogsConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ArcConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppsConfiguration; +import com.azure.resourcemanager.appservice.generated.models.ExtendedLocation; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironment; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentPatchResource; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentProvisioningState; +import java.util.Collections; +import java.util.Map; + +public final class KubeEnvironmentImpl implements KubeEnvironment, KubeEnvironment.Definition, KubeEnvironment.Update { + private KubeEnvironmentInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public KubeEnvironmentProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String deploymentErrors() { + return this.innerModel().deploymentErrors(); + } + + public Boolean internalLoadBalancerEnabled() { + return this.innerModel().internalLoadBalancerEnabled(); + } + + public String defaultDomain() { + return this.innerModel().defaultDomain(); + } + + public String staticIp() { + return this.innerModel().staticIp(); + } + + public String environmentType() { + return this.innerModel().environmentType(); + } + + public ArcConfiguration arcConfiguration() { + return this.innerModel().arcConfiguration(); + } + + public AppLogsConfiguration appLogsConfiguration() { + return this.innerModel().appLogsConfiguration(); + } + + public ContainerAppsConfiguration containerAppsConfiguration() { + return this.innerModel().containerAppsConfiguration(); + } + + public String aksResourceId() { + return this.innerModel().aksResourceId(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public KubeEnvironmentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private KubeEnvironmentPatchResource updateKubeEnvironmentEnvelope; + + public KubeEnvironmentImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public KubeEnvironment create() { + this.innerObject = + serviceManager + .serviceClient() + .getKubeEnvironments() + .createOrUpdate(resourceGroupName, name, this.innerModel(), Context.NONE); + return this; + } + + public KubeEnvironment create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKubeEnvironments() + .createOrUpdate(resourceGroupName, name, this.innerModel(), context); + return this; + } + + KubeEnvironmentImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new KubeEnvironmentInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public KubeEnvironmentImpl update() { + this.updateKubeEnvironmentEnvelope = new KubeEnvironmentPatchResource(); + return this; + } + + public KubeEnvironment apply() { + this.innerObject = + serviceManager + .serviceClient() + .getKubeEnvironments() + .updateWithResponse(resourceGroupName, name, updateKubeEnvironmentEnvelope, Context.NONE) + .getValue(); + return this; + } + + public KubeEnvironment apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKubeEnvironments() + .updateWithResponse(resourceGroupName, name, updateKubeEnvironmentEnvelope, context) + .getValue(); + return this; + } + + KubeEnvironmentImpl( + KubeEnvironmentInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "kubeEnvironments"); + } + + public KubeEnvironment refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getKubeEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE) + .getValue(); + return this; + } + + public KubeEnvironment refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getKubeEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, name, context) + .getValue(); + return this; + } + + public KubeEnvironmentImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public KubeEnvironmentImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public KubeEnvironmentImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public KubeEnvironmentImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public KubeEnvironmentImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateKubeEnvironmentEnvelope.withKind(kind); + return this; + } + } + + public KubeEnvironmentImpl withInternalLoadBalancerEnabled(Boolean internalLoadBalancerEnabled) { + this.innerModel().withInternalLoadBalancerEnabled(internalLoadBalancerEnabled); + return this; + } + + public KubeEnvironmentImpl withStaticIp(String staticIp) { + this.innerModel().withStaticIp(staticIp); + return this; + } + + public KubeEnvironmentImpl withEnvironmentType(String environmentType) { + this.innerModel().withEnvironmentType(environmentType); + return this; + } + + public KubeEnvironmentImpl withArcConfiguration(ArcConfiguration arcConfiguration) { + if (isInCreateMode()) { + this.innerModel().withArcConfiguration(arcConfiguration); + return this; + } else { + this.updateKubeEnvironmentEnvelope.withArcConfiguration(arcConfiguration); + return this; + } + } + + public KubeEnvironmentImpl withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { + if (isInCreateMode()) { + this.innerModel().withAppLogsConfiguration(appLogsConfiguration); + return this; + } else { + this.updateKubeEnvironmentEnvelope.withAppLogsConfiguration(appLogsConfiguration); + return this; + } + } + + public KubeEnvironmentImpl withContainerAppsConfiguration(ContainerAppsConfiguration containerAppsConfiguration) { + if (isInCreateMode()) { + this.innerModel().withContainerAppsConfiguration(containerAppsConfiguration); + return this; + } else { + this.updateKubeEnvironmentEnvelope.withContainerAppsConfiguration(containerAppsConfiguration); + return this; + } + } + + public KubeEnvironmentImpl withAksResourceId(String aksResourceId) { + this.innerModel().withAksResourceId(aksResourceId); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentsClientImpl.java new file mode 100644 index 0000000000000..5ea8627272d33 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentsClientImpl.java @@ -0,0 +1,1445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.KubeEnvironmentsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.KubeEnvironmentInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentCollection; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironmentPatchResource; +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 KubeEnvironmentsClient. */ +public final class KubeEnvironmentsClientImpl implements KubeEnvironmentsClient { + private final ClientLogger logger = new ClientLogger(KubeEnvironmentsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final KubeEnvironmentsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of KubeEnvironmentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + KubeEnvironmentsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(KubeEnvironmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientKubeEnvironments to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface KubeEnvironmentsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments") + @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.Web" + + "/kubeEnvironments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.Web" + + "/kubeEnvironments/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/kubeEnvironments/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KubeEnvironmentInner kubeEnvironmentEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/kubeEnvironments/{name}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/kubeEnvironments/{name}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KubeEnvironmentPatchResource kubeEnvironmentEnvelope, + @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); + } + + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @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())); + } + + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @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)); + } + + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes Environments. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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())); + } + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes Environments. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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)); + } + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubeEnvironmentInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (kubeEnvironmentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter kubeEnvironmentEnvelope is required and cannot be null.")); + } else { + kubeEnvironmentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + kubeEnvironmentEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (kubeEnvironmentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter kubeEnvironmentEnvelope is required and cannot be null.")); + } else { + kubeEnvironmentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + kubeEnvironmentEnvelope, + accept, + context); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KubeEnvironmentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, kubeEnvironmentEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + KubeEnvironmentInner.class, + KubeEnvironmentInner.class, + this.client.getContext()); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, KubeEnvironmentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, kubeEnvironmentEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), KubeEnvironmentInner.class, KubeEnvironmentInner.class, context); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubeEnvironmentInner> beginCreateOrUpdate( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).getSyncPoller(); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, KubeEnvironmentInner> beginCreateOrUpdate( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope, context).getSyncPoller(); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubeEnvironmentInner createOrUpdate( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope) { + return createOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).block(); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubeEnvironmentInner createOrUpdate( + String resourceGroupName, String name, KubeEnvironmentInner kubeEnvironmentEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope, context).block(); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String name) { + return beginDeleteAsync(resourceGroupName, name).getSyncPoller(); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, name, context).getSyncPoller(); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name) { + return beginDeleteAsync(resourceGroupName, name).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, name, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String name) { + deleteAsync(resourceGroupName, name).block(); + } + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String name, Context context) { + deleteAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (kubeEnvironmentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter kubeEnvironmentEnvelope is required and cannot be null.")); + } else { + kubeEnvironmentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + kubeEnvironmentEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (kubeEnvironmentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter kubeEnvironmentEnvelope is required and cannot be null.")); + } else { + kubeEnvironmentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + kubeEnvironmentEnvelope, + accept, + context); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope) { + return updateWithResponseAsync(resourceGroupName, name, kubeEnvironmentEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KubeEnvironmentInner update( + String resourceGroupName, String name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope) { + return updateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).block(); + } + + /** + * Description for Creates or updates a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param kubeEnvironmentEnvelope Configuration details of the Kubernetes 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 a Kubernetes cluster specialized for web workloads by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Context context) { + return updateWithResponseAsync(resourceGroupName, name, kubeEnvironmentEnvelope, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kubernetes Environments. + */ + @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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentsImpl.java new file mode 100644 index 0000000000000..418724691197c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/KubeEnvironmentsImpl.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.appservice.generated.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.appservice.generated.fluent.KubeEnvironmentsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.KubeEnvironmentInner; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironment; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironments; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class KubeEnvironmentsImpl implements KubeEnvironments { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubeEnvironmentsImpl.class); + + private final KubeEnvironmentsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public KubeEnvironmentsImpl( + KubeEnvironmentsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new KubeEnvironmentImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new KubeEnvironmentImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new KubeEnvironmentImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new KubeEnvironmentImpl(inner1, this.manager())); + } + + public KubeEnvironment getByResourceGroup(String resourceGroupName, String name) { + KubeEnvironmentInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name); + if (inner != null) { + return new KubeEnvironmentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new KubeEnvironmentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String name) { + this.serviceClient().delete(resourceGroupName, name); + } + + public void delete(String resourceGroupName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, name, context); + } + + public KubeEnvironment 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 name = Utils.getValueFromIdByName(id, "kubeEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'kubeEnvironments'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "kubeEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'kubeEnvironments'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "kubeEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'kubeEnvironments'.", id))); + } + this.delete(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "kubeEnvironments"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'kubeEnvironments'.", id))); + } + this.delete(resourceGroupName, name, context); + } + + private KubeEnvironmentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public KubeEnvironmentImpl define(String name) { + return new KubeEnvironmentImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MSDeployLogImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MSDeployLogImpl.java new file mode 100644 index 0000000000000..95fc52ad64bc2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MSDeployLogImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployLogInner; +import com.azure.resourcemanager.appservice.generated.models.MSDeployLog; +import com.azure.resourcemanager.appservice.generated.models.MSDeployLogEntry; +import java.util.Collections; +import java.util.List; + +public final class MSDeployLogImpl implements MSDeployLog { + private MSDeployLogInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + MSDeployLogImpl( + MSDeployLogInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public List entries() { + List inner = this.innerModel().entries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public MSDeployLogInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MSDeployStatusImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MSDeployStatusImpl.java new file mode 100644 index 0000000000000..2b40e9677dfb8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MSDeployStatusImpl.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployStatusInner; +import com.azure.resourcemanager.appservice.generated.models.MSDeployProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.MSDeployStatus; +import java.time.OffsetDateTime; + +public final class MSDeployStatusImpl implements MSDeployStatus { + private MSDeployStatusInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + MSDeployStatusImpl( + MSDeployStatusInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String deployer() { + return this.innerModel().deployer(); + } + + public MSDeployProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public Boolean complete() { + return this.innerModel().complete(); + } + + public MSDeployStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MigrateMySqlStatusImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MigrateMySqlStatusImpl.java new file mode 100644 index 0000000000000..03f0700ef8156 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/MigrateMySqlStatusImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.MigrateMySqlStatusInner; +import com.azure.resourcemanager.appservice.generated.models.MigrateMySqlStatus; +import com.azure.resourcemanager.appservice.generated.models.OperationStatus; + +public final class MigrateMySqlStatusImpl implements MigrateMySqlStatus { + private MigrateMySqlStatusInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + MigrateMySqlStatusImpl( + MigrateMySqlStatusInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public OperationStatus migrationOperationStatus() { + return this.innerModel().migrationOperationStatus(); + } + + public String operationId() { + return this.innerModel().operationId(); + } + + public Boolean localMySqlEnabled() { + return this.innerModel().localMySqlEnabled(); + } + + public MigrateMySqlStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NameIdentifierImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NameIdentifierImpl.java new file mode 100644 index 0000000000000..80b4634a40db3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NameIdentifierImpl.java @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.models.NameIdentifier; + +public final class NameIdentifierImpl implements NameIdentifier { + private NameIdentifierInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + NameIdentifierImpl( + NameIdentifierInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public NameIdentifierInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NetworkFeaturesImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NetworkFeaturesImpl.java new file mode 100644 index 0000000000000..7afb0ee18afd2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NetworkFeaturesImpl.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkFeaturesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RelayServiceConnectionEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfo; +import com.azure.resourcemanager.appservice.generated.models.HybridConnection; +import com.azure.resourcemanager.appservice.generated.models.NetworkFeatures; +import com.azure.resourcemanager.appservice.generated.models.RelayServiceConnectionEntity; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class NetworkFeaturesImpl implements NetworkFeatures { + private NetworkFeaturesInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + NetworkFeaturesImpl( + NetworkFeaturesInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String virtualNetworkName() { + return this.innerModel().virtualNetworkName(); + } + + public VnetInfo virtualNetworkConnection() { + return this.innerModel().virtualNetworkConnection(); + } + + public List hybridConnections() { + List inner = this.innerModel().hybridConnections(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new RelayServiceConnectionEntityImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public List hybridConnectionsV2() { + List inner = this.innerModel().hybridConnectionsV2(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new HybridConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public NetworkFeaturesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NetworkTraceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NetworkTraceImpl.java new file mode 100644 index 0000000000000..8e0ac538fbdb3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/NetworkTraceImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkTraceInner; +import com.azure.resourcemanager.appservice.generated.models.NetworkTrace; + +public final class NetworkTraceImpl implements NetworkTrace { + private NetworkTraceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + NetworkTraceImpl( + NetworkTraceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String path() { + return this.innerModel().path(); + } + + public String status() { + return this.innerModel().status(); + } + + public String message() { + return this.innerModel().message(); + } + + public NetworkTraceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/OperationImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/OperationImpl.java new file mode 100644 index 0000000000000..b04f775d5440d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/OperationImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner; +import com.azure.resourcemanager.appservice.generated.models.ErrorEntity; +import com.azure.resourcemanager.appservice.generated.models.Operation; +import com.azure.resourcemanager.appservice.generated.models.OperationStatus; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +public final class OperationImpl implements Operation { + private OperationInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + OperationImpl( + OperationInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public OperationStatus status() { + return this.innerModel().status(); + } + + public List errors() { + List inner = this.innerModel().errors(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OffsetDateTime createdTime() { + return this.innerModel().createdTime(); + } + + public OffsetDateTime modifiedTime() { + return this.innerModel().modifiedTime(); + } + + public OffsetDateTime expirationTime() { + return this.innerModel().expirationTime(); + } + + public UUID geoMasterOperationId() { + return this.innerModel().geoMasterOperationId(); + } + + public OperationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/OutboundEnvironmentEndpointImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/OutboundEnvironmentEndpointImpl.java new file mode 100644 index 0000000000000..de50182355d34 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/OutboundEnvironmentEndpointImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.azure.resourcemanager.appservice.generated.models.EndpointDependency; +import com.azure.resourcemanager.appservice.generated.models.OutboundEnvironmentEndpoint; +import java.util.Collections; +import java.util.List; + +public final class OutboundEnvironmentEndpointImpl implements OutboundEnvironmentEndpoint { + private OutboundEnvironmentEndpointInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + OutboundEnvironmentEndpointImpl( + OutboundEnvironmentEndpointInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String category() { + return this.innerModel().category(); + } + + public List endpoints() { + List inner = this.innerModel().endpoints(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OutboundEnvironmentEndpointInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PerfMonResponseImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PerfMonResponseImpl.java new file mode 100644 index 0000000000000..ec25dc6737210 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PerfMonResponseImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PerfMonResponseInner; +import com.azure.resourcemanager.appservice.generated.models.PerfMonResponse; +import com.azure.resourcemanager.appservice.generated.models.PerfMonSet; + +public final class PerfMonResponseImpl implements PerfMonResponse { + private PerfMonResponseInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + PerfMonResponseImpl( + PerfMonResponseInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String code() { + return this.innerModel().code(); + } + + public String message() { + return this.innerModel().message(); + } + + public PerfMonSet data() { + return this.innerModel().data(); + } + + public PerfMonResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PremierAddOnImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PremierAddOnImpl.java new file mode 100644 index 0000000000000..0a3217a90c4ce --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PremierAddOnImpl.java @@ -0,0 +1,259 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnInner; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOn; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOnPatchResource; +import java.util.Collections; +import java.util.Map; + +public final class PremierAddOnImpl implements PremierAddOn, PremierAddOn.Definition, PremierAddOn.Update { + private PremierAddOnInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public String sku() { + return this.innerModel().sku(); + } + + public String product() { + return this.innerModel().product(); + } + + public String vendor() { + return this.innerModel().vendor(); + } + + public String marketplacePublisher() { + return this.innerModel().marketplacePublisher(); + } + + public String marketplaceOffer() { + return this.innerModel().marketplaceOffer(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public PremierAddOnInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String premierAddOnName; + + private PremierAddOnPatchResource updatePremierAddOn; + + public PremierAddOnImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public PremierAddOn create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .addPremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PremierAddOn create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .addPremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, this.innerModel(), context) + .getValue(); + return this; + } + + PremierAddOnImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new PremierAddOnInner(); + this.serviceManager = serviceManager; + this.premierAddOnName = name; + } + + public PremierAddOnImpl update() { + this.updatePremierAddOn = new PremierAddOnPatchResource(); + return this; + } + + public PremierAddOn apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updatePremierAddOnWithResponse( + resourceGroupName, name, premierAddOnName, updatePremierAddOn, Context.NONE) + .getValue(); + return this; + } + + public PremierAddOn apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updatePremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, updatePremierAddOn, context) + .getValue(); + return this; + } + + PremierAddOnImpl( + PremierAddOnInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + this.premierAddOnName = Utils.getValueFromIdByName(innerObject.id(), "premieraddons"); + } + + public PremierAddOn refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getPremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, Context.NONE) + .getValue(); + return this; + } + + public PremierAddOn refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getPremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, context) + .getValue(); + return this; + } + + public PremierAddOnImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public PremierAddOnImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public PremierAddOnImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public PremierAddOnImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updatePremierAddOn.withKind(kind); + return this; + } + } + + public PremierAddOnImpl withSku(String sku) { + if (isInCreateMode()) { + this.innerModel().withSku(sku); + return this; + } else { + this.updatePremierAddOn.withSku(sku); + return this; + } + } + + public PremierAddOnImpl withProduct(String product) { + if (isInCreateMode()) { + this.innerModel().withProduct(product); + return this; + } else { + this.updatePremierAddOn.withProduct(product); + return this; + } + } + + public PremierAddOnImpl withVendor(String vendor) { + if (isInCreateMode()) { + this.innerModel().withVendor(vendor); + return this; + } else { + this.updatePremierAddOn.withVendor(vendor); + return this; + } + } + + public PremierAddOnImpl withMarketplacePublisher(String marketplacePublisher) { + if (isInCreateMode()) { + this.innerModel().withMarketplacePublisher(marketplacePublisher); + return this; + } else { + this.updatePremierAddOn.withMarketplacePublisher(marketplacePublisher); + return this; + } + } + + public PremierAddOnImpl withMarketplaceOffer(String marketplaceOffer) { + if (isInCreateMode()) { + this.innerModel().withMarketplaceOffer(marketplaceOffer); + return this; + } else { + this.updatePremierAddOn.withMarketplaceOffer(marketplaceOffer); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PremierAddOnOfferImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PremierAddOnOfferImpl.java new file mode 100644 index 0000000000000..206122a43113d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PremierAddOnOfferImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnOfferInner; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlanRestrictions; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOnOffer; + +public final class PremierAddOnOfferImpl implements PremierAddOnOffer { + private PremierAddOnOfferInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + PremierAddOnOfferImpl( + PremierAddOnOfferInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String sku() { + return this.innerModel().sku(); + } + + public String product() { + return this.innerModel().product(); + } + + public String vendor() { + return this.innerModel().vendor(); + } + + public Boolean promoCodeRequired() { + return this.innerModel().promoCodeRequired(); + } + + public Integer quota() { + return this.innerModel().quota(); + } + + public AppServicePlanRestrictions webHostingPlanRestrictions() { + return this.innerModel().webHostingPlanRestrictions(); + } + + public String privacyPolicyUrl() { + return this.innerModel().privacyPolicyUrl(); + } + + public String legalTermsUrl() { + return this.innerModel().legalTermsUrl(); + } + + public String marketplacePublisher() { + return this.innerModel().marketplacePublisher(); + } + + public String marketplaceOffer() { + return this.innerModel().marketplaceOffer(); + } + + public PremierAddOnOfferInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PrivateAccessImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PrivateAccessImpl.java new file mode 100644 index 0000000000000..820d2acaacd64 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PrivateAccessImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.appservice.generated.models.PrivateAccess; +import com.azure.resourcemanager.appservice.generated.models.PrivateAccessVirtualNetwork; +import java.util.Collections; +import java.util.List; + +public final class PrivateAccessImpl implements PrivateAccess { + private PrivateAccessInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + PrivateAccessImpl( + PrivateAccessInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Boolean enabled() { + return this.innerModel().enabled(); + } + + public List virtualNetworks() { + List inner = this.innerModel().virtualNetworks(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateAccessInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PrivateLinkResourcesWrapperImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PrivateLinkResourcesWrapperImpl.java new file mode 100644 index 0000000000000..6fe12492f589d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PrivateLinkResourcesWrapperImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkResourcesWrapper; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourcesWrapperImpl implements PrivateLinkResourcesWrapper { + private PrivateLinkResourcesWrapperInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + PrivateLinkResourcesWrapperImpl( + PrivateLinkResourcesWrapperInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 PrivateLinkResourcesWrapperInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessInfoImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessInfoImpl.java new file mode 100644 index 0000000000000..95dca9b3fb197 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessInfoImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessModuleInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessThreadInfoInner; +import com.azure.resourcemanager.appservice.generated.models.ProcessInfo; +import com.azure.resourcemanager.appservice.generated.models.ProcessModuleInfo; +import com.azure.resourcemanager.appservice.generated.models.ProcessThreadInfo; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +public final class ProcessInfoImpl implements ProcessInfo { + private ProcessInfoInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ProcessInfoImpl( + ProcessInfoInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Integer identifier() { + return this.innerModel().identifier(); + } + + public String deploymentName() { + return this.innerModel().deploymentName(); + } + + public String href() { + return this.innerModel().href(); + } + + public String minidump() { + return this.innerModel().minidump(); + } + + public Boolean isProfileRunning() { + return this.innerModel().isProfileRunning(); + } + + public Boolean isIisProfileRunning() { + return this.innerModel().isIisProfileRunning(); + } + + public Double iisProfileTimeoutInSeconds() { + return this.innerModel().iisProfileTimeoutInSeconds(); + } + + public String parent() { + return this.innerModel().parent(); + } + + public List children() { + List inner = this.innerModel().children(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List threads() { + List inner = this.innerModel().threads(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public List openFileHandles() { + List inner = this.innerModel().openFileHandles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List modules() { + List inner = this.innerModel().modules(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public String fileName() { + return this.innerModel().fileName(); + } + + public String commandLine() { + return this.innerModel().commandLine(); + } + + public String username() { + return this.innerModel().username(); + } + + public Integer handleCount() { + return this.innerModel().handleCount(); + } + + public Integer moduleCount() { + return this.innerModel().moduleCount(); + } + + public Integer threadCount() { + return this.innerModel().threadCount(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public String totalCpuTime() { + return this.innerModel().totalCpuTime(); + } + + public String userCpuTime() { + return this.innerModel().userCpuTime(); + } + + public String privilegedCpuTime() { + return this.innerModel().privilegedCpuTime(); + } + + public Long workingSet() { + return this.innerModel().workingSet(); + } + + public Long peakWorkingSet() { + return this.innerModel().peakWorkingSet(); + } + + public Long privateMemory() { + return this.innerModel().privateMemory(); + } + + public Long virtualMemory() { + return this.innerModel().virtualMemory(); + } + + public Long peakVirtualMemory() { + return this.innerModel().peakVirtualMemory(); + } + + public Long pagedSystemMemory() { + return this.innerModel().pagedSystemMemory(); + } + + public Long nonPagedSystemMemory() { + return this.innerModel().nonPagedSystemMemory(); + } + + public Long pagedMemory() { + return this.innerModel().pagedMemory(); + } + + public Long peakPagedMemory() { + return this.innerModel().peakPagedMemory(); + } + + public OffsetDateTime timestamp() { + return this.innerModel().timestamp(); + } + + public Map environmentVariables() { + Map inner = this.innerModel().environmentVariables(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Boolean isScmSite() { + return this.innerModel().isScmSite(); + } + + public Boolean isWebjob() { + return this.innerModel().isWebjob(); + } + + public String description() { + return this.innerModel().description(); + } + + public ProcessInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessModuleInfoImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessModuleInfoImpl.java new file mode 100644 index 0000000000000..af7ceffe6d76c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessModuleInfoImpl.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessModuleInfoInner; +import com.azure.resourcemanager.appservice.generated.models.ProcessModuleInfo; + +public final class ProcessModuleInfoImpl implements ProcessModuleInfo { + private ProcessModuleInfoInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ProcessModuleInfoImpl( + ProcessModuleInfoInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String baseAddress() { + return this.innerModel().baseAddress(); + } + + public String fileName() { + return this.innerModel().fileName(); + } + + public String href() { + return this.innerModel().href(); + } + + public String filePath() { + return this.innerModel().filePath(); + } + + public Integer moduleMemorySize() { + return this.innerModel().moduleMemorySize(); + } + + public String fileVersion() { + return this.innerModel().fileVersion(); + } + + public String fileDescription() { + return this.innerModel().fileDescription(); + } + + public String product() { + return this.innerModel().product(); + } + + public String productVersion() { + return this.innerModel().productVersion(); + } + + public Boolean isDebug() { + return this.innerModel().isDebug(); + } + + public String language() { + return this.innerModel().language(); + } + + public ProcessModuleInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessThreadInfoImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessThreadInfoImpl.java new file mode 100644 index 0000000000000..a62958e1512fe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProcessThreadInfoImpl.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessThreadInfoInner; +import com.azure.resourcemanager.appservice.generated.models.ProcessThreadInfo; +import java.time.OffsetDateTime; + +public final class ProcessThreadInfoImpl implements ProcessThreadInfo { + private ProcessThreadInfoInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ProcessThreadInfoImpl( + ProcessThreadInfoInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Integer identifier() { + return this.innerModel().identifier(); + } + + public String href() { + return this.innerModel().href(); + } + + public String process() { + return this.innerModel().process(); + } + + public String startAddress() { + return this.innerModel().startAddress(); + } + + public Integer currentPriority() { + return this.innerModel().currentPriority(); + } + + public String priorityLevel() { + return this.innerModel().priorityLevel(); + } + + public Integer basePriority() { + return this.innerModel().basePriority(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public String totalProcessorTime() { + return this.innerModel().totalProcessorTime(); + } + + public String userProcessorTime() { + return this.innerModel().userProcessorTime(); + } + + public String state() { + return this.innerModel().state(); + } + + public String waitReason() { + return this.innerModel().waitReason(); + } + + public ProcessThreadInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProvidersClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProvidersClientImpl.java new file mode 100644 index 0000000000000..0ed2410daa833 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProvidersClientImpl.java @@ -0,0 +1,1810 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.ProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApplicationStackResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionAppStackInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebAppStackInner; +import com.azure.resourcemanager.appservice.generated.models.ApplicationStackCollection; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationCollection; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.FunctionAppStackCollection; +import com.azure.resourcemanager.appservice.generated.models.ProviderOsTypeSelected; +import com.azure.resourcemanager.appservice.generated.models.ProviderStackOsType; +import com.azure.resourcemanager.appservice.generated.models.WebAppStackCollection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ProvidersClient. */ +public final class ProvidersClientImpl implements ProvidersClient { + private final ClientLogger logger = new ClientLogger(ProvidersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ProvidersService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of ProvidersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ProvidersClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(ProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientProviders to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface ProvidersService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/availableStacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAvailableStacks( + @HostParam("$host") String endpoint, + @QueryParam("osTypeSelected") ProviderOsTypeSelected osTypeSelected, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/functionAppStacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getFunctionAppStacks( + @HostParam("$host") String endpoint, + @QueryParam("stackOsType") ProviderStackOsType stackOsType, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/locations/{location}/functionAppStacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getFunctionAppStacksForLocation( + @HostParam("$host") String endpoint, + @PathParam("location") String location, + @QueryParam("stackOsType") ProviderStackOsType stackOsType, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/locations/{location}/webAppStacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getWebAppStacksForLocation( + @HostParam("$host") String endpoint, + @PathParam("location") String location, + @QueryParam("stackOsType") ProviderStackOsType stackOsType, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listOperations( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/webAppStacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getWebAppStacks( + @HostParam("$host") String endpoint, + @QueryParam("stackOsType") ProviderStackOsType stackOsType, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("osTypeSelected") ProviderOsTypeSelected osTypeSelected, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAvailableStacksNext( + @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> getFunctionAppStacksNext( + @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> getFunctionAppStacksForLocationNext( + @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> getWebAppStacksForLocationNext( + @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> listOperationsNext( + @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> getWebAppStacksNext( + @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> getAvailableStacksOnPremNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableStacksSinglePageAsync( + ProviderOsTypeSelected osTypeSelected) { + 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 + .getAvailableStacks( + this.client.getEndpoint(), osTypeSelected, 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())); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableStacksSinglePageAsync( + ProviderOsTypeSelected osTypeSelected, Context context) { + 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 + .getAvailableStacks(this.client.getEndpoint(), osTypeSelected, this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAvailableStacksAsync(ProviderOsTypeSelected osTypeSelected) { + return new PagedFlux<>( + () -> getAvailableStacksSinglePageAsync(osTypeSelected), + nextLink -> getAvailableStacksNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @throws 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAvailableStacksAsync() { + final ProviderOsTypeSelected osTypeSelected = null; + return new PagedFlux<>( + () -> getAvailableStacksSinglePageAsync(osTypeSelected), + nextLink -> getAvailableStacksNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAvailableStacksAsync( + ProviderOsTypeSelected osTypeSelected, Context context) { + return new PagedFlux<>( + () -> getAvailableStacksSinglePageAsync(osTypeSelected, context), + nextLink -> getAvailableStacksNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @throws 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getAvailableStacks() { + final ProviderOsTypeSelected osTypeSelected = null; + return new PagedIterable<>(getAvailableStacksAsync(osTypeSelected)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getAvailableStacks( + ProviderOsTypeSelected osTypeSelected, Context context) { + return new PagedIterable<>(getAvailableStacksAsync(osTypeSelected, context)); + } + + /** + * Description for Get available Function app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionAppStacksSinglePageAsync( + ProviderStackOsType stackOsType) { + 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 + .getFunctionAppStacks( + this.client.getEndpoint(), stackOsType, 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())); + } + + /** + * Description for Get available Function app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionAppStacksSinglePageAsync( + ProviderStackOsType stackOsType, Context context) { + 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 + .getFunctionAppStacks(this.client.getEndpoint(), stackOsType, this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get available Function app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getFunctionAppStacksAsync(ProviderStackOsType stackOsType) { + return new PagedFlux<>( + () -> getFunctionAppStacksSinglePageAsync(stackOsType), + nextLink -> getFunctionAppStacksNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available Function app frameworks and their versions. + * + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getFunctionAppStacksAsync() { + final ProviderStackOsType stackOsType = null; + return new PagedFlux<>( + () -> getFunctionAppStacksSinglePageAsync(stackOsType), + nextLink -> getFunctionAppStacksNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available Function app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getFunctionAppStacksAsync( + ProviderStackOsType stackOsType, Context context) { + return new PagedFlux<>( + () -> getFunctionAppStacksSinglePageAsync(stackOsType, context), + nextLink -> getFunctionAppStacksNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get available Function app frameworks and their versions. + * + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFunctionAppStacks() { + final ProviderStackOsType stackOsType = null; + return new PagedIterable<>(getFunctionAppStacksAsync(stackOsType)); + } + + /** + * Description for Get available Function app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFunctionAppStacks(ProviderStackOsType stackOsType, Context context) { + return new PagedIterable<>(getFunctionAppStacksAsync(stackOsType, context)); + } + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @param stackOsType Stack OS Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionAppStacksForLocationSinglePageAsync( + String location, ProviderStackOsType stackOsType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getFunctionAppStacksForLocation( + this.client.getEndpoint(), + location, + stackOsType, + 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())); + } + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionAppStacksForLocationSinglePageAsync( + String location, ProviderStackOsType stackOsType, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getFunctionAppStacksForLocation( + this.client.getEndpoint(), location, stackOsType, this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @param stackOsType Stack OS Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getFunctionAppStacksForLocationAsync( + String location, ProviderStackOsType stackOsType) { + return new PagedFlux<>( + () -> getFunctionAppStacksForLocationSinglePageAsync(location, stackOsType), + nextLink -> getFunctionAppStacksForLocationNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getFunctionAppStacksForLocationAsync(String location) { + final ProviderStackOsType stackOsType = null; + return new PagedFlux<>( + () -> getFunctionAppStacksForLocationSinglePageAsync(location, stackOsType), + nextLink -> getFunctionAppStacksForLocationNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getFunctionAppStacksForLocationAsync( + String location, ProviderStackOsType stackOsType, Context context) { + return new PagedFlux<>( + () -> getFunctionAppStacksForLocationSinglePageAsync(location, stackOsType, context), + nextLink -> getFunctionAppStacksForLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFunctionAppStacksForLocation(String location) { + final ProviderStackOsType stackOsType = null; + return new PagedIterable<>(getFunctionAppStacksForLocationAsync(location, stackOsType)); + } + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getFunctionAppStacksForLocation( + String location, ProviderStackOsType stackOsType, Context context) { + return new PagedIterable<>(getFunctionAppStacksForLocationAsync(location, stackOsType, context)); + } + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @param stackOsType Stack OS Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebAppStacksForLocationSinglePageAsync( + String location, ProviderStackOsType stackOsType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getWebAppStacksForLocation( + this.client.getEndpoint(), + location, + stackOsType, + 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())); + } + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebAppStacksForLocationSinglePageAsync( + String location, ProviderStackOsType stackOsType, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getWebAppStacksForLocation( + this.client.getEndpoint(), location, stackOsType, this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @param stackOsType Stack OS Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getWebAppStacksForLocationAsync( + String location, ProviderStackOsType stackOsType) { + return new PagedFlux<>( + () -> getWebAppStacksForLocationSinglePageAsync(location, stackOsType), + nextLink -> getWebAppStacksForLocationNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getWebAppStacksForLocationAsync(String location) { + final ProviderStackOsType stackOsType = null; + return new PagedFlux<>( + () -> getWebAppStacksForLocationSinglePageAsync(location, stackOsType), + nextLink -> getWebAppStacksForLocationNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getWebAppStacksForLocationAsync( + String location, ProviderStackOsType stackOsType, Context context) { + return new PagedFlux<>( + () -> getWebAppStacksForLocationSinglePageAsync(location, stackOsType, context), + nextLink -> getWebAppStacksForLocationNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getWebAppStacksForLocation(String location) { + final ProviderStackOsType stackOsType = null; + return new PagedIterable<>(getWebAppStacksForLocationAsync(location, stackOsType)); + } + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getWebAppStacksForLocation( + String location, ProviderStackOsType stackOsType, Context context) { + return new PagedIterable<>(getWebAppStacksForLocationAsync(location, stackOsType, context)); + } + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsSinglePageAsync() { + 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.listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsSinglePageAsync(Context context) { + 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 + .listOperations(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOperationsAsync() { + return new PagedFlux<>( + () -> listOperationsSinglePageAsync(), nextLink -> listOperationsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listOperationsAsync(Context context) { + return new PagedFlux<>( + () -> listOperationsSinglePageAsync(context), + nextLink -> listOperationsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperations() { + return new PagedIterable<>(listOperationsAsync()); + } + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listOperations(Context context) { + return new PagedIterable<>(listOperationsAsync(context)); + } + + /** + * Description for Get available Web app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebAppStacksSinglePageAsync(ProviderStackOsType stackOsType) { + 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 + .getWebAppStacks( + this.client.getEndpoint(), stackOsType, 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())); + } + + /** + * Description for Get available Web app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebAppStacksSinglePageAsync( + ProviderStackOsType stackOsType, Context context) { + 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 + .getWebAppStacks(this.client.getEndpoint(), stackOsType, this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get available Web app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getWebAppStacksAsync(ProviderStackOsType stackOsType) { + return new PagedFlux<>( + () -> getWebAppStacksSinglePageAsync(stackOsType), + nextLink -> getWebAppStacksNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available Web app frameworks and their versions. + * + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getWebAppStacksAsync() { + final ProviderStackOsType stackOsType = null; + return new PagedFlux<>( + () -> getWebAppStacksSinglePageAsync(stackOsType), + nextLink -> getWebAppStacksNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available Web app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getWebAppStacksAsync(ProviderStackOsType stackOsType, Context context) { + return new PagedFlux<>( + () -> getWebAppStacksSinglePageAsync(stackOsType, context), + nextLink -> getWebAppStacksNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get available Web app frameworks and their versions. + * + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getWebAppStacks() { + final ProviderStackOsType stackOsType = null; + return new PagedIterable<>(getWebAppStacksAsync(stackOsType)); + } + + /** + * Description for Get available Web app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getWebAppStacks(ProviderStackOsType stackOsType, Context context) { + return new PagedIterable<>(getWebAppStacksAsync(stackOsType, context)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + ProviderOsTypeSelected osTypeSelected) { + 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(), + osTypeSelected, + 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())); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + ProviderOsTypeSelected osTypeSelected, 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(), + osTypeSelected, + 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)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(ProviderOsTypeSelected osTypeSelected) { + return new PagedFlux<>( + () -> listSinglePageAsync(osTypeSelected), + nextLink -> getAvailableStacksOnPremNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @throws 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final ProviderOsTypeSelected osTypeSelected = null; + return new PagedFlux<>( + () -> listSinglePageAsync(osTypeSelected), + nextLink -> getAvailableStacksOnPremNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(ProviderOsTypeSelected osTypeSelected, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(osTypeSelected, context), + nextLink -> getAvailableStacksOnPremNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @throws 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final ProviderOsTypeSelected osTypeSelected = null; + return new PagedIterable<>(listAsync(osTypeSelected)); + } + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected 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 Application Stacks. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(ProviderOsTypeSelected osTypeSelected, Context context) { + return new PagedIterable<>(listAsync(osTypeSelected, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Application Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableStacksNextSinglePageAsync(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.getAvailableStacksNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Application Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableStacksNextSinglePageAsync( + 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 + .getAvailableStacksNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionAppStacksNextSinglePageAsync(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.getFunctionAppStacksNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionAppStacksNextSinglePageAsync( + 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 + .getFunctionAppStacksNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionAppStacksForLocationNextSinglePageAsync( + 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.getFunctionAppStacksForLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Function app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionAppStacksForLocationNextSinglePageAsync( + 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 + .getFunctionAppStacksForLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebAppStacksForLocationNextSinglePageAsync(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.getWebAppStacksForLocationNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebAppStacksForLocationNextSinglePageAsync( + 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 + .getWebAppStacksForLocationNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsNextSinglePageAsync(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.listOperationsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Azure resource manager operation metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listOperationsNextSinglePageAsync( + 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 + .listOperationsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebAppStacksNextSinglePageAsync(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.getWebAppStacksNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Web app Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebAppStacksNextSinglePageAsync(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 + .getWebAppStacksNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Application Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableStacksOnPremNextSinglePageAsync( + 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.getAvailableStacksOnPremNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Application Stacks. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAvailableStacksOnPremNextSinglePageAsync( + 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 + .getAvailableStacksOnPremNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProvidersImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProvidersImpl.java new file mode 100644 index 0000000000000..3bf7fa3c046fc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ProvidersImpl.java @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.ProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApplicationStackResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionAppStackInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebAppStackInner; +import com.azure.resourcemanager.appservice.generated.models.ApplicationStackResource; +import com.azure.resourcemanager.appservice.generated.models.CsmOperationDescription; +import com.azure.resourcemanager.appservice.generated.models.FunctionAppStack; +import com.azure.resourcemanager.appservice.generated.models.ProviderOsTypeSelected; +import com.azure.resourcemanager.appservice.generated.models.ProviderStackOsType; +import com.azure.resourcemanager.appservice.generated.models.Providers; +import com.azure.resourcemanager.appservice.generated.models.WebAppStack; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ProvidersImpl implements Providers { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProvidersImpl.class); + + private final ProvidersClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public ProvidersImpl( + ProvidersClient innerClient, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable getAvailableStacks() { + PagedIterable inner = this.serviceClient().getAvailableStacks(); + return Utils.mapPage(inner, inner1 -> new ApplicationStackResourceImpl(inner1, this.manager())); + } + + public PagedIterable getAvailableStacks( + ProviderOsTypeSelected osTypeSelected, Context context) { + PagedIterable inner = + this.serviceClient().getAvailableStacks(osTypeSelected, context); + return Utils.mapPage(inner, inner1 -> new ApplicationStackResourceImpl(inner1, this.manager())); + } + + public PagedIterable getFunctionAppStacks() { + PagedIterable inner = this.serviceClient().getFunctionAppStacks(); + return Utils.mapPage(inner, inner1 -> new FunctionAppStackImpl(inner1, this.manager())); + } + + public PagedIterable getFunctionAppStacks(ProviderStackOsType stackOsType, Context context) { + PagedIterable inner = this.serviceClient().getFunctionAppStacks(stackOsType, context); + return Utils.mapPage(inner, inner1 -> new FunctionAppStackImpl(inner1, this.manager())); + } + + public PagedIterable getFunctionAppStacksForLocation(String location) { + PagedIterable inner = this.serviceClient().getFunctionAppStacksForLocation(location); + return Utils.mapPage(inner, inner1 -> new FunctionAppStackImpl(inner1, this.manager())); + } + + public PagedIterable getFunctionAppStacksForLocation( + String location, ProviderStackOsType stackOsType, Context context) { + PagedIterable inner = + this.serviceClient().getFunctionAppStacksForLocation(location, stackOsType, context); + return Utils.mapPage(inner, inner1 -> new FunctionAppStackImpl(inner1, this.manager())); + } + + public PagedIterable getWebAppStacksForLocation(String location) { + PagedIterable inner = this.serviceClient().getWebAppStacksForLocation(location); + return Utils.mapPage(inner, inner1 -> new WebAppStackImpl(inner1, this.manager())); + } + + public PagedIterable getWebAppStacksForLocation( + String location, ProviderStackOsType stackOsType, Context context) { + PagedIterable inner = + this.serviceClient().getWebAppStacksForLocation(location, stackOsType, context); + return Utils.mapPage(inner, inner1 -> new WebAppStackImpl(inner1, this.manager())); + } + + public PagedIterable listOperations() { + PagedIterable inner = this.serviceClient().listOperations(); + return Utils.mapPage(inner, inner1 -> new CsmOperationDescriptionImpl(inner1, this.manager())); + } + + public PagedIterable listOperations(Context context) { + PagedIterable inner = this.serviceClient().listOperations(context); + return Utils.mapPage(inner, inner1 -> new CsmOperationDescriptionImpl(inner1, this.manager())); + } + + public PagedIterable getWebAppStacks() { + PagedIterable inner = this.serviceClient().getWebAppStacks(); + return Utils.mapPage(inner, inner1 -> new WebAppStackImpl(inner1, this.manager())); + } + + public PagedIterable getWebAppStacks(ProviderStackOsType stackOsType, Context context) { + PagedIterable inner = this.serviceClient().getWebAppStacks(stackOsType, context); + return Utils.mapPage(inner, inner1 -> new WebAppStackImpl(inner1, this.manager())); + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new ApplicationStackResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(ProviderOsTypeSelected osTypeSelected, Context context) { + PagedIterable inner = this.serviceClient().list(osTypeSelected, context); + return Utils.mapPage(inner, inner1 -> new ApplicationStackResourceImpl(inner1, this.manager())); + } + + private ProvidersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PublicCertificateImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PublicCertificateImpl.java new file mode 100644 index 0000000000000..53f51a8b29cfe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PublicCertificateImpl.java @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.PublicCertificateInner; +import com.azure.resourcemanager.appservice.generated.models.PublicCertificate; +import com.azure.resourcemanager.appservice.generated.models.PublicCertificateLocation; + +public final class PublicCertificateImpl + implements PublicCertificate, PublicCertificate.Definition, PublicCertificate.Update { + private PublicCertificateInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public byte[] blob() { + return this.innerModel().blob(); + } + + public PublicCertificateLocation publicCertificateLocation() { + return this.innerModel().publicCertificateLocation(); + } + + public String thumbprint() { + return this.innerModel().thumbprint(); + } + + public PublicCertificateInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String publicCertificateName; + + public PublicCertificateImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public PublicCertificate create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdatePublicCertificateWithResponse( + resourceGroupName, name, publicCertificateName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PublicCertificate create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdatePublicCertificateWithResponse( + resourceGroupName, name, publicCertificateName, this.innerModel(), context) + .getValue(); + return this; + } + + PublicCertificateImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new PublicCertificateInner(); + this.serviceManager = serviceManager; + this.publicCertificateName = name; + } + + public PublicCertificateImpl update() { + return this; + } + + public PublicCertificate apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdatePublicCertificateWithResponse( + resourceGroupName, name, publicCertificateName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public PublicCertificate apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdatePublicCertificateWithResponse( + resourceGroupName, name, publicCertificateName, this.innerModel(), context) + .getValue(); + return this; + } + + PublicCertificateImpl( + PublicCertificateInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + this.publicCertificateName = Utils.getValueFromIdByName(innerObject.id(), "publicCertificates"); + } + + public PublicCertificate refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getPublicCertificateWithResponse(resourceGroupName, name, publicCertificateName, Context.NONE) + .getValue(); + return this; + } + + public PublicCertificate refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getPublicCertificateWithResponse(resourceGroupName, name, publicCertificateName, context) + .getValue(); + return this; + } + + public PublicCertificateImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public PublicCertificateImpl withBlob(byte[] blob) { + this.innerModel().withBlob(blob); + return this; + } + + public PublicCertificateImpl withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation) { + this.innerModel().withPublicCertificateLocation(publicCertificateLocation); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PushSettingsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PushSettingsImpl.java new file mode 100644 index 0000000000000..f1e5c13f84422 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/PushSettingsImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner; +import com.azure.resourcemanager.appservice.generated.models.PushSettings; + +public final class PushSettingsImpl implements PushSettings { + private PushSettingsInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + PushSettingsImpl( + PushSettingsInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public boolean isPushEnabled() { + return this.innerModel().isPushEnabled(); + } + + public String tagWhitelistJson() { + return this.innerModel().tagWhitelistJson(); + } + + public String tagsRequiringAuth() { + return this.innerModel().tagsRequiringAuth(); + } + + public String dynamicTagsJson() { + return this.innerModel().dynamicTagsJson(); + } + + public PushSettingsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationImpl.java new file mode 100644 index 0000000000000..98be5a98d7f0e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationInner; +import com.azure.resourcemanager.appservice.generated.models.Channels; +import com.azure.resourcemanager.appservice.generated.models.NotificationLevel; +import com.azure.resourcemanager.appservice.generated.models.Recommendation; +import com.azure.resourcemanager.appservice.generated.models.ResourceScopeType; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +public final class RecommendationImpl implements Recommendation { + private RecommendationInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + RecommendationImpl( + RecommendationInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public OffsetDateTime creationTime() { + return this.innerModel().creationTime(); + } + + public UUID recommendationId() { + return this.innerModel().recommendationId(); + } + + public String resourceId() { + return this.innerModel().resourceId(); + } + + public ResourceScopeType resourceScope() { + return this.innerModel().resourceScope(); + } + + public String ruleName() { + return this.innerModel().ruleName(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String message() { + return this.innerModel().message(); + } + + public NotificationLevel level() { + return this.innerModel().level(); + } + + public Channels channels() { + return this.innerModel().channels(); + } + + public List categoryTags() { + List inner = this.innerModel().categoryTags(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String actionName() { + return this.innerModel().actionName(); + } + + public Integer enabled() { + return this.innerModel().enabled(); + } + + public List states() { + List inner = this.innerModel().states(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OffsetDateTime endTime() { + return this.innerModel().endTime(); + } + + public OffsetDateTime nextNotificationTime() { + return this.innerModel().nextNotificationTime(); + } + + public OffsetDateTime notificationExpirationTime() { + return this.innerModel().notificationExpirationTime(); + } + + public OffsetDateTime notifiedTime() { + return this.innerModel().notifiedTime(); + } + + public Double score() { + return this.innerModel().score(); + } + + public Boolean isDynamic() { + return this.innerModel().isDynamic(); + } + + public String extensionName() { + return this.innerModel().extensionName(); + } + + public String bladeName() { + return this.innerModel().bladeName(); + } + + public String forwardLink() { + return this.innerModel().forwardLink(); + } + + public RecommendationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationRuleImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationRuleImpl.java new file mode 100644 index 0000000000000..36d55af588c5a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationRuleImpl.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationRuleInner; +import com.azure.resourcemanager.appservice.generated.models.Channels; +import com.azure.resourcemanager.appservice.generated.models.NotificationLevel; +import com.azure.resourcemanager.appservice.generated.models.RecommendationRule; +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +public final class RecommendationRuleImpl implements RecommendationRule { + private RecommendationRuleInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + RecommendationRuleImpl( + RecommendationRuleInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String recommendationName() { + return this.innerModel().recommendationName(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String message() { + return this.innerModel().message(); + } + + public UUID recommendationId() { + return this.innerModel().recommendationId(); + } + + public String description() { + return this.innerModel().description(); + } + + public String actionName() { + return this.innerModel().actionName(); + } + + public NotificationLevel level() { + return this.innerModel().level(); + } + + public Channels channels() { + return this.innerModel().channels(); + } + + public List categoryTags() { + List inner = this.innerModel().categoryTags(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean isDynamic() { + return this.innerModel().isDynamic(); + } + + public String extensionName() { + return this.innerModel().extensionName(); + } + + public String bladeName() { + return this.innerModel().bladeName(); + } + + public String forwardLink() { + return this.innerModel().forwardLink(); + } + + public RecommendationRuleInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationsClientImpl.java new file mode 100644 index 0000000000000..0849ffa0e9413 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationsClientImpl.java @@ -0,0 +1,3495 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.RecommendationsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationRuleInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.RecommendationCollection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in RecommendationsClient. */ +public final class RecommendationsClientImpl implements RecommendationsClient { + private final ClientLogger logger = new ClientLogger(RecommendationsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final RecommendationsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of RecommendationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + RecommendationsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(RecommendationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientRecommendations to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface RecommendationsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("featured") Boolean featured, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resetAllFilters( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> disableRecommendationForSubscription( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @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.Web" + + "/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHistoryForHostingEnvironment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("hostingEnvironmentName") String hostingEnvironmentName, + @QueryParam("expiredOnly") Boolean expiredOnly, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{hostingEnvironmentName}/recommendations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listRecommendedRulesForHostingEnvironment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("hostingEnvironmentName") String hostingEnvironmentName, + @QueryParam("featured") Boolean featured, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> disableAllForHostingEnvironment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("environmentName") String environmentName, + @PathParam("hostingEnvironmentName") String hostingEnvironmentName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resetAllFiltersForHostingEnvironment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("environmentName") String environmentName, + @PathParam("hostingEnvironmentName") String hostingEnvironmentName, + @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.Web" + + "/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getRuleDetailsByHostingEnvironment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("hostingEnvironmentName") String hostingEnvironmentName, + @PathParam("name") String name, + @QueryParam("updateSeen") Boolean updateSeen, + @QueryParam("recommendationId") String recommendationId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web" + + "/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> disableRecommendationForHostingEnvironment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("environmentName") String environmentName, + @PathParam("name") String name, + @PathParam("hostingEnvironmentName") String hostingEnvironmentName, + @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.Web/sites" + + "/{siteName}/recommendationHistory") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHistoryForWebApp( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @QueryParam("expiredOnly") Boolean expiredOnly, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + + "/{siteName}/recommendations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listRecommendedRulesForWebApp( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @QueryParam("featured") Boolean featured, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + + "/{siteName}/recommendations/disable") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> disableAllForWebApp( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + + "/{siteName}/recommendations/reset") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resetAllFiltersForWebApp( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @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.Web/sites" + + "/{siteName}/recommendations/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getRuleDetailsByWebApp( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("name") String name, + @QueryParam("updateSeen") Boolean updateSeen, + @QueryParam("recommendationId") String recommendationId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites" + + "/{siteName}/recommendations/{name}/disable") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> disableRecommendationForSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("siteName") String siteName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHistoryForHostingEnvironmentNext( + @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> listRecommendedRulesForHostingEnvironmentNext( + @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> listHistoryForWebAppNext( + @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> listRecommendedRulesForWebAppNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Boolean featured, 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.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + featured, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + Boolean featured, 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.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + featured, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Boolean featured, String filter) { + return new PagedFlux<>( + () -> listSinglePageAsync(featured, filter), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for List all recommendations 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 collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final Boolean featured = null; + final String filter = null; + return new PagedFlux<>( + () -> listSinglePageAsync(featured, filter), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Boolean featured, String filter, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(featured, filter, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List all recommendations 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 collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final Boolean featured = null; + final String filter = null; + return new PagedIterable<>(listAsync(featured, filter)); + } + + /** + * Description for List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Boolean featured, String filter, Context context) { + return new PagedIterable<>(listAsync(featured, filter, context)); + } + + /** + * Description for Reset all recommendation opt-out settings 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetAllFiltersWithResponseAsync() { + 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 + .resetAllFilters( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Reset all recommendation opt-out settings 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetAllFiltersWithResponseAsync(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 + .resetAllFilters( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Reset all recommendation opt-out settings 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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetAllFiltersAsync() { + return resetAllFiltersWithResponseAsync().flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Reset all recommendation opt-out settings 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetAllFilters() { + resetAllFiltersAsync().block(); + } + + /** + * Description for Reset all recommendation opt-out settings 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 the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetAllFiltersWithResponse(Context context) { + return resetAllFiltersWithResponseAsync(context).block(); + } + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableRecommendationForSubscriptionWithResponseAsync(String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .disableRecommendationForSubscription( + this.client.getEndpoint(), + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableRecommendationForSubscriptionWithResponseAsync(String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .disableRecommendationForSubscription( + this.client.getEndpoint(), + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono disableRecommendationForSubscriptionAsync(String name) { + return disableRecommendationForSubscriptionWithResponseAsync(name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void disableRecommendationForSubscription(String name) { + disableRecommendationForSubscriptionAsync(name).block(); + } + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response disableRecommendationForSubscriptionWithResponse(String name, Context context) { + return disableRecommendationForSubscriptionWithResponseAsync(name, context).block(); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHistoryForHostingEnvironmentSinglePageAsync( + String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .listHistoryForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + hostingEnvironmentName, + expiredOnly, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHistoryForHostingEnvironmentSinglePageAsync( + String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .listHistoryForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + hostingEnvironmentName, + expiredOnly, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHistoryForHostingEnvironmentAsync( + String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter) { + return new PagedFlux<>( + () -> + listHistoryForHostingEnvironmentSinglePageAsync( + resourceGroupName, hostingEnvironmentName, expiredOnly, filter), + nextLink -> listHistoryForHostingEnvironmentNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting 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 collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHistoryForHostingEnvironmentAsync( + String resourceGroupName, String hostingEnvironmentName) { + final Boolean expiredOnly = null; + final String filter = null; + return new PagedFlux<>( + () -> + listHistoryForHostingEnvironmentSinglePageAsync( + resourceGroupName, hostingEnvironmentName, expiredOnly, filter), + nextLink -> listHistoryForHostingEnvironmentNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHistoryForHostingEnvironmentAsync( + String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter, Context context) { + return new PagedFlux<>( + () -> + listHistoryForHostingEnvironmentSinglePageAsync( + resourceGroupName, hostingEnvironmentName, expiredOnly, filter, context), + nextLink -> listHistoryForHostingEnvironmentNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting 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 collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHistoryForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName) { + final Boolean expiredOnly = null; + final String filter = null; + return new PagedIterable<>( + listHistoryForHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName, expiredOnly, filter)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHistoryForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter, Context context) { + return new PagedIterable<>( + listHistoryForHostingEnvironmentAsync( + resourceGroupName, hostingEnvironmentName, expiredOnly, filter, context)); + } + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendedRulesForHostingEnvironmentSinglePageAsync( + String resourceGroupName, String hostingEnvironmentName, Boolean featured, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .listRecommendedRulesForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + hostingEnvironmentName, + featured, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendedRulesForHostingEnvironmentSinglePageAsync( + String resourceGroupName, String hostingEnvironmentName, Boolean featured, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .listRecommendedRulesForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + hostingEnvironmentName, + featured, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendedRulesForHostingEnvironmentAsync( + String resourceGroupName, String hostingEnvironmentName, Boolean featured, String filter) { + return new PagedFlux<>( + () -> + listRecommendedRulesForHostingEnvironmentSinglePageAsync( + resourceGroupName, hostingEnvironmentName, featured, filter), + nextLink -> listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendedRulesForHostingEnvironmentAsync( + String resourceGroupName, String hostingEnvironmentName) { + final Boolean featured = null; + final String filter = null; + return new PagedFlux<>( + () -> + listRecommendedRulesForHostingEnvironmentSinglePageAsync( + resourceGroupName, hostingEnvironmentName, featured, filter), + nextLink -> listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendedRulesForHostingEnvironmentAsync( + String resourceGroupName, String hostingEnvironmentName, Boolean featured, String filter, Context context) { + return new PagedFlux<>( + () -> + listRecommendedRulesForHostingEnvironmentSinglePageAsync( + resourceGroupName, hostingEnvironmentName, featured, filter, context), + nextLink -> listRecommendedRulesForHostingEnvironmentNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendedRulesForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName) { + final Boolean featured = null; + final String filter = null; + return new PagedIterable<>( + listRecommendedRulesForHostingEnvironmentAsync( + resourceGroupName, hostingEnvironmentName, featured, filter)); + } + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendedRulesForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, Boolean featured, String filter, Context context) { + return new PagedIterable<>( + listRecommendedRulesForHostingEnvironmentAsync( + resourceGroupName, hostingEnvironmentName, featured, filter, context)); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableAllForHostingEnvironmentWithResponseAsync( + String resourceGroupName, String environmentName, String hostingEnvironmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .disableAllForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + environmentName, + hostingEnvironmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableAllForHostingEnvironmentWithResponseAsync( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .disableAllForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + environmentName, + hostingEnvironmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono disableAllForHostingEnvironmentAsync( + String resourceGroupName, String environmentName, String hostingEnvironmentName) { + return disableAllForHostingEnvironmentWithResponseAsync( + resourceGroupName, environmentName, hostingEnvironmentName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void disableAllForHostingEnvironment( + String resourceGroupName, String environmentName, String hostingEnvironmentName) { + disableAllForHostingEnvironmentAsync(resourceGroupName, environmentName, hostingEnvironmentName).block(); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response disableAllForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context) { + return disableAllForHostingEnvironmentWithResponseAsync( + resourceGroupName, environmentName, hostingEnvironmentName, context) + .block(); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetAllFiltersForHostingEnvironmentWithResponseAsync( + String resourceGroupName, String environmentName, String hostingEnvironmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .resetAllFiltersForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + environmentName, + hostingEnvironmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetAllFiltersForHostingEnvironmentWithResponseAsync( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() 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 (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .resetAllFiltersForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + environmentName, + hostingEnvironmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetAllFiltersForHostingEnvironmentAsync( + String resourceGroupName, String environmentName, String hostingEnvironmentName) { + return resetAllFiltersForHostingEnvironmentWithResponseAsync( + resourceGroupName, environmentName, hostingEnvironmentName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetAllFiltersForHostingEnvironment( + String resourceGroupName, String environmentName, String hostingEnvironmentName) { + resetAllFiltersForHostingEnvironmentAsync(resourceGroupName, environmentName, hostingEnvironmentName).block(); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetAllFiltersForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context) { + return resetAllFiltersForHostingEnvironmentWithResponseAsync( + resourceGroupName, environmentName, hostingEnvironmentName, context) + .block(); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRuleDetailsByHostingEnvironmentWithResponseAsync( + String resourceGroupName, + String hostingEnvironmentName, + String name, + Boolean updateSeen, + String recommendationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getRuleDetailsByHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + hostingEnvironmentName, + name, + updateSeen, + recommendationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRuleDetailsByHostingEnvironmentWithResponseAsync( + String resourceGroupName, + String hostingEnvironmentName, + String name, + Boolean updateSeen, + String recommendationId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getRuleDetailsByHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + hostingEnvironmentName, + name, + updateSeen, + recommendationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getRuleDetailsByHostingEnvironmentAsync( + String resourceGroupName, + String hostingEnvironmentName, + String name, + Boolean updateSeen, + String recommendationId) { + return getRuleDetailsByHostingEnvironmentWithResponseAsync( + resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getRuleDetailsByHostingEnvironmentAsync( + String resourceGroupName, String hostingEnvironmentName, String name) { + final Boolean updateSeen = null; + final String recommendationId = null; + return getRuleDetailsByHostingEnvironmentWithResponseAsync( + resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationRuleInner getRuleDetailsByHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, String name) { + final Boolean updateSeen = null; + final String recommendationId = null; + return getRuleDetailsByHostingEnvironmentAsync( + resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId) + .block(); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRuleDetailsByHostingEnvironmentWithResponse( + String resourceGroupName, + String hostingEnvironmentName, + String name, + Boolean updateSeen, + String recommendationId, + Context context) { + return getRuleDetailsByHostingEnvironmentWithResponseAsync( + resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId, context) + .block(); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableRecommendationForHostingEnvironmentWithResponseAsync( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .disableRecommendationForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + environmentName, + name, + hostingEnvironmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableRecommendationForHostingEnvironmentWithResponseAsync( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostingEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter hostingEnvironmentName is required 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 + .disableRecommendationForHostingEnvironment( + this.client.getEndpoint(), + resourceGroupName, + environmentName, + name, + hostingEnvironmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono disableRecommendationForHostingEnvironmentAsync( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName) { + return disableRecommendationForHostingEnvironmentWithResponseAsync( + resourceGroupName, environmentName, name, hostingEnvironmentName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void disableRecommendationForHostingEnvironment( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName) { + disableRecommendationForHostingEnvironmentAsync( + resourceGroupName, environmentName, name, hostingEnvironmentName) + .block(); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response disableRecommendationForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName, Context context) { + return disableRecommendationForHostingEnvironmentWithResponseAsync( + resourceGroupName, environmentName, name, hostingEnvironmentName, context) + .block(); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHistoryForWebAppSinglePageAsync( + String resourceGroupName, String siteName, Boolean expiredOnly, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .listHistoryForWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + expiredOnly, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHistoryForWebAppSinglePageAsync( + String resourceGroupName, String siteName, Boolean expiredOnly, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .listHistoryForWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + expiredOnly, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHistoryForWebAppAsync( + String resourceGroupName, String siteName, Boolean expiredOnly, String filter) { + return new PagedFlux<>( + () -> listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, expiredOnly, filter), + nextLink -> listHistoryForWebAppNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHistoryForWebAppAsync(String resourceGroupName, String siteName) { + final Boolean expiredOnly = null; + final String filter = null; + return new PagedFlux<>( + () -> listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, expiredOnly, filter), + nextLink -> listHistoryForWebAppNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHistoryForWebAppAsync( + String resourceGroupName, String siteName, Boolean expiredOnly, String filter, Context context) { + return new PagedFlux<>( + () -> listHistoryForWebAppSinglePageAsync(resourceGroupName, siteName, expiredOnly, filter, context), + nextLink -> listHistoryForWebAppNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHistoryForWebApp(String resourceGroupName, String siteName) { + final Boolean expiredOnly = null; + final String filter = null; + return new PagedIterable<>(listHistoryForWebAppAsync(resourceGroupName, siteName, expiredOnly, filter)); + } + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHistoryForWebApp( + String resourceGroupName, String siteName, Boolean expiredOnly, String filter, Context context) { + return new PagedIterable<>( + listHistoryForWebAppAsync(resourceGroupName, siteName, expiredOnly, filter, context)); + } + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendedRulesForWebAppSinglePageAsync( + String resourceGroupName, String siteName, Boolean featured, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .listRecommendedRulesForWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + featured, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendedRulesForWebAppSinglePageAsync( + String resourceGroupName, String siteName, Boolean featured, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .listRecommendedRulesForWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + featured, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendedRulesForWebAppAsync( + String resourceGroupName, String siteName, Boolean featured, String filter) { + return new PagedFlux<>( + () -> listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName, featured, filter), + nextLink -> listRecommendedRulesForWebAppNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendedRulesForWebAppAsync( + String resourceGroupName, String siteName) { + final Boolean featured = null; + final String filter = null; + return new PagedFlux<>( + () -> listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName, featured, filter), + nextLink -> listRecommendedRulesForWebAppNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRecommendedRulesForWebAppAsync( + String resourceGroupName, String siteName, Boolean featured, String filter, Context context) { + return new PagedFlux<>( + () -> listRecommendedRulesForWebAppSinglePageAsync(resourceGroupName, siteName, featured, filter, context), + nextLink -> listRecommendedRulesForWebAppNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendedRulesForWebApp(String resourceGroupName, String siteName) { + final Boolean featured = null; + final String filter = null; + return new PagedIterable<>(listRecommendedRulesForWebAppAsync(resourceGroupName, siteName, featured, filter)); + } + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 recommendations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRecommendedRulesForWebApp( + String resourceGroupName, String siteName, Boolean featured, String filter, Context context) { + return new PagedIterable<>( + listRecommendedRulesForWebAppAsync(resourceGroupName, siteName, featured, filter, context)); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableAllForWebAppWithResponseAsync(String resourceGroupName, String siteName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .disableAllForWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableAllForWebAppWithResponseAsync( + String resourceGroupName, String siteName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .disableAllForWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono disableAllForWebAppAsync(String resourceGroupName, String siteName) { + return disableAllForWebAppWithResponseAsync(resourceGroupName, siteName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void disableAllForWebApp(String resourceGroupName, String siteName) { + disableAllForWebAppAsync(resourceGroupName, siteName).block(); + } + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response disableAllForWebAppWithResponse(String resourceGroupName, String siteName, Context context) { + return disableAllForWebAppWithResponseAsync(resourceGroupName, siteName, context).block(); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetAllFiltersForWebAppWithResponseAsync(String resourceGroupName, String siteName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .resetAllFiltersForWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetAllFiltersForWebAppWithResponseAsync( + String resourceGroupName, String siteName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required 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 + .resetAllFiltersForWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetAllFiltersForWebAppAsync(String resourceGroupName, String siteName) { + return resetAllFiltersForWebAppWithResponseAsync(resourceGroupName, siteName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetAllFiltersForWebApp(String resourceGroupName, String siteName) { + resetAllFiltersForWebAppAsync(resourceGroupName, siteName).block(); + } + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetAllFiltersForWebAppWithResponse( + String resourceGroupName, String siteName, Context context) { + return resetAllFiltersForWebAppWithResponseAsync(resourceGroupName, siteName, context).block(); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRuleDetailsByWebAppWithResponseAsync( + String resourceGroupName, String siteName, String name, Boolean updateSeen, String recommendationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getRuleDetailsByWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + name, + updateSeen, + recommendationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRuleDetailsByWebAppWithResponseAsync( + String resourceGroupName, + String siteName, + String name, + Boolean updateSeen, + String recommendationId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getRuleDetailsByWebApp( + this.client.getEndpoint(), + resourceGroupName, + siteName, + name, + updateSeen, + recommendationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getRuleDetailsByWebAppAsync( + String resourceGroupName, String siteName, String name, Boolean updateSeen, String recommendationId) { + return getRuleDetailsByWebAppWithResponseAsync(resourceGroupName, siteName, name, updateSeen, recommendationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getRuleDetailsByWebAppAsync( + String resourceGroupName, String siteName, String name) { + final Boolean updateSeen = null; + final String recommendationId = null; + return getRuleDetailsByWebAppWithResponseAsync(resourceGroupName, siteName, name, updateSeen, recommendationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RecommendationRuleInner getRuleDetailsByWebApp(String resourceGroupName, String siteName, String name) { + final Boolean updateSeen = null; + final String recommendationId = null; + return getRuleDetailsByWebAppAsync(resourceGroupName, siteName, name, updateSeen, recommendationId).block(); + } + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRuleDetailsByWebAppWithResponse( + String resourceGroupName, + String siteName, + String name, + Boolean updateSeen, + String recommendationId, + Context context) { + return getRuleDetailsByWebAppWithResponseAsync( + resourceGroupName, siteName, name, updateSeen, recommendationId, context) + .block(); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableRecommendationForSiteWithResponseAsync( + String resourceGroupName, String siteName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .disableRecommendationForSite( + this.client.getEndpoint(), + resourceGroupName, + siteName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> disableRecommendationForSiteWithResponseAsync( + String resourceGroupName, String siteName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (siteName == null) { + return Mono.error(new IllegalArgumentException("Parameter siteName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .disableRecommendationForSite( + this.client.getEndpoint(), + resourceGroupName, + siteName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono disableRecommendationForSiteAsync(String resourceGroupName, String siteName, String name) { + return disableRecommendationForSiteWithResponseAsync(resourceGroupName, siteName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void disableRecommendationForSite(String resourceGroupName, String siteName, String name) { + disableRecommendationForSiteAsync(resourceGroupName, siteName, name).block(); + } + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response disableRecommendationForSiteWithResponse( + String resourceGroupName, String siteName, String name, Context context) { + return disableRecommendationForSiteWithResponseAsync(resourceGroupName, siteName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHistoryForHostingEnvironmentNextSinglePageAsync( + 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.listHistoryForHostingEnvironmentNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHistoryForHostingEnvironmentNextSinglePageAsync( + 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 + .listHistoryForHostingEnvironmentNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendedRulesForHostingEnvironmentNextSinglePageAsync( + 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 + .listRecommendedRulesForHostingEnvironmentNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendedRulesForHostingEnvironmentNextSinglePageAsync( + 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 + .listRecommendedRulesForHostingEnvironmentNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHistoryForWebAppNextSinglePageAsync(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.listHistoryForWebAppNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHistoryForWebAppNextSinglePageAsync( + 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 + .listHistoryForWebAppNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendedRulesForWebAppNextSinglePageAsync(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.listRecommendedRulesForWebAppNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of recommendations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRecommendedRulesForWebAppNextSinglePageAsync( + 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 + .listRecommendedRulesForWebAppNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationsImpl.java new file mode 100644 index 0000000000000..2fe78d4117067 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RecommendationsImpl.java @@ -0,0 +1,267 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.RecommendationsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationRuleInner; +import com.azure.resourcemanager.appservice.generated.models.Recommendation; +import com.azure.resourcemanager.appservice.generated.models.RecommendationRule; +import com.azure.resourcemanager.appservice.generated.models.Recommendations; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class RecommendationsImpl implements Recommendations { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationsImpl.class); + + private final RecommendationsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public RecommendationsImpl( + RecommendationsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public PagedIterable list(Boolean featured, String filter, Context context) { + PagedIterable inner = this.serviceClient().list(featured, filter, context); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public void resetAllFilters() { + this.serviceClient().resetAllFilters(); + } + + public Response resetAllFiltersWithResponse(Context context) { + return this.serviceClient().resetAllFiltersWithResponse(context); + } + + public void disableRecommendationForSubscription(String name) { + this.serviceClient().disableRecommendationForSubscription(name); + } + + public Response disableRecommendationForSubscriptionWithResponse(String name, Context context) { + return this.serviceClient().disableRecommendationForSubscriptionWithResponse(name, context); + } + + public PagedIterable listHistoryForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName) { + PagedIterable inner = + this.serviceClient().listHistoryForHostingEnvironment(resourceGroupName, hostingEnvironmentName); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listHistoryForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter, Context context) { + PagedIterable inner = + this + .serviceClient() + .listHistoryForHostingEnvironment( + resourceGroupName, hostingEnvironmentName, expiredOnly, filter, context); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listRecommendedRulesForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName) { + PagedIterable inner = + this.serviceClient().listRecommendedRulesForHostingEnvironment(resourceGroupName, hostingEnvironmentName); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listRecommendedRulesForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, Boolean featured, String filter, Context context) { + PagedIterable inner = + this + .serviceClient() + .listRecommendedRulesForHostingEnvironment( + resourceGroupName, hostingEnvironmentName, featured, filter, context); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public void disableAllForHostingEnvironment( + String resourceGroupName, String environmentName, String hostingEnvironmentName) { + this + .serviceClient() + .disableAllForHostingEnvironment(resourceGroupName, environmentName, hostingEnvironmentName); + } + + public Response disableAllForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context) { + return this + .serviceClient() + .disableAllForHostingEnvironmentWithResponse( + resourceGroupName, environmentName, hostingEnvironmentName, context); + } + + public void resetAllFiltersForHostingEnvironment( + String resourceGroupName, String environmentName, String hostingEnvironmentName) { + this + .serviceClient() + .resetAllFiltersForHostingEnvironment(resourceGroupName, environmentName, hostingEnvironmentName); + } + + public Response resetAllFiltersForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context) { + return this + .serviceClient() + .resetAllFiltersForHostingEnvironmentWithResponse( + resourceGroupName, environmentName, hostingEnvironmentName, context); + } + + public RecommendationRule getRuleDetailsByHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, String name) { + RecommendationRuleInner inner = + this.serviceClient().getRuleDetailsByHostingEnvironment(resourceGroupName, hostingEnvironmentName, name); + if (inner != null) { + return new RecommendationRuleImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getRuleDetailsByHostingEnvironmentWithResponse( + String resourceGroupName, + String hostingEnvironmentName, + String name, + Boolean updateSeen, + String recommendationId, + Context context) { + Response inner = + this + .serviceClient() + .getRuleDetailsByHostingEnvironmentWithResponse( + resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RecommendationRuleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void disableRecommendationForHostingEnvironment( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName) { + this + .serviceClient() + .disableRecommendationForHostingEnvironment( + resourceGroupName, environmentName, name, hostingEnvironmentName); + } + + public Response disableRecommendationForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName, Context context) { + return this + .serviceClient() + .disableRecommendationForHostingEnvironmentWithResponse( + resourceGroupName, environmentName, name, hostingEnvironmentName, context); + } + + public PagedIterable listHistoryForWebApp(String resourceGroupName, String siteName) { + PagedIterable inner = + this.serviceClient().listHistoryForWebApp(resourceGroupName, siteName); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listHistoryForWebApp( + String resourceGroupName, String siteName, Boolean expiredOnly, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listHistoryForWebApp(resourceGroupName, siteName, expiredOnly, filter, context); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listRecommendedRulesForWebApp(String resourceGroupName, String siteName) { + PagedIterable inner = + this.serviceClient().listRecommendedRulesForWebApp(resourceGroupName, siteName); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public PagedIterable listRecommendedRulesForWebApp( + String resourceGroupName, String siteName, Boolean featured, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listRecommendedRulesForWebApp(resourceGroupName, siteName, featured, filter, context); + return Utils.mapPage(inner, inner1 -> new RecommendationImpl(inner1, this.manager())); + } + + public void disableAllForWebApp(String resourceGroupName, String siteName) { + this.serviceClient().disableAllForWebApp(resourceGroupName, siteName); + } + + public Response disableAllForWebAppWithResponse(String resourceGroupName, String siteName, Context context) { + return this.serviceClient().disableAllForWebAppWithResponse(resourceGroupName, siteName, context); + } + + public void resetAllFiltersForWebApp(String resourceGroupName, String siteName) { + this.serviceClient().resetAllFiltersForWebApp(resourceGroupName, siteName); + } + + public Response resetAllFiltersForWebAppWithResponse( + String resourceGroupName, String siteName, Context context) { + return this.serviceClient().resetAllFiltersForWebAppWithResponse(resourceGroupName, siteName, context); + } + + public RecommendationRule getRuleDetailsByWebApp(String resourceGroupName, String siteName, String name) { + RecommendationRuleInner inner = this.serviceClient().getRuleDetailsByWebApp(resourceGroupName, siteName, name); + if (inner != null) { + return new RecommendationRuleImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getRuleDetailsByWebAppWithResponse( + String resourceGroupName, + String siteName, + String name, + Boolean updateSeen, + String recommendationId, + Context context) { + Response inner = + this + .serviceClient() + .getRuleDetailsByWebAppWithResponse( + resourceGroupName, siteName, name, updateSeen, recommendationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RecommendationRuleImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void disableRecommendationForSite(String resourceGroupName, String siteName, String name) { + this.serviceClient().disableRecommendationForSite(resourceGroupName, siteName, name); + } + + public Response disableRecommendationForSiteWithResponse( + String resourceGroupName, String siteName, String name, Context context) { + return this + .serviceClient() + .disableRecommendationForSiteWithResponse(resourceGroupName, siteName, name, context); + } + + private RecommendationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RelayServiceConnectionEntityImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RelayServiceConnectionEntityImpl.java new file mode 100644 index 0000000000000..8284eb998a85d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RelayServiceConnectionEntityImpl.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.RelayServiceConnectionEntityInner; +import com.azure.resourcemanager.appservice.generated.models.RelayServiceConnectionEntity; + +public final class RelayServiceConnectionEntityImpl + implements RelayServiceConnectionEntity, + RelayServiceConnectionEntity.Definition, + RelayServiceConnectionEntity.Update { + private RelayServiceConnectionEntityInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String entityName() { + return this.innerModel().entityName(); + } + + public String entityConnectionString() { + return this.innerModel().entityConnectionString(); + } + + public String resourceType() { + return this.innerModel().resourceType(); + } + + public String resourceConnectionString() { + return this.innerModel().resourceConnectionString(); + } + + public String hostname() { + return this.innerModel().hostname(); + } + + public Integer port() { + return this.innerModel().port(); + } + + public String biztalkUri() { + return this.innerModel().biztalkUri(); + } + + public RelayServiceConnectionEntityInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String entityName; + + public RelayServiceConnectionEntityImpl withExistingSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public RelayServiceConnectionEntity create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateRelayServiceConnectionWithResponse( + resourceGroupName, name, entityName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public RelayServiceConnectionEntity create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateRelayServiceConnectionWithResponse( + resourceGroupName, name, entityName, this.innerModel(), context) + .getValue(); + return this; + } + + RelayServiceConnectionEntityImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new RelayServiceConnectionEntityInner(); + this.serviceManager = serviceManager; + this.entityName = name; + } + + public RelayServiceConnectionEntityImpl update() { + return this; + } + + public RelayServiceConnectionEntity apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateRelayServiceConnectionWithResponse( + resourceGroupName, name, entityName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public RelayServiceConnectionEntity apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateRelayServiceConnectionWithResponse( + resourceGroupName, name, entityName, this.innerModel(), context) + .getValue(); + return this; + } + + RelayServiceConnectionEntityImpl( + RelayServiceConnectionEntityInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + this.entityName = Utils.getValueFromIdByName(innerObject.id(), "hybridconnection"); + } + + public RelayServiceConnectionEntity refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getRelayServiceConnectionWithResponse(resourceGroupName, name, entityName, Context.NONE) + .getValue(); + return this; + } + + public RelayServiceConnectionEntity refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getRelayServiceConnectionWithResponse(resourceGroupName, name, entityName, context) + .getValue(); + return this; + } + + public RelayServiceConnectionEntityImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public RelayServiceConnectionEntityImpl withEntityName(String entityName) { + this.innerModel().withEntityName(entityName); + return this; + } + + public RelayServiceConnectionEntityImpl withEntityConnectionString(String entityConnectionString) { + this.innerModel().withEntityConnectionString(entityConnectionString); + return this; + } + + public RelayServiceConnectionEntityImpl withResourceType(String resourceType) { + this.innerModel().withResourceType(resourceType); + return this; + } + + public RelayServiceConnectionEntityImpl withResourceConnectionString(String resourceConnectionString) { + this.innerModel().withResourceConnectionString(resourceConnectionString); + return this; + } + + public RelayServiceConnectionEntityImpl withHostname(String hostname) { + this.innerModel().withHostname(hostname); + return this; + } + + public RelayServiceConnectionEntityImpl withPort(Integer port) { + this.innerModel().withPort(port); + return this; + } + + public RelayServiceConnectionEntityImpl withBiztalkUri(String biztalkUri) { + this.innerModel().withBiztalkUri(biztalkUri); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RemotePrivateEndpointConnectionArmResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RemotePrivateEndpointConnectionArmResourceImpl.java new file mode 100644 index 0000000000000..dc0b685911e68 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RemotePrivateEndpointConnectionArmResourceImpl.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.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.models.ArmIdWrapper; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; +import com.azure.resourcemanager.appservice.generated.models.RemotePrivateEndpointConnectionArmResource; +import java.util.Collections; +import java.util.List; + +public final class RemotePrivateEndpointConnectionArmResourceImpl + implements RemotePrivateEndpointConnectionArmResource, + RemotePrivateEndpointConnectionArmResource.Definition, + RemotePrivateEndpointConnectionArmResource.Update { + private RemotePrivateEndpointConnectionArmResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public ArmIdWrapper privateEndpoint() { + return this.innerModel().privateEndpoint(); + } + + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.innerModel().privateLinkServiceConnectionState(); + } + + public List ipAddresses() { + List inner = this.innerModel().ipAddresses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public RemotePrivateEndpointConnectionArmResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String privateEndpointConnectionName; + + private PrivateLinkConnectionApprovalRequestResource createPrivateEndpointWrapper; + + private PrivateLinkConnectionApprovalRequestResource updatePrivateEndpointWrapper; + + public RemotePrivateEndpointConnectionArmResourceImpl withExistingHostingEnvironment( + String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public RemotePrivateEndpointConnectionArmResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .approveOrRejectPrivateEndpointConnection( + resourceGroupName, name, privateEndpointConnectionName, createPrivateEndpointWrapper, Context.NONE); + return this; + } + + public RemotePrivateEndpointConnectionArmResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .approveOrRejectPrivateEndpointConnection( + resourceGroupName, name, privateEndpointConnectionName, createPrivateEndpointWrapper, context); + return this; + } + + RemotePrivateEndpointConnectionArmResourceImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new RemotePrivateEndpointConnectionArmResourceInner(); + this.serviceManager = serviceManager; + this.privateEndpointConnectionName = name; + this.createPrivateEndpointWrapper = new PrivateLinkConnectionApprovalRequestResource(); + } + + public RemotePrivateEndpointConnectionArmResourceImpl update() { + this.updatePrivateEndpointWrapper = new PrivateLinkConnectionApprovalRequestResource(); + return this; + } + + public RemotePrivateEndpointConnectionArmResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .approveOrRejectPrivateEndpointConnection( + resourceGroupName, name, privateEndpointConnectionName, updatePrivateEndpointWrapper, Context.NONE); + return this; + } + + public RemotePrivateEndpointConnectionArmResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .approveOrRejectPrivateEndpointConnection( + resourceGroupName, name, privateEndpointConnectionName, updatePrivateEndpointWrapper, context); + return this; + } + + RemotePrivateEndpointConnectionArmResourceImpl( + RemotePrivateEndpointConnectionArmResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "hostingEnvironments"); + this.privateEndpointConnectionName = Utils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + } + + public RemotePrivateEndpointConnectionArmResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .getPrivateEndpointConnectionWithResponse( + resourceGroupName, name, privateEndpointConnectionName, Context.NONE) + .getValue(); + return this; + } + + public RemotePrivateEndpointConnectionArmResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .getPrivateEndpointConnectionWithResponse( + resourceGroupName, name, privateEndpointConnectionName, context) + .getValue(); + return this; + } + + public RemotePrivateEndpointConnectionArmResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.createPrivateEndpointWrapper.withKind(kind); + return this; + } else { + this.updatePrivateEndpointWrapper.withKind(kind); + return this; + } + } + + public RemotePrivateEndpointConnectionArmResourceImpl withPrivateLinkServiceConnectionState( + PrivateLinkConnectionState privateLinkServiceConnectionState) { + if (isInCreateMode()) { + this.createPrivateEndpointWrapper.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } else { + this.updatePrivateEndpointWrapper.withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadataImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadataImpl.java new file mode 100644 index 0000000000000..7654e6da59a17 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadataImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceHealthMetadataInner; +import com.azure.resourcemanager.appservice.generated.models.ResourceHealthMetadata; + +public final class ResourceHealthMetadataImpl implements ResourceHealthMetadata { + private ResourceHealthMetadataInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ResourceHealthMetadataImpl( + ResourceHealthMetadataInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String category() { + return this.innerModel().category(); + } + + public Boolean signalAvailability() { + return this.innerModel().signalAvailability(); + } + + public ResourceHealthMetadataInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadatasClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadatasClientImpl.java new file mode 100644 index 0000000000000..8c42b92feb81e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadatasClientImpl.java @@ -0,0 +1,1469 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.ResourceHealthMetadatasClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceHealthMetadataInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.ResourceHealthMetadataCollection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ResourceHealthMetadatasClient. */ +public final class ResourceHealthMetadatasClientImpl implements ResourceHealthMetadatasClient { + private final ClientLogger logger = new ClientLogger(ResourceHealthMetadatasClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ResourceHealthMetadatasService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of ResourceHealthMetadatasClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ResourceHealthMetadatasClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy + .create(ResourceHealthMetadatasService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientResourceHealthMetadatas to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface ResourceHealthMetadatasService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata") + @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.Web" + + "/resourceHealthMetadata") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.Web/sites/{name}" + + "/resourceHealthMetadata") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBySite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/resourceHealthMetadata/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getBySite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/slots/{slot}/resourceHealthMetadata") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBySiteSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/resourceHealthMetadata/default") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getBySiteSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBySiteNext( + @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> listBySiteSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the 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 collection of resource health metadata. + */ + @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())); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the 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 collection of resource health metadata. + */ + @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)); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the 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 collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the 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 collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the 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 collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the 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 collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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())); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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)); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySiteSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listBySite( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySiteSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listBySite( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySiteAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listBySiteSinglePageAsync(resourceGroupName, name), + nextLink -> listBySiteNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySiteAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listBySiteSinglePageAsync(resourceGroupName, name, context), + nextLink -> listBySiteNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySite(String resourceGroupName, String name) { + return new PagedIterable<>(listBySiteAsync(resourceGroupName, name)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySite( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listBySiteAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBySiteWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getBySite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBySiteWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getBySite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBySiteAsync(String resourceGroupName, String name) { + return getBySiteWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceHealthMetadataInner getBySite(String resourceGroupName, String name) { + return getBySiteAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBySiteWithResponse( + String resourceGroupName, String name, Context context) { + return getBySiteWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySiteSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listBySiteSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySiteSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listBySiteSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySiteSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listBySiteSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listBySiteSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBySiteSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listBySiteSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listBySiteSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySiteSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listBySiteSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 resource health metadata. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBySiteSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listBySiteSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBySiteSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getBySiteSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBySiteSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getBySiteSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBySiteSlotAsync(String resourceGroupName, String name, String slot) { + return getBySiteSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceHealthMetadataInner getBySiteSlot(String resourceGroupName, String name, String slot) { + return getBySiteSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBySiteSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getBySiteSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySiteNextSinglePageAsync(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.listBySiteNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySiteNextSinglePageAsync( + 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 + .listBySiteNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySiteSlotNextSinglePageAsync(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.listBySiteSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of resource health metadata. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySiteSlotNextSinglePageAsync( + 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 + .listBySiteSlotNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadatasImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadatasImpl.java new file mode 100644 index 0000000000000..ebbebe6d5c634 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceHealthMetadatasImpl.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.ResourceHealthMetadatasClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceHealthMetadataInner; +import com.azure.resourcemanager.appservice.generated.models.ResourceHealthMetadata; +import com.azure.resourcemanager.appservice.generated.models.ResourceHealthMetadatas; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ResourceHealthMetadatasImpl implements ResourceHealthMetadatas { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceHealthMetadatasImpl.class); + + private final ResourceHealthMetadatasClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public ResourceHealthMetadatasImpl( + ResourceHealthMetadatasClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new ResourceHealthMetadataImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new ResourceHealthMetadataImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new ResourceHealthMetadataImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new ResourceHealthMetadataImpl(inner1, this.manager())); + } + + public PagedIterable listBySite(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listBySite(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new ResourceHealthMetadataImpl(inner1, this.manager())); + } + + public PagedIterable listBySite(String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listBySite(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new ResourceHealthMetadataImpl(inner1, this.manager())); + } + + public ResourceHealthMetadata getBySite(String resourceGroupName, String name) { + ResourceHealthMetadataInner inner = this.serviceClient().getBySite(resourceGroupName, name); + if (inner != null) { + return new ResourceHealthMetadataImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getBySiteWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getBySiteWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ResourceHealthMetadataImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listBySiteSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listBySiteSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new ResourceHealthMetadataImpl(inner1, this.manager())); + } + + public PagedIterable listBySiteSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listBySiteSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new ResourceHealthMetadataImpl(inner1, this.manager())); + } + + public ResourceHealthMetadata getBySiteSlot(String resourceGroupName, String name, String slot) { + ResourceHealthMetadataInner inner = this.serviceClient().getBySiteSlot(resourceGroupName, name, slot); + if (inner != null) { + return new ResourceHealthMetadataImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getBySiteSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getBySiteSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ResourceHealthMetadataImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private ResourceHealthMetadatasClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceMetricDefinitionImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceMetricDefinitionImpl.java new file mode 100644 index 0000000000000..6833b60b66680 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceMetricDefinitionImpl.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceMetricDefinitionInner; +import com.azure.resourcemanager.appservice.generated.models.ResourceMetricAvailability; +import com.azure.resourcemanager.appservice.generated.models.ResourceMetricDefinition; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ResourceMetricDefinitionImpl implements ResourceMetricDefinition { + private ResourceMetricDefinitionInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ResourceMetricDefinitionImpl( + ResourceMetricDefinitionInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String unit() { + return this.innerModel().unit(); + } + + public String primaryAggregationType() { + return this.innerModel().primaryAggregationType(); + } + + public List metricAvailabilities() { + List inner = this.innerModel().metricAvailabilities(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceUri() { + return this.innerModel().resourceUri(); + } + + public Map properties() { + Map inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ResourceMetricDefinitionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceNameAvailabilityImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceNameAvailabilityImpl.java new file mode 100644 index 0000000000000..6c865b52f44de --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceNameAvailabilityImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceNameAvailabilityInner; +import com.azure.resourcemanager.appservice.generated.models.InAvailabilityReasonType; +import com.azure.resourcemanager.appservice.generated.models.ResourceNameAvailability; + +public final class ResourceNameAvailabilityImpl implements ResourceNameAvailability { + private ResourceNameAvailabilityInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ResourceNameAvailabilityImpl( + ResourceNameAvailabilityInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Boolean nameAvailable() { + return this.innerModel().nameAvailable(); + } + + public InAvailabilityReasonType reason() { + return this.innerModel().reason(); + } + + public String message() { + return this.innerModel().message(); + } + + public ResourceNameAvailabilityInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceProvidersClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceProvidersClientImpl.java new file mode 100644 index 0000000000000..c0515af2c3126 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceProvidersClientImpl.java @@ -0,0 +1,3194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.BodyParam; +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.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.ResourceProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.BillingMeterInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameSitesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentLocationsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.GeoRegionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnOfferInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceNameAvailabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfosInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SourceControlInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ValidateResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetValidationFailureDetailsInner; +import com.azure.resourcemanager.appservice.generated.models.BillingMeterCollection; +import com.azure.resourcemanager.appservice.generated.models.CsmMoveResourceEnvelope; +import com.azure.resourcemanager.appservice.generated.models.CustomHostnameSitesCollection; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.GeoRegionCollection; +import com.azure.resourcemanager.appservice.generated.models.IdentifierCollection; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOnOfferCollection; +import com.azure.resourcemanager.appservice.generated.models.ResourceNameAvailabilityRequest; +import com.azure.resourcemanager.appservice.generated.models.SkuName; +import com.azure.resourcemanager.appservice.generated.models.SourceControlCollection; +import com.azure.resourcemanager.appservice.generated.models.ValidateRequest; +import com.azure.resourcemanager.appservice.generated.models.VnetParameters; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ +public final class ResourceProvidersClientImpl implements ResourceProvidersClient { + private final ClientLogger logger = new ClientLogger(ResourceProvidersClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ResourceProvidersService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of ResourceProvidersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ResourceProvidersClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientResourceProviders to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface ResourceProvidersService { + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/publishingUsers/web") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPublishingUser( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/providers/Microsoft.Web/publishingUsers/web") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updatePublishingUser( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UserInner userDetails, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/sourcecontrols") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSourceControls( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSourceControl( + @HostParam("$host") String endpoint, + @PathParam("sourceControlType") String sourceControlType, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/providers/Microsoft.Web/sourcecontrols/{sourceControlType}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSourceControl( + @HostParam("$host") String endpoint, + @PathParam("sourceControlType") String sourceControlType, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SourceControlInner requestMessage, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("billingLocation") String billingLocation, + @QueryParam("osType") String osType, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> checkNameAvailability( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ResourceNameAvailabilityRequest request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listCustomHostnameSites( + @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}/providers/Microsoft.Web/deploymentLocations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSubscriptionDeploymentLocations( + @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}/providers/Microsoft.Web/geoRegions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listGeoRegions( + @HostParam("$host") String endpoint, + @QueryParam("sku") SkuName sku, + @QueryParam("linuxWorkersEnabled") Boolean linuxWorkersEnabled, + @QueryParam("xenonWorkersEnabled") Boolean xenonWorkersEnabled, + @QueryParam("linuxDynamicWorkersEnabled") Boolean linuxDynamicWorkersEnabled, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteIdentifiersAssignedToHostname( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") NameIdentifierInner nameIdentifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listPremierAddOnOffers( + @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}/providers/Microsoft.Web/skus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSkus( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> verifyHostingEnvironmentVnet( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetParameters parameters, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> move( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmMoveResourceEnvelope moveResourceEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> validate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ValidateRequest validateRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> validateMove( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmMoveResourceEnvelope moveResourceEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSourceControlsNext( + @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> listBillingMetersNext( + @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> listCustomHostnameSitesNext( + @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> listGeoRegionsNext( + @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> listSiteIdentifiersAssignedToHostnameNext( + @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> listPremierAddOnOffersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Gets publishing user. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPublishingUserWithResponseAsync() { + 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.getPublishingUser(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets publishing user. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPublishingUserWithResponseAsync(Context context) { + 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.getPublishingUser(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + } + + /** + * Description for Gets publishing user. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPublishingUserAsync() { + return getPublishingUserWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets publishing user. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserInner getPublishingUser() { + return getPublishingUserAsync().block(); + } + + /** + * Description for Gets publishing user. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPublishingUserWithResponse(Context context) { + return getPublishingUserWithResponseAsync(context).block(); + } + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updatePublishingUserWithResponseAsync(UserInner userDetails) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (userDetails == null) { + return Mono.error(new IllegalArgumentException("Parameter userDetails is required and cannot be null.")); + } else { + userDetails.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updatePublishingUser( + this.client.getEndpoint(), this.client.getApiVersion(), userDetails, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updatePublishingUserWithResponseAsync(UserInner userDetails, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (userDetails == null) { + return Mono.error(new IllegalArgumentException("Parameter userDetails is required and cannot be null.")); + } else { + userDetails.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updatePublishingUser(this.client.getEndpoint(), this.client.getApiVersion(), userDetails, accept, context); + } + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updatePublishingUserAsync(UserInner userDetails) { + return updatePublishingUserWithResponseAsync(userDetails) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserInner updatePublishingUser(UserInner userDetails) { + return updatePublishingUserAsync(userDetails).block(); + } + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updatePublishingUserWithResponse(UserInner userDetails, Context context) { + return updatePublishingUserWithResponseAsync(userDetails, context).block(); + } + + /** + * Description for Gets the source controls available for Azure websites. + * + * @throws 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 source controls. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSourceControlsSinglePageAsync() { + 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.listSourceControls(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the source controls available for Azure websites. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 source controls. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSourceControlsSinglePageAsync(Context context) { + 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 + .listSourceControls(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Gets the source controls available for Azure websites. + * + * @throws 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 source controls. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSourceControlsAsync() { + return new PagedFlux<>( + () -> listSourceControlsSinglePageAsync(), nextLink -> listSourceControlsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the source controls available for Azure websites. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 source controls. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSourceControlsAsync(Context context) { + return new PagedFlux<>( + () -> listSourceControlsSinglePageAsync(context), + nextLink -> listSourceControlsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the source controls available for Azure websites. + * + * @throws 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 source controls. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSourceControls() { + return new PagedIterable<>(listSourceControlsAsync()); + } + + /** + * Description for Gets the source controls available for Azure websites. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 source controls. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSourceControls(Context context) { + return new PagedIterable<>(listSourceControlsAsync(context)); + } + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSourceControlWithResponseAsync(String sourceControlType) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (sourceControlType == null) { + return Mono + .error(new IllegalArgumentException("Parameter sourceControlType is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getSourceControl( + this.client.getEndpoint(), sourceControlType, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSourceControlWithResponseAsync( + String sourceControlType, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (sourceControlType == null) { + return Mono + .error(new IllegalArgumentException("Parameter sourceControlType is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getSourceControl( + this.client.getEndpoint(), sourceControlType, this.client.getApiVersion(), accept, context); + } + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSourceControlAsync(String sourceControlType) { + return getSourceControlWithResponseAsync(sourceControlType) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SourceControlInner getSourceControl(String sourceControlType) { + return getSourceControlAsync(sourceControlType).block(); + } + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSourceControlWithResponse(String sourceControlType, Context context) { + return getSourceControlWithResponseAsync(sourceControlType, context).block(); + } + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSourceControlWithResponseAsync( + String sourceControlType, SourceControlInner requestMessage) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (sourceControlType == null) { + return Mono + .error(new IllegalArgumentException("Parameter sourceControlType is required and cannot be null.")); + } + if (requestMessage == null) { + return Mono.error(new IllegalArgumentException("Parameter requestMessage is required and cannot be null.")); + } else { + requestMessage.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSourceControl( + this.client.getEndpoint(), + sourceControlType, + this.client.getApiVersion(), + requestMessage, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSourceControlWithResponseAsync( + String sourceControlType, SourceControlInner requestMessage, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (sourceControlType == null) { + return Mono + .error(new IllegalArgumentException("Parameter sourceControlType is required and cannot be null.")); + } + if (requestMessage == null) { + return Mono.error(new IllegalArgumentException("Parameter requestMessage is required and cannot be null.")); + } else { + requestMessage.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSourceControl( + this.client.getEndpoint(), + sourceControlType, + this.client.getApiVersion(), + requestMessage, + accept, + context); + } + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSourceControlAsync( + String sourceControlType, SourceControlInner requestMessage) { + return updateSourceControlWithResponseAsync(sourceControlType, requestMessage) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SourceControlInner updateSourceControl(String sourceControlType, SourceControlInner requestMessage) { + return updateSourceControlAsync(sourceControlType, requestMessage).block(); + } + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSourceControlWithResponse( + String sourceControlType, SourceControlInner requestMessage, Context context) { + return updateSourceControlWithResponseAsync(sourceControlType, requestMessage, context).block(); + } + + /** + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource. + * @param osType App Service OS type meters used for. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String billingLocation, String osType) { + 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(), + billingLocation, + osType, + 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())); + } + + /** + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource. + * @param osType App Service OS type meters used for. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String billingLocation, String osType, 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(), + billingLocation, + osType, + 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)); + } + + /** + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource. + * @param osType App Service OS type meters used for. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String billingLocation, String osType) { + return new PagedFlux<>( + () -> listSinglePageAsync(billingLocation, osType), + nextLink -> listBillingMetersNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets a list of meters for a given location. + * + * @throws 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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + final String billingLocation = null; + final String osType = null; + return new PagedFlux<>( + () -> listSinglePageAsync(billingLocation, osType), + nextLink -> listBillingMetersNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource. + * @param osType App Service OS type meters used for. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String billingLocation, String osType, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(billingLocation, osType, context), + nextLink -> listBillingMetersNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets a list of meters for a given location. + * + * @throws 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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + final String billingLocation = null; + final String osType = null; + return new PagedIterable<>(listAsync(billingLocation, osType)); + } + + /** + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource. + * @param osType App Service OS type meters used for. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Billing Meters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String billingLocation, String osType, Context context) { + return new PagedIterable<>(listAsync(billingLocation, osType, context)); + } + + /** + * Description for Check if a resource name is available. + * + * @param request Name 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 information regarding availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + ResourceNameAvailabilityRequest request) { + 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Check if a resource name is available. + * + * @param request 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 information regarding availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + ResourceNameAvailabilityRequest request, 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .checkNameAvailability( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Check if a resource name is available. + * + * @param request Name 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 information regarding availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono checkNameAvailabilityAsync(ResourceNameAvailabilityRequest request) { + return checkNameAvailabilityWithResponseAsync(request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Check if a resource name is available. + * + * @param request Name 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 information regarding availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ResourceNameAvailabilityInner checkNameAvailability(ResourceNameAvailabilityRequest request) { + return checkNameAvailabilityAsync(request).block(); + } + + /** + * Description for Check if a resource name is available. + * + * @param request 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 information regarding availability of a resource name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response checkNameAvailabilityWithResponse( + ResourceNameAvailabilityRequest request, Context context) { + return checkNameAvailabilityWithResponseAsync(request, context).block(); + } + + /** + * Get custom hostnames under this 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 custom hostnames under this subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCustomHostnameSitesSinglePageAsync() { + 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 + .listCustomHostnameSites( + 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 custom hostnames under this 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 custom hostnames under this subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCustomHostnameSitesSinglePageAsync(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 + .listCustomHostnameSites( + 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 custom hostnames under this 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 custom hostnames under this subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listCustomHostnameSitesAsync() { + return new PagedFlux<>( + () -> listCustomHostnameSitesSinglePageAsync(), + nextLink -> listCustomHostnameSitesNextSinglePageAsync(nextLink)); + } + + /** + * Get custom hostnames under this 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 custom hostnames under this subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listCustomHostnameSitesAsync(Context context) { + return new PagedFlux<>( + () -> listCustomHostnameSitesSinglePageAsync(context), + nextLink -> listCustomHostnameSitesNextSinglePageAsync(nextLink, context)); + } + + /** + * Get custom hostnames under this 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 custom hostnames under this subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCustomHostnameSites() { + return new PagedIterable<>(listCustomHostnameSitesAsync()); + } + + /** + * Get custom hostnames under this 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 custom hostnames under this subscription. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCustomHostnameSites(Context context) { + return new PagedIterable<>(listCustomHostnameSitesAsync(context)); + } + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSubscriptionDeploymentLocationsWithResponseAsync() { + 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 + .getSubscriptionDeploymentLocations( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSubscriptionDeploymentLocationsWithResponseAsync( + 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 + .getSubscriptionDeploymentLocations( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSubscriptionDeploymentLocationsAsync() { + return getSubscriptionDeploymentLocationsWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentLocationsInner getSubscriptionDeploymentLocations() { + return getSubscriptionDeploymentLocationsAsync().block(); + } + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSubscriptionDeploymentLocationsWithResponse(Context context) { + return getSubscriptionDeploymentLocationsWithResponseAsync(context).block(); + } + + /** + * Description for Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions + * that support Linux Consumption Workers. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGeoRegionsSinglePageAsync( + SkuName sku, Boolean linuxWorkersEnabled, Boolean xenonWorkersEnabled, Boolean linuxDynamicWorkersEnabled) { + 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 + .listGeoRegions( + this.client.getEndpoint(), + sku, + linuxWorkersEnabled, + xenonWorkersEnabled, + linuxDynamicWorkersEnabled, + 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())); + } + + /** + * Description for Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions + * that support Linux Consumption Workers. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGeoRegionsSinglePageAsync( + SkuName sku, + Boolean linuxWorkersEnabled, + Boolean xenonWorkersEnabled, + Boolean linuxDynamicWorkersEnabled, + 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 + .listGeoRegions( + this.client.getEndpoint(), + sku, + linuxWorkersEnabled, + xenonWorkersEnabled, + linuxDynamicWorkersEnabled, + 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)); + } + + /** + * Description for Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions + * that support Linux Consumption Workers. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGeoRegionsAsync( + SkuName sku, Boolean linuxWorkersEnabled, Boolean xenonWorkersEnabled, Boolean linuxDynamicWorkersEnabled) { + return new PagedFlux<>( + () -> + listGeoRegionsSinglePageAsync( + sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled), + nextLink -> listGeoRegionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get a list of available geographical regions. + * + * @throws 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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGeoRegionsAsync() { + final SkuName sku = null; + final Boolean linuxWorkersEnabled = null; + final Boolean xenonWorkersEnabled = null; + final Boolean linuxDynamicWorkersEnabled = null; + return new PagedFlux<>( + () -> + listGeoRegionsSinglePageAsync( + sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled), + nextLink -> listGeoRegionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions + * that support Linux Consumption Workers. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listGeoRegionsAsync( + SkuName sku, + Boolean linuxWorkersEnabled, + Boolean xenonWorkersEnabled, + Boolean linuxDynamicWorkersEnabled, + Context context) { + return new PagedFlux<>( + () -> + listGeoRegionsSinglePageAsync( + sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled, context), + nextLink -> listGeoRegionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get a list of available geographical regions. + * + * @throws 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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGeoRegions() { + final SkuName sku = null; + final Boolean linuxWorkersEnabled = null; + final Boolean xenonWorkersEnabled = null; + final Boolean linuxDynamicWorkersEnabled = null; + return new PagedIterable<>( + listGeoRegionsAsync(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled)); + } + + /** + * Description for Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions + * that support Linux Consumption Workers. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 geographical regions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listGeoRegions( + SkuName sku, + Boolean linuxWorkersEnabled, + Boolean xenonWorkersEnabled, + Boolean linuxDynamicWorkersEnabled, + Context context) { + return new PagedIterable<>( + listGeoRegionsAsync(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled, context)); + } + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteIdentifiersAssignedToHostnameSinglePageAsync( + NameIdentifierInner nameIdentifier) { + 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 (nameIdentifier == null) { + return Mono.error(new IllegalArgumentException("Parameter nameIdentifier is required and cannot be null.")); + } else { + nameIdentifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSiteIdentifiersAssignedToHostname( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + nameIdentifier, + 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())); + } + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteIdentifiersAssignedToHostnameSinglePageAsync( + NameIdentifierInner nameIdentifier, 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 (nameIdentifier == null) { + return Mono.error(new IllegalArgumentException("Parameter nameIdentifier is required and cannot be null.")); + } else { + nameIdentifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSiteIdentifiersAssignedToHostname( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + nameIdentifier, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteIdentifiersAssignedToHostnameAsync(NameIdentifierInner nameIdentifier) { + return new PagedFlux<>( + () -> listSiteIdentifiersAssignedToHostnameSinglePageAsync(nameIdentifier), + nextLink -> listSiteIdentifiersAssignedToHostnameNextSinglePageAsync(nextLink)); + } + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteIdentifiersAssignedToHostnameAsync( + NameIdentifierInner nameIdentifier, Context context) { + return new PagedFlux<>( + () -> listSiteIdentifiersAssignedToHostnameSinglePageAsync(nameIdentifier, context), + nextLink -> listSiteIdentifiersAssignedToHostnameNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteIdentifiersAssignedToHostname(NameIdentifierInner nameIdentifier) { + return new PagedIterable<>(listSiteIdentifiersAssignedToHostnameAsync(nameIdentifier)); + } + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteIdentifiersAssignedToHostname( + NameIdentifierInner nameIdentifier, Context context) { + return new PagedIterable<>(listSiteIdentifiersAssignedToHostnameAsync(nameIdentifier, context)); + } + + /** + * Description for List all premier add-on offers. + * + * @throws 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 premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPremierAddOnOffersSinglePageAsync() { + 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 + .listPremierAddOnOffers( + 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())); + } + + /** + * Description for List all premier add-on offers. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPremierAddOnOffersSinglePageAsync(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 + .listPremierAddOnOffers( + 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)); + } + + /** + * Description for List all premier add-on offers. + * + * @throws 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 premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPremierAddOnOffersAsync() { + return new PagedFlux<>( + () -> listPremierAddOnOffersSinglePageAsync(), + nextLink -> listPremierAddOnOffersNextSinglePageAsync(nextLink)); + } + + /** + * Description for List all premier add-on offers. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPremierAddOnOffersAsync(Context context) { + return new PagedFlux<>( + () -> listPremierAddOnOffersSinglePageAsync(context), + nextLink -> listPremierAddOnOffersNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List all premier add-on offers. + * + * @throws 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 premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPremierAddOnOffers() { + return new PagedIterable<>(listPremierAddOnOffersAsync()); + } + + /** + * Description for List all premier add-on offers. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPremierAddOnOffers(Context context) { + return new PagedIterable<>(listPremierAddOnOffersAsync(context)); + } + + /** + * Description for List all SKUs. + * + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusWithResponseAsync() { + 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 + .listSkus( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for List all SKUs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSkusWithResponseAsync(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 + .listSkus( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for List all SKUs. + * + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSkusAsync() { + return listSkusWithResponseAsync() + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for List all SKUs. + * + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SkuInfosInner listSkus() { + return listSkusAsync().block(); + } + + /** + * Description for List all SKUs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 SKU information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSkusWithResponse(Context context) { + return listSkusWithResponseAsync(context).block(); + } + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 class that describes the reason for a validation failure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> verifyHostingEnvironmentVnetWithResponseAsync( + VnetParameters parameters) { + 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .verifyHostingEnvironmentVnet( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + parameters, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 class that describes the reason for a validation failure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> verifyHostingEnvironmentVnetWithResponseAsync( + VnetParameters parameters, 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 (parameters == null) { + return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); + } else { + parameters.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .verifyHostingEnvironmentVnet( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + parameters, + accept, + context); + } + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 class that describes the reason for a validation failure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono verifyHostingEnvironmentVnetAsync(VnetParameters parameters) { + return verifyHostingEnvironmentVnetWithResponseAsync(parameters) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 class that describes the reason for a validation failure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetValidationFailureDetailsInner verifyHostingEnvironmentVnet(VnetParameters parameters) { + return verifyHostingEnvironmentVnetAsync(parameters).block(); + } + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 class that describes the reason for a validation failure. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response verifyHostingEnvironmentVnetWithResponse( + VnetParameters parameters, Context context) { + return verifyHostingEnvironmentVnetWithResponseAsync(parameters, context).block(); + } + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> moveWithResponseAsync( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 (moveResourceEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter moveResourceEnvelope is required and cannot be null.")); + } else { + moveResourceEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .move( + this.client.getEndpoint(), + resourceGroupName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + moveResourceEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> moveWithResponseAsync( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 (moveResourceEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter moveResourceEnvelope is required and cannot be null.")); + } else { + moveResourceEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .move( + this.client.getEndpoint(), + resourceGroupName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + moveResourceEnvelope, + accept, + context); + } + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono moveAsync(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { + return moveWithResponseAsync(resourceGroupName, moveResourceEnvelope) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 move(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { + moveAsync(resourceGroupName, moveResourceEnvelope).block(); + } + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response moveWithResponse( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context) { + return moveWithResponseAsync(resourceGroupName, moveResourceEnvelope, context).block(); + } + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validateWithResponseAsync( + String resourceGroupName, ValidateRequest validateRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 (validateRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter validateRequest is required and cannot be null.")); + } else { + validateRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validate( + this.client.getEndpoint(), + resourceGroupName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + validateRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validateWithResponseAsync( + String resourceGroupName, ValidateRequest validateRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 (validateRequest == null) { + return Mono + .error(new IllegalArgumentException("Parameter validateRequest is required and cannot be null.")); + } else { + validateRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validate( + this.client.getEndpoint(), + resourceGroupName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + validateRequest, + accept, + context); + } + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateAsync(String resourceGroupName, ValidateRequest validateRequest) { + return validateWithResponseAsync(resourceGroupName, validateRequest) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ValidateResponseInner validate(String resourceGroupName, ValidateRequest validateRequest) { + return validateAsync(resourceGroupName, validateRequest).block(); + } + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateWithResponse( + String resourceGroupName, ValidateRequest validateRequest, Context context) { + return validateWithResponseAsync(resourceGroupName, validateRequest, context).block(); + } + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validateMoveWithResponseAsync( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 (moveResourceEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter moveResourceEnvelope is required and cannot be null.")); + } else { + moveResourceEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validateMove( + this.client.getEndpoint(), + resourceGroupName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + moveResourceEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> validateMoveWithResponseAsync( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 (moveResourceEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter moveResourceEnvelope is required and cannot be null.")); + } else { + moveResourceEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validateMove( + this.client.getEndpoint(), + resourceGroupName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + moveResourceEnvelope, + accept, + context); + } + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateMoveAsync(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { + return validateMoveWithResponseAsync(resourceGroupName, moveResourceEnvelope) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 validateMove(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { + validateMoveAsync(resourceGroupName, moveResourceEnvelope).block(); + } + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response validateMoveWithResponse( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context) { + return validateMoveWithResponseAsync(resourceGroupName, moveResourceEnvelope, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of source controls. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSourceControlsNextSinglePageAsync(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.listSourceControlsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of source controls. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSourceControlsNextSinglePageAsync( + 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 + .listSourceControlsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Billing Meters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBillingMetersNextSinglePageAsync(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.listBillingMetersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Billing Meters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBillingMetersNextSinglePageAsync( + 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 + .listBillingMetersNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of custom hostname sites. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCustomHostnameSitesNextSinglePageAsync(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.listCustomHostnameSitesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of custom hostname sites. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listCustomHostnameSitesNextSinglePageAsync( + 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 + .listCustomHostnameSitesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of geographical regions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGeoRegionsNextSinglePageAsync(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.listGeoRegionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of geographical regions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listGeoRegionsNextSinglePageAsync(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 + .listGeoRegionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteIdentifiersAssignedToHostnameNextSinglePageAsync( + 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 + .listSiteIdentifiersAssignedToHostnameNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteIdentifiersAssignedToHostnameNextSinglePageAsync( + 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 + .listSiteIdentifiersAssignedToHostnameNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPremierAddOnOffersNextSinglePageAsync(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.listPremierAddOnOffersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of premier add-on offers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPremierAddOnOffersNextSinglePageAsync( + 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 + .listPremierAddOnOffersNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceProvidersImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceProvidersImpl.java new file mode 100644 index 0000000000000..febb02af9a2ef --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ResourceProvidersImpl.java @@ -0,0 +1,364 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.ResourceProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.BillingMeterInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameSitesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentLocationsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.GeoRegionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnOfferInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceNameAvailabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfosInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SourceControlInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ValidateResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetValidationFailureDetailsInner; +import com.azure.resourcemanager.appservice.generated.models.BillingMeter; +import com.azure.resourcemanager.appservice.generated.models.CsmMoveResourceEnvelope; +import com.azure.resourcemanager.appservice.generated.models.CustomHostnameSites; +import com.azure.resourcemanager.appservice.generated.models.DeploymentLocations; +import com.azure.resourcemanager.appservice.generated.models.GeoRegion; +import com.azure.resourcemanager.appservice.generated.models.Identifier; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOnOffer; +import com.azure.resourcemanager.appservice.generated.models.ResourceNameAvailability; +import com.azure.resourcemanager.appservice.generated.models.ResourceNameAvailabilityRequest; +import com.azure.resourcemanager.appservice.generated.models.ResourceProviders; +import com.azure.resourcemanager.appservice.generated.models.SkuInfos; +import com.azure.resourcemanager.appservice.generated.models.SkuName; +import com.azure.resourcemanager.appservice.generated.models.SourceControl; +import com.azure.resourcemanager.appservice.generated.models.User; +import com.azure.resourcemanager.appservice.generated.models.ValidateRequest; +import com.azure.resourcemanager.appservice.generated.models.ValidateResponse; +import com.azure.resourcemanager.appservice.generated.models.VnetParameters; +import com.azure.resourcemanager.appservice.generated.models.VnetValidationFailureDetails; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ResourceProvidersImpl implements ResourceProviders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceProvidersImpl.class); + + private final ResourceProvidersClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public ResourceProvidersImpl( + ResourceProvidersClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public User getPublishingUser() { + UserInner inner = this.serviceClient().getPublishingUser(); + if (inner != null) { + return new UserImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPublishingUserWithResponse(Context context) { + Response inner = this.serviceClient().getPublishingUserWithResponse(context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new UserImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public User updatePublishingUser(UserInner userDetails) { + UserInner inner = this.serviceClient().updatePublishingUser(userDetails); + if (inner != null) { + return new UserImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updatePublishingUserWithResponse(UserInner userDetails, Context context) { + Response inner = this.serviceClient().updatePublishingUserWithResponse(userDetails, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new UserImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSourceControls() { + PagedIterable inner = this.serviceClient().listSourceControls(); + return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); + } + + public PagedIterable listSourceControls(Context context) { + PagedIterable inner = this.serviceClient().listSourceControls(context); + return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); + } + + public SourceControl getSourceControl(String sourceControlType) { + SourceControlInner inner = this.serviceClient().getSourceControl(sourceControlType); + if (inner != null) { + return new SourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSourceControlWithResponse(String sourceControlType, Context context) { + Response inner = + this.serviceClient().getSourceControlWithResponse(sourceControlType, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SourceControlImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SourceControl updateSourceControl(String sourceControlType, SourceControlInner requestMessage) { + SourceControlInner inner = this.serviceClient().updateSourceControl(sourceControlType, requestMessage); + if (inner != null) { + return new SourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSourceControlWithResponse( + String sourceControlType, SourceControlInner requestMessage, Context context) { + Response inner = + this.serviceClient().updateSourceControlWithResponse(sourceControlType, requestMessage, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SourceControlImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new BillingMeterImpl(inner1, this.manager())); + } + + public PagedIterable list(String billingLocation, String osType, Context context) { + PagedIterable inner = this.serviceClient().list(billingLocation, osType, context); + return Utils.mapPage(inner, inner1 -> new BillingMeterImpl(inner1, this.manager())); + } + + public ResourceNameAvailability checkNameAvailability(ResourceNameAvailabilityRequest request) { + ResourceNameAvailabilityInner inner = this.serviceClient().checkNameAvailability(request); + if (inner != null) { + return new ResourceNameAvailabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response checkNameAvailabilityWithResponse( + ResourceNameAvailabilityRequest request, Context context) { + Response inner = + this.serviceClient().checkNameAvailabilityWithResponse(request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ResourceNameAvailabilityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listCustomHostnameSites() { + PagedIterable inner = this.serviceClient().listCustomHostnameSites(); + return Utils.mapPage(inner, inner1 -> new CustomHostnameSitesImpl(inner1, this.manager())); + } + + public PagedIterable listCustomHostnameSites(Context context) { + PagedIterable inner = this.serviceClient().listCustomHostnameSites(context); + return Utils.mapPage(inner, inner1 -> new CustomHostnameSitesImpl(inner1, this.manager())); + } + + public DeploymentLocations getSubscriptionDeploymentLocations() { + DeploymentLocationsInner inner = this.serviceClient().getSubscriptionDeploymentLocations(); + if (inner != null) { + return new DeploymentLocationsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSubscriptionDeploymentLocationsWithResponse(Context context) { + Response inner = + this.serviceClient().getSubscriptionDeploymentLocationsWithResponse(context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeploymentLocationsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listGeoRegions() { + PagedIterable inner = this.serviceClient().listGeoRegions(); + return Utils.mapPage(inner, inner1 -> new GeoRegionImpl(inner1, this.manager())); + } + + public PagedIterable listGeoRegions( + SkuName sku, + Boolean linuxWorkersEnabled, + Boolean xenonWorkersEnabled, + Boolean linuxDynamicWorkersEnabled, + Context context) { + PagedIterable inner = + this + .serviceClient() + .listGeoRegions(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled, context); + return Utils.mapPage(inner, inner1 -> new GeoRegionImpl(inner1, this.manager())); + } + + public PagedIterable listSiteIdentifiersAssignedToHostname(NameIdentifierInner nameIdentifier) { + PagedIterable inner = + this.serviceClient().listSiteIdentifiersAssignedToHostname(nameIdentifier); + return Utils.mapPage(inner, inner1 -> new IdentifierImpl(inner1, this.manager())); + } + + public PagedIterable listSiteIdentifiersAssignedToHostname( + NameIdentifierInner nameIdentifier, Context context) { + PagedIterable inner = + this.serviceClient().listSiteIdentifiersAssignedToHostname(nameIdentifier, context); + return Utils.mapPage(inner, inner1 -> new IdentifierImpl(inner1, this.manager())); + } + + public PagedIterable listPremierAddOnOffers() { + PagedIterable inner = this.serviceClient().listPremierAddOnOffers(); + return Utils.mapPage(inner, inner1 -> new PremierAddOnOfferImpl(inner1, this.manager())); + } + + public PagedIterable listPremierAddOnOffers(Context context) { + PagedIterable inner = this.serviceClient().listPremierAddOnOffers(context); + return Utils.mapPage(inner, inner1 -> new PremierAddOnOfferImpl(inner1, this.manager())); + } + + public SkuInfos listSkus() { + SkuInfosInner inner = this.serviceClient().listSkus(); + if (inner != null) { + return new SkuInfosImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSkusWithResponse(Context context) { + Response inner = this.serviceClient().listSkusWithResponse(context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SkuInfosImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VnetValidationFailureDetails verifyHostingEnvironmentVnet(VnetParameters parameters) { + VnetValidationFailureDetailsInner inner = this.serviceClient().verifyHostingEnvironmentVnet(parameters); + if (inner != null) { + return new VnetValidationFailureDetailsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response verifyHostingEnvironmentVnetWithResponse( + VnetParameters parameters, Context context) { + Response inner = + this.serviceClient().verifyHostingEnvironmentVnetWithResponse(parameters, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetValidationFailureDetailsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void move(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { + this.serviceClient().move(resourceGroupName, moveResourceEnvelope); + } + + public Response moveWithResponse( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context) { + return this.serviceClient().moveWithResponse(resourceGroupName, moveResourceEnvelope, context); + } + + public ValidateResponse validate(String resourceGroupName, ValidateRequest validateRequest) { + ValidateResponseInner inner = this.serviceClient().validate(resourceGroupName, validateRequest); + if (inner != null) { + return new ValidateResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response validateWithResponse( + String resourceGroupName, ValidateRequest validateRequest, Context context) { + Response inner = + this.serviceClient().validateWithResponse(resourceGroupName, validateRequest, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ValidateResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void validateMove(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) { + this.serviceClient().validateMove(resourceGroupName, moveResourceEnvelope); + } + + public Response validateMoveWithResponse( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context) { + return this.serviceClient().validateMoveWithResponse(resourceGroupName, moveResourceEnvelope, context); + } + + private ResourceProvidersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RestoreRequestImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RestoreRequestImpl.java new file mode 100644 index 0000000000000..ec2c1fe330fa9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RestoreRequestImpl.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner; +import com.azure.resourcemanager.appservice.generated.models.BackupRestoreOperationType; +import com.azure.resourcemanager.appservice.generated.models.DatabaseBackupSetting; +import com.azure.resourcemanager.appservice.generated.models.RestoreRequest; +import java.util.Collections; +import java.util.List; + +public final class RestoreRequestImpl implements RestoreRequest { + private RestoreRequestInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + RestoreRequestImpl( + RestoreRequestInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String storageAccountUrl() { + return this.innerModel().storageAccountUrl(); + } + + public String blobName() { + return this.innerModel().blobName(); + } + + public boolean overwrite() { + return this.innerModel().overwrite(); + } + + public String siteName() { + return this.innerModel().siteName(); + } + + public List databases() { + List inner = this.innerModel().databases(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean ignoreConflictingHostNames() { + return this.innerModel().ignoreConflictingHostNames(); + } + + public Boolean ignoreDatabases() { + return this.innerModel().ignoreDatabases(); + } + + public String appServicePlan() { + return this.innerModel().appServicePlan(); + } + + public BackupRestoreOperationType operationType() { + return this.innerModel().operationType(); + } + + public Boolean adjustConnectionStrings() { + return this.innerModel().adjustConnectionStrings(); + } + + public String hostingEnvironment() { + return this.innerModel().hostingEnvironment(); + } + + public RestoreRequestInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RevisionImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RevisionImpl.java new file mode 100644 index 0000000000000..ccb02e0818628 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/RevisionImpl.java @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.RevisionInner; +import com.azure.resourcemanager.appservice.generated.models.Revision; +import com.azure.resourcemanager.appservice.generated.models.RevisionHealthState; +import com.azure.resourcemanager.appservice.generated.models.RevisionProvisioningState; +import com.azure.resourcemanager.appservice.generated.models.Template; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +public final class RevisionImpl implements Revision { + private RevisionInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + RevisionImpl( + RevisionInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 String kind() { + return this.innerModel().kind(); + } + + public OffsetDateTime createdTime() { + return this.innerModel().createdTime(); + } + + public String fqdn() { + return this.innerModel().fqdn(); + } + + public Template template() { + return this.innerModel().template(); + } + + public Boolean active() { + return this.innerModel().active(); + } + + public Integer replicas() { + return this.innerModel().replicas(); + } + + public Integer trafficWeight() { + return this.innerModel().trafficWeight(); + } + + public String provisioningError() { + return this.innerModel().provisioningError(); + } + + public RevisionHealthState healthState() { + return this.innerModel().healthState(); + } + + public RevisionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public RevisionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SecretsCollectionImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SecretsCollectionImpl.java new file mode 100644 index 0000000000000..d78f39a8ec157 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SecretsCollectionImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SecretsCollectionInner; +import com.azure.resourcemanager.appservice.generated.models.ContainerAppSecret; +import com.azure.resourcemanager.appservice.generated.models.SecretsCollection; +import java.util.Collections; +import java.util.List; + +public final class SecretsCollectionImpl implements SecretsCollection { + private SecretsCollectionInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SecretsCollectionImpl( + SecretsCollectionInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 SecretsCollectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteAuthSettingsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteAuthSettingsImpl.java new file mode 100644 index 0000000000000..462ee3fa69cbf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteAuthSettingsImpl.java @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsInner; +import com.azure.resourcemanager.appservice.generated.models.BuiltInAuthenticationProvider; +import com.azure.resourcemanager.appservice.generated.models.SiteAuthSettings; +import com.azure.resourcemanager.appservice.generated.models.UnauthenticatedClientAction; +import java.util.Collections; +import java.util.List; + +public final class SiteAuthSettingsImpl implements SiteAuthSettings { + private SiteAuthSettingsInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteAuthSettingsImpl( + SiteAuthSettingsInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Boolean enabled() { + return this.innerModel().enabled(); + } + + public String runtimeVersion() { + return this.innerModel().runtimeVersion(); + } + + public UnauthenticatedClientAction unauthenticatedClientAction() { + return this.innerModel().unauthenticatedClientAction(); + } + + public Boolean tokenStoreEnabled() { + return this.innerModel().tokenStoreEnabled(); + } + + public List allowedExternalRedirectUrls() { + List inner = this.innerModel().allowedExternalRedirectUrls(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public BuiltInAuthenticationProvider defaultProvider() { + return this.innerModel().defaultProvider(); + } + + public Double tokenRefreshExtensionHours() { + return this.innerModel().tokenRefreshExtensionHours(); + } + + public String clientId() { + return this.innerModel().clientId(); + } + + public String clientSecret() { + return this.innerModel().clientSecret(); + } + + public String clientSecretSettingName() { + return this.innerModel().clientSecretSettingName(); + } + + public String clientSecretCertificateThumbprint() { + return this.innerModel().clientSecretCertificateThumbprint(); + } + + public String issuer() { + return this.innerModel().issuer(); + } + + public Boolean validateIssuer() { + return this.innerModel().validateIssuer(); + } + + public List allowedAudiences() { + List inner = this.innerModel().allowedAudiences(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List additionalLoginParams() { + List inner = this.innerModel().additionalLoginParams(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String aadClaimsAuthorization() { + return this.innerModel().aadClaimsAuthorization(); + } + + public String googleClientId() { + return this.innerModel().googleClientId(); + } + + public String googleClientSecret() { + return this.innerModel().googleClientSecret(); + } + + public String googleClientSecretSettingName() { + return this.innerModel().googleClientSecretSettingName(); + } + + public List googleOAuthScopes() { + List inner = this.innerModel().googleOAuthScopes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String facebookAppId() { + return this.innerModel().facebookAppId(); + } + + public String facebookAppSecret() { + return this.innerModel().facebookAppSecret(); + } + + public String facebookAppSecretSettingName() { + return this.innerModel().facebookAppSecretSettingName(); + } + + public List facebookOAuthScopes() { + List inner = this.innerModel().facebookOAuthScopes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String gitHubClientId() { + return this.innerModel().gitHubClientId(); + } + + public String gitHubClientSecret() { + return this.innerModel().gitHubClientSecret(); + } + + public String gitHubClientSecretSettingName() { + return this.innerModel().gitHubClientSecretSettingName(); + } + + public List gitHubOAuthScopes() { + List inner = this.innerModel().gitHubOAuthScopes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String twitterConsumerKey() { + return this.innerModel().twitterConsumerKey(); + } + + public String twitterConsumerSecret() { + return this.innerModel().twitterConsumerSecret(); + } + + public String twitterConsumerSecretSettingName() { + return this.innerModel().twitterConsumerSecretSettingName(); + } + + public String microsoftAccountClientId() { + return this.innerModel().microsoftAccountClientId(); + } + + public String microsoftAccountClientSecret() { + return this.innerModel().microsoftAccountClientSecret(); + } + + public String microsoftAccountClientSecretSettingName() { + return this.innerModel().microsoftAccountClientSecretSettingName(); + } + + public List microsoftAccountOAuthScopes() { + List inner = this.innerModel().microsoftAccountOAuthScopes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String isAuthFromFile() { + return this.innerModel().isAuthFromFile(); + } + + public String authFilePath() { + return this.innerModel().authFilePath(); + } + + public String configVersion() { + return this.innerModel().configVersion(); + } + + public SiteAuthSettingsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteAuthSettingsV2Impl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteAuthSettingsV2Impl.java new file mode 100644 index 0000000000000..aa1967bad2b71 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteAuthSettingsV2Impl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsV2Inner; +import com.azure.resourcemanager.appservice.generated.models.AuthPlatform; +import com.azure.resourcemanager.appservice.generated.models.GlobalValidation; +import com.azure.resourcemanager.appservice.generated.models.HttpSettings; +import com.azure.resourcemanager.appservice.generated.models.IdentityProviders; +import com.azure.resourcemanager.appservice.generated.models.Login; +import com.azure.resourcemanager.appservice.generated.models.SiteAuthSettingsV2; + +public final class SiteAuthSettingsV2Impl implements SiteAuthSettingsV2 { + private SiteAuthSettingsV2Inner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteAuthSettingsV2Impl( + SiteAuthSettingsV2Inner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public AuthPlatform platform() { + return this.innerModel().platform(); + } + + public GlobalValidation globalValidation() { + return this.innerModel().globalValidation(); + } + + public IdentityProviders identityProviders() { + return this.innerModel().identityProviders(); + } + + public Login login() { + return this.innerModel().login(); + } + + public HttpSettings httpSettings() { + return this.innerModel().httpSettings(); + } + + public SiteAuthSettingsV2Inner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteCloneabilityImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteCloneabilityImpl.java new file mode 100644 index 0000000000000..a778dfadcf7fb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteCloneabilityImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteCloneabilityInner; +import com.azure.resourcemanager.appservice.generated.models.CloneAbilityResult; +import com.azure.resourcemanager.appservice.generated.models.SiteCloneability; +import com.azure.resourcemanager.appservice.generated.models.SiteCloneabilityCriterion; +import java.util.Collections; +import java.util.List; + +public final class SiteCloneabilityImpl implements SiteCloneability { + private SiteCloneabilityInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteCloneabilityImpl( + SiteCloneabilityInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public CloneAbilityResult result() { + return this.innerModel().result(); + } + + public List blockingFeatures() { + List inner = this.innerModel().blockingFeatures(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List unsupportedFeatures() { + List inner = this.innerModel().unsupportedFeatures(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List blockingCharacteristics() { + List inner = this.innerModel().blockingCharacteristics(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteCloneabilityInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigImpl.java new file mode 100644 index 0000000000000..82ccd4d598cc3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigImpl.java @@ -0,0 +1,365 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigInner; +import com.azure.resourcemanager.appservice.generated.models.ApiDefinitionInfo; +import com.azure.resourcemanager.appservice.generated.models.ApiManagementConfig; +import com.azure.resourcemanager.appservice.generated.models.AutoHealRules; +import com.azure.resourcemanager.appservice.generated.models.AzureStorageInfoValue; +import com.azure.resourcemanager.appservice.generated.models.ConnStringInfo; +import com.azure.resourcemanager.appservice.generated.models.CorsSettings; +import com.azure.resourcemanager.appservice.generated.models.Experiments; +import com.azure.resourcemanager.appservice.generated.models.FtpsState; +import com.azure.resourcemanager.appservice.generated.models.HandlerMapping; +import com.azure.resourcemanager.appservice.generated.models.IpSecurityRestriction; +import com.azure.resourcemanager.appservice.generated.models.ManagedPipelineMode; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.PushSettings; +import com.azure.resourcemanager.appservice.generated.models.ScmType; +import com.azure.resourcemanager.appservice.generated.models.SiteConfig; +import com.azure.resourcemanager.appservice.generated.models.SiteLimits; +import com.azure.resourcemanager.appservice.generated.models.SiteLoadBalancing; +import com.azure.resourcemanager.appservice.generated.models.SiteMachineKey; +import com.azure.resourcemanager.appservice.generated.models.SupportedTlsVersions; +import com.azure.resourcemanager.appservice.generated.models.VirtualApplication; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class SiteConfigImpl implements SiteConfig { + private SiteConfigInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteConfigImpl( + SiteConfigInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public Integer numberOfWorkers() { + return this.innerModel().numberOfWorkers(); + } + + public List defaultDocuments() { + List inner = this.innerModel().defaultDocuments(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String netFrameworkVersion() { + return this.innerModel().netFrameworkVersion(); + } + + public String phpVersion() { + return this.innerModel().phpVersion(); + } + + public String pythonVersion() { + return this.innerModel().pythonVersion(); + } + + public String nodeVersion() { + return this.innerModel().nodeVersion(); + } + + public String powerShellVersion() { + return this.innerModel().powerShellVersion(); + } + + public String linuxFxVersion() { + return this.innerModel().linuxFxVersion(); + } + + public String windowsFxVersion() { + return this.innerModel().windowsFxVersion(); + } + + public Boolean requestTracingEnabled() { + return this.innerModel().requestTracingEnabled(); + } + + public OffsetDateTime requestTracingExpirationTime() { + return this.innerModel().requestTracingExpirationTime(); + } + + public Boolean remoteDebuggingEnabled() { + return this.innerModel().remoteDebuggingEnabled(); + } + + public String remoteDebuggingVersion() { + return this.innerModel().remoteDebuggingVersion(); + } + + public Boolean httpLoggingEnabled() { + return this.innerModel().httpLoggingEnabled(); + } + + public Boolean acrUseManagedIdentityCreds() { + return this.innerModel().acrUseManagedIdentityCreds(); + } + + public String acrUserManagedIdentityId() { + return this.innerModel().acrUserManagedIdentityId(); + } + + public Integer logsDirectorySizeLimit() { + return this.innerModel().logsDirectorySizeLimit(); + } + + public Boolean detailedErrorLoggingEnabled() { + return this.innerModel().detailedErrorLoggingEnabled(); + } + + public String publishingUsername() { + return this.innerModel().publishingUsername(); + } + + public List appSettings() { + List inner = this.innerModel().appSettings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List connectionStrings() { + List inner = this.innerModel().connectionStrings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteMachineKey machineKey() { + return this.innerModel().machineKey(); + } + + public List handlerMappings() { + List inner = this.innerModel().handlerMappings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String documentRoot() { + return this.innerModel().documentRoot(); + } + + public ScmType scmType() { + return this.innerModel().scmType(); + } + + public Boolean use32BitWorkerProcess() { + return this.innerModel().use32BitWorkerProcess(); + } + + public Boolean webSocketsEnabled() { + return this.innerModel().webSocketsEnabled(); + } + + public Boolean alwaysOn() { + return this.innerModel().alwaysOn(); + } + + public String javaVersion() { + return this.innerModel().javaVersion(); + } + + public String javaContainer() { + return this.innerModel().javaContainer(); + } + + public String javaContainerVersion() { + return this.innerModel().javaContainerVersion(); + } + + public String appCommandLine() { + return this.innerModel().appCommandLine(); + } + + public ManagedPipelineMode managedPipelineMode() { + return this.innerModel().managedPipelineMode(); + } + + public List virtualApplications() { + List inner = this.innerModel().virtualApplications(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteLoadBalancing loadBalancing() { + return this.innerModel().loadBalancing(); + } + + public Experiments experiments() { + return this.innerModel().experiments(); + } + + public SiteLimits limits() { + return this.innerModel().limits(); + } + + public Boolean autoHealEnabled() { + return this.innerModel().autoHealEnabled(); + } + + public AutoHealRules autoHealRules() { + return this.innerModel().autoHealRules(); + } + + public String tracingOptions() { + return this.innerModel().tracingOptions(); + } + + public String vnetName() { + return this.innerModel().vnetName(); + } + + public Boolean vnetRouteAllEnabled() { + return this.innerModel().vnetRouteAllEnabled(); + } + + public Integer vnetPrivatePortsCount() { + return this.innerModel().vnetPrivatePortsCount(); + } + + public CorsSettings cors() { + return this.innerModel().cors(); + } + + public PushSettings push() { + PushSettingsInner inner = this.innerModel().push(); + if (inner != null) { + return new PushSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public ApiDefinitionInfo apiDefinition() { + return this.innerModel().apiDefinition(); + } + + public ApiManagementConfig apiManagementConfig() { + return this.innerModel().apiManagementConfig(); + } + + public String autoSwapSlotName() { + return this.innerModel().autoSwapSlotName(); + } + + public Boolean localMySqlEnabled() { + return this.innerModel().localMySqlEnabled(); + } + + public Integer managedServiceIdentityId() { + return this.innerModel().managedServiceIdentityId(); + } + + public Integer xManagedServiceIdentityId() { + return this.innerModel().xManagedServiceIdentityId(); + } + + public String keyVaultReferenceIdentity() { + return this.innerModel().keyVaultReferenceIdentity(); + } + + public List ipSecurityRestrictions() { + List inner = this.innerModel().ipSecurityRestrictions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List scmIpSecurityRestrictions() { + List inner = this.innerModel().scmIpSecurityRestrictions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean scmIpSecurityRestrictionsUseMain() { + return this.innerModel().scmIpSecurityRestrictionsUseMain(); + } + + public Boolean http20Enabled() { + return this.innerModel().http20Enabled(); + } + + public SupportedTlsVersions minTlsVersion() { + return this.innerModel().minTlsVersion(); + } + + public SupportedTlsVersions scmMinTlsVersion() { + return this.innerModel().scmMinTlsVersion(); + } + + public FtpsState ftpsState() { + return this.innerModel().ftpsState(); + } + + public Integer preWarmedInstanceCount() { + return this.innerModel().preWarmedInstanceCount(); + } + + public Integer functionAppScaleLimit() { + return this.innerModel().functionAppScaleLimit(); + } + + public String healthCheckPath() { + return this.innerModel().healthCheckPath(); + } + + public Boolean functionsRuntimeScaleMonitoringEnabled() { + return this.innerModel().functionsRuntimeScaleMonitoringEnabled(); + } + + public String websiteTimeZone() { + return this.innerModel().websiteTimeZone(); + } + + public Integer minimumElasticInstanceCount() { + return this.innerModel().minimumElasticInstanceCount(); + } + + public Map azureStorageAccounts() { + Map inner = this.innerModel().azureStorageAccounts(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public SiteConfigInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigResourceImpl.java new file mode 100644 index 0000000000000..21d0cd7b3174d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigResourceImpl.java @@ -0,0 +1,382 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigResourceInner; +import com.azure.resourcemanager.appservice.generated.models.ApiDefinitionInfo; +import com.azure.resourcemanager.appservice.generated.models.ApiManagementConfig; +import com.azure.resourcemanager.appservice.generated.models.AutoHealRules; +import com.azure.resourcemanager.appservice.generated.models.AzureStorageInfoValue; +import com.azure.resourcemanager.appservice.generated.models.ConnStringInfo; +import com.azure.resourcemanager.appservice.generated.models.CorsSettings; +import com.azure.resourcemanager.appservice.generated.models.Experiments; +import com.azure.resourcemanager.appservice.generated.models.FtpsState; +import com.azure.resourcemanager.appservice.generated.models.HandlerMapping; +import com.azure.resourcemanager.appservice.generated.models.IpSecurityRestriction; +import com.azure.resourcemanager.appservice.generated.models.ManagedPipelineMode; +import com.azure.resourcemanager.appservice.generated.models.NameValuePair; +import com.azure.resourcemanager.appservice.generated.models.PushSettings; +import com.azure.resourcemanager.appservice.generated.models.ScmType; +import com.azure.resourcemanager.appservice.generated.models.SiteConfigResource; +import com.azure.resourcemanager.appservice.generated.models.SiteLimits; +import com.azure.resourcemanager.appservice.generated.models.SiteLoadBalancing; +import com.azure.resourcemanager.appservice.generated.models.SiteMachineKey; +import com.azure.resourcemanager.appservice.generated.models.SupportedTlsVersions; +import com.azure.resourcemanager.appservice.generated.models.VirtualApplication; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class SiteConfigResourceImpl implements SiteConfigResource { + private SiteConfigResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteConfigResourceImpl( + SiteConfigResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Integer numberOfWorkers() { + return this.innerModel().numberOfWorkers(); + } + + public List defaultDocuments() { + List inner = this.innerModel().defaultDocuments(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String netFrameworkVersion() { + return this.innerModel().netFrameworkVersion(); + } + + public String phpVersion() { + return this.innerModel().phpVersion(); + } + + public String pythonVersion() { + return this.innerModel().pythonVersion(); + } + + public String nodeVersion() { + return this.innerModel().nodeVersion(); + } + + public String powerShellVersion() { + return this.innerModel().powerShellVersion(); + } + + public String linuxFxVersion() { + return this.innerModel().linuxFxVersion(); + } + + public String windowsFxVersion() { + return this.innerModel().windowsFxVersion(); + } + + public Boolean requestTracingEnabled() { + return this.innerModel().requestTracingEnabled(); + } + + public OffsetDateTime requestTracingExpirationTime() { + return this.innerModel().requestTracingExpirationTime(); + } + + public Boolean remoteDebuggingEnabled() { + return this.innerModel().remoteDebuggingEnabled(); + } + + public String remoteDebuggingVersion() { + return this.innerModel().remoteDebuggingVersion(); + } + + public Boolean httpLoggingEnabled() { + return this.innerModel().httpLoggingEnabled(); + } + + public Boolean acrUseManagedIdentityCreds() { + return this.innerModel().acrUseManagedIdentityCreds(); + } + + public String acrUserManagedIdentityId() { + return this.innerModel().acrUserManagedIdentityId(); + } + + public Integer logsDirectorySizeLimit() { + return this.innerModel().logsDirectorySizeLimit(); + } + + public Boolean detailedErrorLoggingEnabled() { + return this.innerModel().detailedErrorLoggingEnabled(); + } + + public String publishingUsername() { + return this.innerModel().publishingUsername(); + } + + public List appSettings() { + List inner = this.innerModel().appSettings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List connectionStrings() { + List inner = this.innerModel().connectionStrings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteMachineKey machineKey() { + return this.innerModel().machineKey(); + } + + public List handlerMappings() { + List inner = this.innerModel().handlerMappings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String documentRoot() { + return this.innerModel().documentRoot(); + } + + public ScmType scmType() { + return this.innerModel().scmType(); + } + + public Boolean use32BitWorkerProcess() { + return this.innerModel().use32BitWorkerProcess(); + } + + public Boolean webSocketsEnabled() { + return this.innerModel().webSocketsEnabled(); + } + + public Boolean alwaysOn() { + return this.innerModel().alwaysOn(); + } + + public String javaVersion() { + return this.innerModel().javaVersion(); + } + + public String javaContainer() { + return this.innerModel().javaContainer(); + } + + public String javaContainerVersion() { + return this.innerModel().javaContainerVersion(); + } + + public String appCommandLine() { + return this.innerModel().appCommandLine(); + } + + public ManagedPipelineMode managedPipelineMode() { + return this.innerModel().managedPipelineMode(); + } + + public List virtualApplications() { + List inner = this.innerModel().virtualApplications(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteLoadBalancing loadBalancing() { + return this.innerModel().loadBalancing(); + } + + public Experiments experiments() { + return this.innerModel().experiments(); + } + + public SiteLimits limits() { + return this.innerModel().limits(); + } + + public Boolean autoHealEnabled() { + return this.innerModel().autoHealEnabled(); + } + + public AutoHealRules autoHealRules() { + return this.innerModel().autoHealRules(); + } + + public String tracingOptions() { + return this.innerModel().tracingOptions(); + } + + public String vnetName() { + return this.innerModel().vnetName(); + } + + public Boolean vnetRouteAllEnabled() { + return this.innerModel().vnetRouteAllEnabled(); + } + + public Integer vnetPrivatePortsCount() { + return this.innerModel().vnetPrivatePortsCount(); + } + + public CorsSettings cors() { + return this.innerModel().cors(); + } + + public PushSettings push() { + PushSettingsInner inner = this.innerModel().push(); + if (inner != null) { + return new PushSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public ApiDefinitionInfo apiDefinition() { + return this.innerModel().apiDefinition(); + } + + public ApiManagementConfig apiManagementConfig() { + return this.innerModel().apiManagementConfig(); + } + + public String autoSwapSlotName() { + return this.innerModel().autoSwapSlotName(); + } + + public Boolean localMySqlEnabled() { + return this.innerModel().localMySqlEnabled(); + } + + public Integer managedServiceIdentityId() { + return this.innerModel().managedServiceIdentityId(); + } + + public Integer xManagedServiceIdentityId() { + return this.innerModel().xManagedServiceIdentityId(); + } + + public String keyVaultReferenceIdentity() { + return this.innerModel().keyVaultReferenceIdentity(); + } + + public List ipSecurityRestrictions() { + List inner = this.innerModel().ipSecurityRestrictions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List scmIpSecurityRestrictions() { + List inner = this.innerModel().scmIpSecurityRestrictions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean scmIpSecurityRestrictionsUseMain() { + return this.innerModel().scmIpSecurityRestrictionsUseMain(); + } + + public Boolean http20Enabled() { + return this.innerModel().http20Enabled(); + } + + public SupportedTlsVersions minTlsVersion() { + return this.innerModel().minTlsVersion(); + } + + public SupportedTlsVersions scmMinTlsVersion() { + return this.innerModel().scmMinTlsVersion(); + } + + public FtpsState ftpsState() { + return this.innerModel().ftpsState(); + } + + public Integer preWarmedInstanceCount() { + return this.innerModel().preWarmedInstanceCount(); + } + + public Integer functionAppScaleLimit() { + return this.innerModel().functionAppScaleLimit(); + } + + public String healthCheckPath() { + return this.innerModel().healthCheckPath(); + } + + public Boolean functionsRuntimeScaleMonitoringEnabled() { + return this.innerModel().functionsRuntimeScaleMonitoringEnabled(); + } + + public String websiteTimeZone() { + return this.innerModel().websiteTimeZone(); + } + + public Integer minimumElasticInstanceCount() { + return this.innerModel().minimumElasticInstanceCount(); + } + + public Map azureStorageAccounts() { + Map inner = this.innerModel().azureStorageAccounts(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String publicNetworkAccess() { + return this.innerModel().publicNetworkAccess(); + } + + public SiteConfigResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigurationSnapshotInfoImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigurationSnapshotInfoImpl.java new file mode 100644 index 0000000000000..4b5ce42d18003 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteConfigurationSnapshotInfoImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigurationSnapshotInfoInner; +import com.azure.resourcemanager.appservice.generated.models.SiteConfigurationSnapshotInfo; +import java.time.OffsetDateTime; + +public final class SiteConfigurationSnapshotInfoImpl implements SiteConfigurationSnapshotInfo { + private SiteConfigurationSnapshotInfoInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteConfigurationSnapshotInfoImpl( + SiteConfigurationSnapshotInfoInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public OffsetDateTime time() { + return this.innerModel().time(); + } + + public Integer snapshotId() { + return this.innerModel().snapshotId(); + } + + public SiteConfigurationSnapshotInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteExtensionInfoImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteExtensionInfoImpl.java new file mode 100644 index 0000000000000..3333aa40ec9be --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteExtensionInfoImpl.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteExtensionInfoInner; +import com.azure.resourcemanager.appservice.generated.models.SiteExtensionInfo; +import com.azure.resourcemanager.appservice.generated.models.SiteExtensionType; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class SiteExtensionInfoImpl implements SiteExtensionInfo { + private SiteExtensionInfoInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteExtensionInfoImpl( + SiteExtensionInfoInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String extensionId() { + return this.innerModel().extensionId(); + } + + public String title() { + return this.innerModel().title(); + } + + public SiteExtensionType extensionType() { + return this.innerModel().extensionType(); + } + + public String summary() { + return this.innerModel().summary(); + } + + public String description() { + return this.innerModel().description(); + } + + public String version() { + return this.innerModel().version(); + } + + public String extensionUrl() { + return this.innerModel().extensionUrl(); + } + + public String projectUrl() { + return this.innerModel().projectUrl(); + } + + public String iconUrl() { + return this.innerModel().iconUrl(); + } + + public String licenseUrl() { + return this.innerModel().licenseUrl(); + } + + public String feedUrl() { + return this.innerModel().feedUrl(); + } + + public List authors() { + List inner = this.innerModel().authors(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String installerCommandLineParams() { + return this.innerModel().installerCommandLineParams(); + } + + public OffsetDateTime publishedDateTime() { + return this.innerModel().publishedDateTime(); + } + + public Integer downloadCount() { + return this.innerModel().downloadCount(); + } + + public Boolean localIsLatestVersion() { + return this.innerModel().localIsLatestVersion(); + } + + public String localPath() { + return this.innerModel().localPath(); + } + + public OffsetDateTime installedDateTime() { + return this.innerModel().installedDateTime(); + } + + public String provisioningState() { + return this.innerModel().provisioningState(); + } + + public String comment() { + return this.innerModel().comment(); + } + + public SiteExtensionInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteImpl.java new file mode 100644 index 0000000000000..49d09fa94ec61 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteImpl.java @@ -0,0 +1,832 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.StreamResponse; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourceInner; +import com.azure.resourcemanager.appservice.generated.models.BackupItem; +import com.azure.resourcemanager.appservice.generated.models.ClientCertMode; +import com.azure.resourcemanager.appservice.generated.models.CloningInfo; +import com.azure.resourcemanager.appservice.generated.models.CsmPublishingProfileOptions; +import com.azure.resourcemanager.appservice.generated.models.CsmSlotEntity; +import com.azure.resourcemanager.appservice.generated.models.DeletedAppRestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.ExtendedLocation; +import com.azure.resourcemanager.appservice.generated.models.FunctionSecrets; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.HostnameSslState; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.MigrateMySqlRequest; +import com.azure.resourcemanager.appservice.generated.models.Operation; +import com.azure.resourcemanager.appservice.generated.models.RedundancyMode; +import com.azure.resourcemanager.appservice.generated.models.RestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.Site; +import com.azure.resourcemanager.appservice.generated.models.SiteAvailabilityState; +import com.azure.resourcemanager.appservice.generated.models.SiteCloneability; +import com.azure.resourcemanager.appservice.generated.models.SiteConfig; +import com.azure.resourcemanager.appservice.generated.models.SlotDifference; +import com.azure.resourcemanager.appservice.generated.models.SlotSwapStatus; +import com.azure.resourcemanager.appservice.generated.models.SnapshotRestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.UsageState; +import java.io.InputStream; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +public final class SiteImpl implements Site, Site.Definition, Site.Update { + private SiteInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String state() { + return this.innerModel().state(); + } + + public List hostNames() { + List inner = this.innerModel().hostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String repositorySiteName() { + return this.innerModel().repositorySiteName(); + } + + public UsageState usageState() { + return this.innerModel().usageState(); + } + + public Boolean enabled() { + return this.innerModel().enabled(); + } + + public List enabledHostNames() { + List inner = this.innerModel().enabledHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteAvailabilityState availabilityState() { + return this.innerModel().availabilityState(); + } + + public List hostnameSslStates() { + List inner = this.innerModel().hostnameSslStates(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String serverFarmId() { + return this.innerModel().serverFarmId(); + } + + public Boolean reserved() { + return this.innerModel().reserved(); + } + + public Boolean isXenon() { + return this.innerModel().isXenon(); + } + + public Boolean hyperV() { + return this.innerModel().hyperV(); + } + + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerModel().lastModifiedTimeUtc(); + } + + public SiteConfig siteConfig() { + SiteConfigInner inner = this.innerModel().siteConfig(); + if (inner != null) { + return new SiteConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public List trafficManagerHostNames() { + List inner = this.innerModel().trafficManagerHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean scmSiteAlsoStopped() { + return this.innerModel().scmSiteAlsoStopped(); + } + + public String targetSwapSlot() { + return this.innerModel().targetSwapSlot(); + } + + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerModel().hostingEnvironmentProfile(); + } + + public Boolean clientAffinityEnabled() { + return this.innerModel().clientAffinityEnabled(); + } + + public Boolean clientCertEnabled() { + return this.innerModel().clientCertEnabled(); + } + + public ClientCertMode clientCertMode() { + return this.innerModel().clientCertMode(); + } + + public String clientCertExclusionPaths() { + return this.innerModel().clientCertExclusionPaths(); + } + + public Boolean hostNamesDisabled() { + return this.innerModel().hostNamesDisabled(); + } + + public String customDomainVerificationId() { + return this.innerModel().customDomainVerificationId(); + } + + public String outboundIpAddresses() { + return this.innerModel().outboundIpAddresses(); + } + + public String possibleOutboundIpAddresses() { + return this.innerModel().possibleOutboundIpAddresses(); + } + + public Integer containerSize() { + return this.innerModel().containerSize(); + } + + public Integer dailyMemoryTimeQuota() { + return this.innerModel().dailyMemoryTimeQuota(); + } + + public OffsetDateTime suspendedTill() { + return this.innerModel().suspendedTill(); + } + + public Integer maxNumberOfWorkers() { + return this.innerModel().maxNumberOfWorkers(); + } + + public CloningInfo cloningInfo() { + return this.innerModel().cloningInfo(); + } + + public String resourceGroup() { + return this.innerModel().resourceGroup(); + } + + public Boolean isDefaultContainer() { + return this.innerModel().isDefaultContainer(); + } + + public String defaultHostname() { + return this.innerModel().defaultHostname(); + } + + public SlotSwapStatus slotSwapStatus() { + return this.innerModel().slotSwapStatus(); + } + + public Boolean httpsOnly() { + return this.innerModel().httpsOnly(); + } + + public RedundancyMode redundancyMode() { + return this.innerModel().redundancyMode(); + } + + public UUID inProgressOperationId() { + return this.innerModel().inProgressOperationId(); + } + + public Boolean storageAccountRequired() { + return this.innerModel().storageAccountRequired(); + } + + public String keyVaultReferenceIdentity() { + return this.innerModel().keyVaultReferenceIdentity(); + } + + public String virtualNetworkSubnetId() { + return this.innerModel().virtualNetworkSubnetId(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public SiteInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private SitePatchResourceInner updateSiteEnvelope; + + public SiteImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public Site create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdate(resourceGroupName, name, this.innerModel(), Context.NONE); + return this; + } + + public Site create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdate(resourceGroupName, name, this.innerModel(), context); + return this; + } + + SiteImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new SiteInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public SiteImpl update() { + this.updateSiteEnvelope = new SitePatchResourceInner(); + return this; + } + + public Site apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateWithResponse(resourceGroupName, name, updateSiteEnvelope, Context.NONE) + .getValue(); + return this; + } + + public Site apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateWithResponse(resourceGroupName, name, updateSiteEnvelope, context) + .getValue(); + return this; + } + + SiteImpl(SiteInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + } + + public Site refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE) + .getValue(); + return this; + } + + public Site refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getByResourceGroupWithResponse(resourceGroupName, name, context) + .getValue(); + return this; + } + + public void applySlotConfigToProduction(CsmSlotEntity slotSwapEntity) { + serviceManager.webApps().applySlotConfigToProduction(resourceGroupName, name, slotSwapEntity); + } + + public Response applySlotConfigToProductionWithResponse(CsmSlotEntity slotSwapEntity, Context context) { + return serviceManager + .webApps() + .applySlotConfigToProductionWithResponse(resourceGroupName, name, slotSwapEntity, context); + } + + public BackupItem backup(BackupRequestInner request) { + return serviceManager.webApps().backup(resourceGroupName, name, request); + } + + public Response backupWithResponse(BackupRequestInner request, Context context) { + return serviceManager.webApps().backupWithResponse(resourceGroupName, name, request, context); + } + + public InputStream getWebSiteContainerLogs() { + return serviceManager.webApps().getWebSiteContainerLogs(resourceGroupName, name); + } + + public StreamResponse getWebSiteContainerLogsWithResponse(Context context) { + return serviceManager.webApps().getWebSiteContainerLogsWithResponse(resourceGroupName, name, context); + } + + public RestoreRequest discoverBackup(RestoreRequestInner request) { + return serviceManager.webApps().discoverBackup(resourceGroupName, name, request); + } + + public Response discoverBackupWithResponse(RestoreRequestInner request, Context context) { + return serviceManager.webApps().discoverBackupWithResponse(resourceGroupName, name, request, context); + } + + public SiteCloneability isCloneable() { + return serviceManager.webApps().isCloneable(resourceGroupName, name); + } + + public Response isCloneableWithResponse(Context context) { + return serviceManager.webApps().isCloneableWithResponse(resourceGroupName, name, context); + } + + public PagedIterable listSiteBackups() { + return serviceManager.webApps().listSiteBackups(resourceGroupName, name); + } + + public PagedIterable listSiteBackups(Context context) { + return serviceManager.webApps().listSiteBackups(resourceGroupName, name, context); + } + + public FunctionSecrets listSyncFunctionTriggers() { + return serviceManager.webApps().listSyncFunctionTriggers(resourceGroupName, name); + } + + public Response listSyncFunctionTriggersWithResponse(Context context) { + return serviceManager.webApps().listSyncFunctionTriggersWithResponse(resourceGroupName, name, context); + } + + public Operation migrateMySql(MigrateMySqlRequest migrationRequestEnvelope) { + return serviceManager.webApps().migrateMySql(resourceGroupName, name, migrationRequestEnvelope); + } + + public Operation migrateMySql(MigrateMySqlRequest migrationRequestEnvelope, Context context) { + return serviceManager.webApps().migrateMySql(resourceGroupName, name, migrationRequestEnvelope, context); + } + + public void generateNewSitePublishingPassword() { + serviceManager.webApps().generateNewSitePublishingPassword(resourceGroupName, name); + } + + public Response generateNewSitePublishingPasswordWithResponse(Context context) { + return serviceManager.webApps().generateNewSitePublishingPasswordWithResponse(resourceGroupName, name, context); + } + + public InputStream listPublishingProfileXmlWithSecrets(CsmPublishingProfileOptions publishingProfileOptions) { + return serviceManager + .webApps() + .listPublishingProfileXmlWithSecrets(resourceGroupName, name, publishingProfileOptions); + } + + public StreamResponse listPublishingProfileXmlWithSecretsWithResponse( + CsmPublishingProfileOptions publishingProfileOptions, Context context) { + return serviceManager + .webApps() + .listPublishingProfileXmlWithSecretsWithResponse( + resourceGroupName, name, publishingProfileOptions, context); + } + + public void resetProductionSlotConfig() { + serviceManager.webApps().resetProductionSlotConfig(resourceGroupName, name); + } + + public Response resetProductionSlotConfigWithResponse(Context context) { + return serviceManager.webApps().resetProductionSlotConfigWithResponse(resourceGroupName, name, context); + } + + public void restart() { + serviceManager.webApps().restart(resourceGroupName, name); + } + + public Response restartWithResponse(Boolean softRestart, Boolean synchronous, Context context) { + return serviceManager.webApps().restartWithResponse(resourceGroupName, name, softRestart, synchronous, context); + } + + public void restoreFromBackupBlob(RestoreRequestInner request) { + serviceManager.webApps().restoreFromBackupBlob(resourceGroupName, name, request); + } + + public void restoreFromBackupBlob(RestoreRequestInner request, Context context) { + serviceManager.webApps().restoreFromBackupBlob(resourceGroupName, name, request, context); + } + + public void restoreFromDeletedApp(DeletedAppRestoreRequest restoreRequest) { + serviceManager.webApps().restoreFromDeletedApp(resourceGroupName, name, restoreRequest); + } + + public void restoreFromDeletedApp(DeletedAppRestoreRequest restoreRequest, Context context) { + serviceManager.webApps().restoreFromDeletedApp(resourceGroupName, name, restoreRequest, context); + } + + public void restoreSnapshot(SnapshotRestoreRequest restoreRequest) { + serviceManager.webApps().restoreSnapshot(resourceGroupName, name, restoreRequest); + } + + public void restoreSnapshot(SnapshotRestoreRequest restoreRequest, Context context) { + serviceManager.webApps().restoreSnapshot(resourceGroupName, name, restoreRequest, context); + } + + public PagedIterable listSlotDifferencesFromProduction(CsmSlotEntity slotSwapEntity) { + return serviceManager.webApps().listSlotDifferencesFromProduction(resourceGroupName, name, slotSwapEntity); + } + + public PagedIterable listSlotDifferencesFromProduction( + CsmSlotEntity slotSwapEntity, Context context) { + return serviceManager + .webApps() + .listSlotDifferencesFromProduction(resourceGroupName, name, slotSwapEntity, context); + } + + public void swapSlotWithProduction(CsmSlotEntity slotSwapEntity) { + serviceManager.webApps().swapSlotWithProduction(resourceGroupName, name, slotSwapEntity); + } + + public void swapSlotWithProduction(CsmSlotEntity slotSwapEntity, Context context) { + serviceManager.webApps().swapSlotWithProduction(resourceGroupName, name, slotSwapEntity, context); + } + + public void start() { + serviceManager.webApps().start(resourceGroupName, name); + } + + public Response startWithResponse(Context context) { + return serviceManager.webApps().startWithResponse(resourceGroupName, name, context); + } + + public Object startNetworkTrace(Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return serviceManager + .webApps() + .startNetworkTrace(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); + } + + public Object startNetworkTrace() { + return serviceManager.webApps().startNetworkTrace(resourceGroupName, name); + } + + public Object startNetworkTrace(Integer durationInSeconds, Integer maxFrameLength, String sasUrl, Context context) { + return serviceManager + .webApps() + .startNetworkTrace(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context); + } + + public void stop() { + serviceManager.webApps().stop(resourceGroupName, name); + } + + public Response stopWithResponse(Context context) { + return serviceManager.webApps().stopWithResponse(resourceGroupName, name, context); + } + + public void stopNetworkTrace() { + serviceManager.webApps().stopNetworkTrace(resourceGroupName, name); + } + + public Response stopNetworkTraceWithResponse(Context context) { + return serviceManager.webApps().stopNetworkTraceWithResponse(resourceGroupName, name, context); + } + + public void syncRepository() { + serviceManager.webApps().syncRepository(resourceGroupName, name); + } + + public Response syncRepositoryWithResponse(Context context) { + return serviceManager.webApps().syncRepositoryWithResponse(resourceGroupName, name, context); + } + + public void syncFunctionTriggers() { + serviceManager.webApps().syncFunctionTriggers(resourceGroupName, name); + } + + public Response syncFunctionTriggersWithResponse(Context context) { + return serviceManager.webApps().syncFunctionTriggersWithResponse(resourceGroupName, name, context); + } + + public SiteImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SiteImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SiteImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public SiteImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateSiteEnvelope.withIdentity(identity); + return this; + } + } + + public SiteImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public SiteImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateSiteEnvelope.withKind(kind); + return this; + } + } + + public SiteImpl withEnabled(Boolean enabled) { + if (isInCreateMode()) { + this.innerModel().withEnabled(enabled); + return this; + } else { + this.updateSiteEnvelope.withEnabled(enabled); + return this; + } + } + + public SiteImpl withHostnameSslStates(List hostnameSslStates) { + if (isInCreateMode()) { + this.innerModel().withHostnameSslStates(hostnameSslStates); + return this; + } else { + this.updateSiteEnvelope.withHostnameSslStates(hostnameSslStates); + return this; + } + } + + public SiteImpl withServerFarmId(String serverFarmId) { + if (isInCreateMode()) { + this.innerModel().withServerFarmId(serverFarmId); + return this; + } else { + this.updateSiteEnvelope.withServerFarmId(serverFarmId); + return this; + } + } + + public SiteImpl withReserved(Boolean reserved) { + this.innerModel().withReserved(reserved); + return this; + } + + public SiteImpl withIsXenon(Boolean isXenon) { + this.innerModel().withIsXenon(isXenon); + return this; + } + + public SiteImpl withHyperV(Boolean hyperV) { + this.innerModel().withHyperV(hyperV); + return this; + } + + public SiteImpl withSiteConfig(SiteConfigInner siteConfig) { + if (isInCreateMode()) { + this.innerModel().withSiteConfig(siteConfig); + return this; + } else { + this.updateSiteEnvelope.withSiteConfig(siteConfig); + return this; + } + } + + public SiteImpl withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped) { + if (isInCreateMode()) { + this.innerModel().withScmSiteAlsoStopped(scmSiteAlsoStopped); + return this; + } else { + this.updateSiteEnvelope.withScmSiteAlsoStopped(scmSiteAlsoStopped); + return this; + } + } + + public SiteImpl withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) { + this.innerModel().withHostingEnvironmentProfile(hostingEnvironmentProfile); + return this; + } + + public SiteImpl withClientAffinityEnabled(Boolean clientAffinityEnabled) { + if (isInCreateMode()) { + this.innerModel().withClientAffinityEnabled(clientAffinityEnabled); + return this; + } else { + this.updateSiteEnvelope.withClientAffinityEnabled(clientAffinityEnabled); + return this; + } + } + + public SiteImpl withClientCertEnabled(Boolean clientCertEnabled) { + if (isInCreateMode()) { + this.innerModel().withClientCertEnabled(clientCertEnabled); + return this; + } else { + this.updateSiteEnvelope.withClientCertEnabled(clientCertEnabled); + return this; + } + } + + public SiteImpl withClientCertMode(ClientCertMode clientCertMode) { + if (isInCreateMode()) { + this.innerModel().withClientCertMode(clientCertMode); + return this; + } else { + this.updateSiteEnvelope.withClientCertMode(clientCertMode); + return this; + } + } + + public SiteImpl withClientCertExclusionPaths(String clientCertExclusionPaths) { + if (isInCreateMode()) { + this.innerModel().withClientCertExclusionPaths(clientCertExclusionPaths); + return this; + } else { + this.updateSiteEnvelope.withClientCertExclusionPaths(clientCertExclusionPaths); + return this; + } + } + + public SiteImpl withHostNamesDisabled(Boolean hostNamesDisabled) { + if (isInCreateMode()) { + this.innerModel().withHostNamesDisabled(hostNamesDisabled); + return this; + } else { + this.updateSiteEnvelope.withHostNamesDisabled(hostNamesDisabled); + return this; + } + } + + public SiteImpl withCustomDomainVerificationId(String customDomainVerificationId) { + if (isInCreateMode()) { + this.innerModel().withCustomDomainVerificationId(customDomainVerificationId); + return this; + } else { + this.updateSiteEnvelope.withCustomDomainVerificationId(customDomainVerificationId); + return this; + } + } + + public SiteImpl withContainerSize(Integer containerSize) { + if (isInCreateMode()) { + this.innerModel().withContainerSize(containerSize); + return this; + } else { + this.updateSiteEnvelope.withContainerSize(containerSize); + return this; + } + } + + public SiteImpl withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota) { + if (isInCreateMode()) { + this.innerModel().withDailyMemoryTimeQuota(dailyMemoryTimeQuota); + return this; + } else { + this.updateSiteEnvelope.withDailyMemoryTimeQuota(dailyMemoryTimeQuota); + return this; + } + } + + public SiteImpl withCloningInfo(CloningInfo cloningInfo) { + this.innerModel().withCloningInfo(cloningInfo); + return this; + } + + public SiteImpl withHttpsOnly(Boolean httpsOnly) { + if (isInCreateMode()) { + this.innerModel().withHttpsOnly(httpsOnly); + return this; + } else { + this.updateSiteEnvelope.withHttpsOnly(httpsOnly); + return this; + } + } + + public SiteImpl withRedundancyMode(RedundancyMode redundancyMode) { + if (isInCreateMode()) { + this.innerModel().withRedundancyMode(redundancyMode); + return this; + } else { + this.updateSiteEnvelope.withRedundancyMode(redundancyMode); + return this; + } + } + + public SiteImpl withStorageAccountRequired(Boolean storageAccountRequired) { + if (isInCreateMode()) { + this.innerModel().withStorageAccountRequired(storageAccountRequired); + return this; + } else { + this.updateSiteEnvelope.withStorageAccountRequired(storageAccountRequired); + return this; + } + } + + public SiteImpl withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity) { + if (isInCreateMode()) { + this.innerModel().withKeyVaultReferenceIdentity(keyVaultReferenceIdentity); + return this; + } else { + this.updateSiteEnvelope.withKeyVaultReferenceIdentity(keyVaultReferenceIdentity); + return this; + } + } + + public SiteImpl withVirtualNetworkSubnetId(String virtualNetworkSubnetId) { + if (isInCreateMode()) { + this.innerModel().withVirtualNetworkSubnetId(virtualNetworkSubnetId); + return this; + } else { + this.updateSiteEnvelope.withVirtualNetworkSubnetId(virtualNetworkSubnetId); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteLogsConfigImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteLogsConfigImpl.java new file mode 100644 index 0000000000000..cdfe2cefb6516 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteLogsConfigImpl.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteLogsConfigInner; +import com.azure.resourcemanager.appservice.generated.models.ApplicationLogsConfig; +import com.azure.resourcemanager.appservice.generated.models.EnabledConfig; +import com.azure.resourcemanager.appservice.generated.models.HttpLogsConfig; +import com.azure.resourcemanager.appservice.generated.models.SiteLogsConfig; + +public final class SiteLogsConfigImpl implements SiteLogsConfig { + private SiteLogsConfigInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteLogsConfigImpl( + SiteLogsConfigInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public ApplicationLogsConfig applicationLogs() { + return this.innerModel().applicationLogs(); + } + + public HttpLogsConfig httpLogs() { + return this.innerModel().httpLogs(); + } + + public EnabledConfig failedRequestsTracing() { + return this.innerModel().failedRequestsTracing(); + } + + public EnabledConfig detailedErrorMessages() { + return this.innerModel().detailedErrorMessages(); + } + + public SiteLogsConfigInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePatchResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePatchResourceImpl.java new file mode 100644 index 0000000000000..48f4e6cad03f7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePatchResourceImpl.java @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourceInner; +import com.azure.resourcemanager.appservice.generated.models.ClientCertMode; +import com.azure.resourcemanager.appservice.generated.models.CloningInfo; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.HostnameSslState; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.RedundancyMode; +import com.azure.resourcemanager.appservice.generated.models.SiteAvailabilityState; +import com.azure.resourcemanager.appservice.generated.models.SiteConfig; +import com.azure.resourcemanager.appservice.generated.models.SitePatchResource; +import com.azure.resourcemanager.appservice.generated.models.SlotSwapStatus; +import com.azure.resourcemanager.appservice.generated.models.UsageState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +public final class SitePatchResourceImpl implements SitePatchResource { + private SitePatchResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SitePatchResourceImpl( + SitePatchResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String state() { + return this.innerModel().state(); + } + + public List hostNames() { + List inner = this.innerModel().hostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String repositorySiteName() { + return this.innerModel().repositorySiteName(); + } + + public UsageState usageState() { + return this.innerModel().usageState(); + } + + public Boolean enabled() { + return this.innerModel().enabled(); + } + + public List enabledHostNames() { + List inner = this.innerModel().enabledHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteAvailabilityState availabilityState() { + return this.innerModel().availabilityState(); + } + + public List hostnameSslStates() { + List inner = this.innerModel().hostnameSslStates(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String serverFarmId() { + return this.innerModel().serverFarmId(); + } + + public Boolean reserved() { + return this.innerModel().reserved(); + } + + public Boolean isXenon() { + return this.innerModel().isXenon(); + } + + public Boolean hyperV() { + return this.innerModel().hyperV(); + } + + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerModel().lastModifiedTimeUtc(); + } + + public SiteConfig siteConfig() { + SiteConfigInner inner = this.innerModel().siteConfig(); + if (inner != null) { + return new SiteConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public List trafficManagerHostNames() { + List inner = this.innerModel().trafficManagerHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean scmSiteAlsoStopped() { + return this.innerModel().scmSiteAlsoStopped(); + } + + public String targetSwapSlot() { + return this.innerModel().targetSwapSlot(); + } + + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerModel().hostingEnvironmentProfile(); + } + + public Boolean clientAffinityEnabled() { + return this.innerModel().clientAffinityEnabled(); + } + + public Boolean clientCertEnabled() { + return this.innerModel().clientCertEnabled(); + } + + public ClientCertMode clientCertMode() { + return this.innerModel().clientCertMode(); + } + + public String clientCertExclusionPaths() { + return this.innerModel().clientCertExclusionPaths(); + } + + public Boolean hostNamesDisabled() { + return this.innerModel().hostNamesDisabled(); + } + + public String customDomainVerificationId() { + return this.innerModel().customDomainVerificationId(); + } + + public String outboundIpAddresses() { + return this.innerModel().outboundIpAddresses(); + } + + public String possibleOutboundIpAddresses() { + return this.innerModel().possibleOutboundIpAddresses(); + } + + public Integer containerSize() { + return this.innerModel().containerSize(); + } + + public Integer dailyMemoryTimeQuota() { + return this.innerModel().dailyMemoryTimeQuota(); + } + + public OffsetDateTime suspendedTill() { + return this.innerModel().suspendedTill(); + } + + public Integer maxNumberOfWorkers() { + return this.innerModel().maxNumberOfWorkers(); + } + + public CloningInfo cloningInfo() { + return this.innerModel().cloningInfo(); + } + + public String resourceGroup() { + return this.innerModel().resourceGroup(); + } + + public Boolean isDefaultContainer() { + return this.innerModel().isDefaultContainer(); + } + + public String defaultHostname() { + return this.innerModel().defaultHostname(); + } + + public SlotSwapStatus slotSwapStatus() { + return this.innerModel().slotSwapStatus(); + } + + public Boolean httpsOnly() { + return this.innerModel().httpsOnly(); + } + + public RedundancyMode redundancyMode() { + return this.innerModel().redundancyMode(); + } + + public UUID inProgressOperationId() { + return this.innerModel().inProgressOperationId(); + } + + public Boolean storageAccountRequired() { + return this.innerModel().storageAccountRequired(); + } + + public String keyVaultReferenceIdentity() { + return this.innerModel().keyVaultReferenceIdentity(); + } + + public String virtualNetworkSubnetId() { + return this.innerModel().virtualNetworkSubnetId(); + } + + public SitePatchResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePatchResourcePropertiesImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePatchResourcePropertiesImpl.java new file mode 100644 index 0000000000000..272b88307a1dc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePatchResourcePropertiesImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourcePropertiesInner; +import com.azure.resourcemanager.appservice.generated.models.ClientCertMode; +import com.azure.resourcemanager.appservice.generated.models.CloningInfo; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.HostnameSslState; +import com.azure.resourcemanager.appservice.generated.models.RedundancyMode; +import com.azure.resourcemanager.appservice.generated.models.SiteAvailabilityState; +import com.azure.resourcemanager.appservice.generated.models.SiteConfig; +import com.azure.resourcemanager.appservice.generated.models.SitePatchResourceProperties; +import com.azure.resourcemanager.appservice.generated.models.SlotSwapStatus; +import com.azure.resourcemanager.appservice.generated.models.UsageState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +public final class SitePatchResourcePropertiesImpl implements SitePatchResourceProperties { + private SitePatchResourcePropertiesInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SitePatchResourcePropertiesImpl( + SitePatchResourcePropertiesInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String state() { + return this.innerModel().state(); + } + + public List hostNames() { + List inner = this.innerModel().hostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String repositorySiteName() { + return this.innerModel().repositorySiteName(); + } + + public UsageState usageState() { + return this.innerModel().usageState(); + } + + public Boolean enabled() { + return this.innerModel().enabled(); + } + + public List enabledHostNames() { + List inner = this.innerModel().enabledHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteAvailabilityState availabilityState() { + return this.innerModel().availabilityState(); + } + + public List hostnameSslStates() { + List inner = this.innerModel().hostnameSslStates(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String serverFarmId() { + return this.innerModel().serverFarmId(); + } + + public Boolean reserved() { + return this.innerModel().reserved(); + } + + public Boolean isXenon() { + return this.innerModel().isXenon(); + } + + public Boolean hyperV() { + return this.innerModel().hyperV(); + } + + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerModel().lastModifiedTimeUtc(); + } + + public SiteConfig siteConfig() { + SiteConfigInner inner = this.innerModel().siteConfig(); + if (inner != null) { + return new SiteConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public List trafficManagerHostNames() { + List inner = this.innerModel().trafficManagerHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean scmSiteAlsoStopped() { + return this.innerModel().scmSiteAlsoStopped(); + } + + public String targetSwapSlot() { + return this.innerModel().targetSwapSlot(); + } + + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerModel().hostingEnvironmentProfile(); + } + + public Boolean clientAffinityEnabled() { + return this.innerModel().clientAffinityEnabled(); + } + + public Boolean clientCertEnabled() { + return this.innerModel().clientCertEnabled(); + } + + public ClientCertMode clientCertMode() { + return this.innerModel().clientCertMode(); + } + + public String clientCertExclusionPaths() { + return this.innerModel().clientCertExclusionPaths(); + } + + public Boolean hostNamesDisabled() { + return this.innerModel().hostNamesDisabled(); + } + + public String customDomainVerificationId() { + return this.innerModel().customDomainVerificationId(); + } + + public String outboundIpAddresses() { + return this.innerModel().outboundIpAddresses(); + } + + public String possibleOutboundIpAddresses() { + return this.innerModel().possibleOutboundIpAddresses(); + } + + public Integer containerSize() { + return this.innerModel().containerSize(); + } + + public Integer dailyMemoryTimeQuota() { + return this.innerModel().dailyMemoryTimeQuota(); + } + + public OffsetDateTime suspendedTill() { + return this.innerModel().suspendedTill(); + } + + public Integer maxNumberOfWorkers() { + return this.innerModel().maxNumberOfWorkers(); + } + + public CloningInfo cloningInfo() { + return this.innerModel().cloningInfo(); + } + + public String resourceGroup() { + return this.innerModel().resourceGroup(); + } + + public Boolean isDefaultContainer() { + return this.innerModel().isDefaultContainer(); + } + + public String defaultHostname() { + return this.innerModel().defaultHostname(); + } + + public SlotSwapStatus slotSwapStatus() { + return this.innerModel().slotSwapStatus(); + } + + public Boolean httpsOnly() { + return this.innerModel().httpsOnly(); + } + + public RedundancyMode redundancyMode() { + return this.innerModel().redundancyMode(); + } + + public UUID inProgressOperationId() { + return this.innerModel().inProgressOperationId(); + } + + public Boolean storageAccountRequired() { + return this.innerModel().storageAccountRequired(); + } + + public String keyVaultReferenceIdentity() { + return this.innerModel().keyVaultReferenceIdentity(); + } + + public String virtualNetworkSubnetId() { + return this.innerModel().virtualNetworkSubnetId(); + } + + public SitePatchResourcePropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePhpErrorLogFlagImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePhpErrorLogFlagImpl.java new file mode 100644 index 0000000000000..8af2947fc7066 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePhpErrorLogFlagImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePhpErrorLogFlagInner; +import com.azure.resourcemanager.appservice.generated.models.SitePhpErrorLogFlag; + +public final class SitePhpErrorLogFlagImpl implements SitePhpErrorLogFlag { + private SitePhpErrorLogFlagInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SitePhpErrorLogFlagImpl( + SitePhpErrorLogFlagInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String localLogErrors() { + return this.innerModel().localLogErrors(); + } + + public String masterLogErrors() { + return this.innerModel().masterLogErrors(); + } + + public String localLogErrorsMaxLength() { + return this.innerModel().localLogErrorsMaxLength(); + } + + public String masterLogErrorsMaxLength() { + return this.innerModel().masterLogErrorsMaxLength(); + } + + public SitePhpErrorLogFlagInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePropertiesImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePropertiesImpl.java new file mode 100644 index 0000000000000..73a157c2fbd7b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SitePropertiesImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePropertiesInner; +import com.azure.resourcemanager.appservice.generated.models.ClientCertMode; +import com.azure.resourcemanager.appservice.generated.models.CloningInfo; +import com.azure.resourcemanager.appservice.generated.models.HostingEnvironmentProfile; +import com.azure.resourcemanager.appservice.generated.models.HostnameSslState; +import com.azure.resourcemanager.appservice.generated.models.RedundancyMode; +import com.azure.resourcemanager.appservice.generated.models.SiteAvailabilityState; +import com.azure.resourcemanager.appservice.generated.models.SiteConfig; +import com.azure.resourcemanager.appservice.generated.models.SiteProperties; +import com.azure.resourcemanager.appservice.generated.models.SlotSwapStatus; +import com.azure.resourcemanager.appservice.generated.models.UsageState; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; +import java.util.UUID; + +public final class SitePropertiesImpl implements SiteProperties { + private SitePropertiesInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SitePropertiesImpl( + SitePropertiesInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String state() { + return this.innerModel().state(); + } + + public List hostNames() { + List inner = this.innerModel().hostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String repositorySiteName() { + return this.innerModel().repositorySiteName(); + } + + public UsageState usageState() { + return this.innerModel().usageState(); + } + + public Boolean enabled() { + return this.innerModel().enabled(); + } + + public List enabledHostNames() { + List inner = this.innerModel().enabledHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SiteAvailabilityState availabilityState() { + return this.innerModel().availabilityState(); + } + + public List hostnameSslStates() { + List inner = this.innerModel().hostnameSslStates(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String serverFarmId() { + return this.innerModel().serverFarmId(); + } + + public Boolean reserved() { + return this.innerModel().reserved(); + } + + public Boolean isXenon() { + return this.innerModel().isXenon(); + } + + public Boolean hyperV() { + return this.innerModel().hyperV(); + } + + public OffsetDateTime lastModifiedTimeUtc() { + return this.innerModel().lastModifiedTimeUtc(); + } + + public SiteConfig siteConfig() { + SiteConfigInner inner = this.innerModel().siteConfig(); + if (inner != null) { + return new SiteConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public List trafficManagerHostNames() { + List inner = this.innerModel().trafficManagerHostNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Boolean scmSiteAlsoStopped() { + return this.innerModel().scmSiteAlsoStopped(); + } + + public String targetSwapSlot() { + return this.innerModel().targetSwapSlot(); + } + + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerModel().hostingEnvironmentProfile(); + } + + public Boolean clientAffinityEnabled() { + return this.innerModel().clientAffinityEnabled(); + } + + public Boolean clientCertEnabled() { + return this.innerModel().clientCertEnabled(); + } + + public ClientCertMode clientCertMode() { + return this.innerModel().clientCertMode(); + } + + public String clientCertExclusionPaths() { + return this.innerModel().clientCertExclusionPaths(); + } + + public Boolean hostNamesDisabled() { + return this.innerModel().hostNamesDisabled(); + } + + public String customDomainVerificationId() { + return this.innerModel().customDomainVerificationId(); + } + + public String outboundIpAddresses() { + return this.innerModel().outboundIpAddresses(); + } + + public String possibleOutboundIpAddresses() { + return this.innerModel().possibleOutboundIpAddresses(); + } + + public Integer containerSize() { + return this.innerModel().containerSize(); + } + + public Integer dailyMemoryTimeQuota() { + return this.innerModel().dailyMemoryTimeQuota(); + } + + public OffsetDateTime suspendedTill() { + return this.innerModel().suspendedTill(); + } + + public Integer maxNumberOfWorkers() { + return this.innerModel().maxNumberOfWorkers(); + } + + public CloningInfo cloningInfo() { + return this.innerModel().cloningInfo(); + } + + public String resourceGroup() { + return this.innerModel().resourceGroup(); + } + + public Boolean isDefaultContainer() { + return this.innerModel().isDefaultContainer(); + } + + public String defaultHostname() { + return this.innerModel().defaultHostname(); + } + + public SlotSwapStatus slotSwapStatus() { + return this.innerModel().slotSwapStatus(); + } + + public Boolean httpsOnly() { + return this.innerModel().httpsOnly(); + } + + public RedundancyMode redundancyMode() { + return this.innerModel().redundancyMode(); + } + + public UUID inProgressOperationId() { + return this.innerModel().inProgressOperationId(); + } + + public Boolean storageAccountRequired() { + return this.innerModel().storageAccountRequired(); + } + + public String keyVaultReferenceIdentity() { + return this.innerModel().keyVaultReferenceIdentity(); + } + + public String virtualNetworkSubnetId() { + return this.innerModel().virtualNetworkSubnetId(); + } + + public SitePropertiesInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteSealImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteSealImpl.java new file mode 100644 index 0000000000000..7bcc09ded6954 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteSealImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSealInner; +import com.azure.resourcemanager.appservice.generated.models.SiteSeal; + +public final class SiteSealImpl implements SiteSeal { + private SiteSealInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteSealImpl( + SiteSealInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String html() { + return this.innerModel().html(); + } + + public SiteSealInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteSourceControlImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteSourceControlImpl.java new file mode 100644 index 0000000000000..ba9928130ecf3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SiteSourceControlImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSourceControlInner; +import com.azure.resourcemanager.appservice.generated.models.GitHubActionConfiguration; +import com.azure.resourcemanager.appservice.generated.models.SiteSourceControl; + +public final class SiteSourceControlImpl implements SiteSourceControl { + private SiteSourceControlInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SiteSourceControlImpl( + SiteSourceControlInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String repoUrl() { + return this.innerModel().repoUrl(); + } + + public String branch() { + return this.innerModel().branch(); + } + + public Boolean isManualIntegration() { + return this.innerModel().isManualIntegration(); + } + + public Boolean isGitHubAction() { + return this.innerModel().isGitHubAction(); + } + + public Boolean deploymentRollbackEnabled() { + return this.innerModel().deploymentRollbackEnabled(); + } + + public Boolean isMercurial() { + return this.innerModel().isMercurial(); + } + + public GitHubActionConfiguration gitHubActionConfiguration() { + return this.innerModel().gitHubActionConfiguration(); + } + + public SiteSourceControlInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SkuInfoImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SkuInfoImpl.java new file mode 100644 index 0000000000000..d91bb4a8e7049 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SkuInfoImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfoInner; +import com.azure.resourcemanager.appservice.generated.models.SkuCapacity; +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.azure.resourcemanager.appservice.generated.models.SkuInfo; + +public final class SkuInfoImpl implements SkuInfo { + private SkuInfoInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SkuInfoImpl( + SkuInfoInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String resourceType() { + return this.innerModel().resourceType(); + } + + public SkuDescription sku() { + return this.innerModel().sku(); + } + + public SkuCapacity capacity() { + return this.innerModel().capacity(); + } + + public SkuInfoInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SkuInfosImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SkuInfosImpl.java new file mode 100644 index 0000000000000..8d04bc51cc52c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SkuInfosImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfosInner; +import com.azure.resourcemanager.appservice.generated.models.GlobalCsmSkuDescription; +import com.azure.resourcemanager.appservice.generated.models.SkuInfos; +import java.util.Collections; +import java.util.List; + +public final class SkuInfosImpl implements SkuInfos { + private SkuInfosInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SkuInfosImpl( + SkuInfosInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String resourceType() { + return this.innerModel().resourceType(); + } + + public List skus() { + List inner = this.innerModel().skus(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SkuInfosInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SlotConfigNamesResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SlotConfigNamesResourceImpl.java new file mode 100644 index 0000000000000..8946bb72463df --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SlotConfigNamesResourceImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotConfigNamesResourceInner; +import com.azure.resourcemanager.appservice.generated.models.SlotConfigNamesResource; +import java.util.Collections; +import java.util.List; + +public final class SlotConfigNamesResourceImpl implements SlotConfigNamesResource { + private SlotConfigNamesResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SlotConfigNamesResourceImpl( + SlotConfigNamesResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public List connectionStringNames() { + List inner = this.innerModel().connectionStringNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List appSettingNames() { + List inner = this.innerModel().appSettingNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List azureStorageConfigNames() { + List inner = this.innerModel().azureStorageConfigNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public SlotConfigNamesResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SlotDifferenceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SlotDifferenceImpl.java new file mode 100644 index 0000000000000..547281d40cf11 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SlotDifferenceImpl.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotDifferenceInner; +import com.azure.resourcemanager.appservice.generated.models.SlotDifference; + +public final class SlotDifferenceImpl implements SlotDifference { + private SlotDifferenceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SlotDifferenceImpl( + SlotDifferenceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String level() { + return this.innerModel().level(); + } + + public String settingType() { + return this.innerModel().settingType(); + } + + public String diffRule() { + return this.innerModel().diffRule(); + } + + public String settingName() { + return this.innerModel().settingName(); + } + + public String valueInCurrentSlot() { + return this.innerModel().valueInCurrentSlot(); + } + + public String valueInTargetSlot() { + return this.innerModel().valueInTargetSlot(); + } + + public String description() { + return this.innerModel().description(); + } + + public SlotDifferenceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SnapshotImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SnapshotImpl.java new file mode 100644 index 0000000000000..4544f72b42a23 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SnapshotImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.appservice.generated.models.Snapshot; + +public final class SnapshotImpl implements Snapshot { + private SnapshotInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SnapshotImpl( + SnapshotInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String time() { + return this.innerModel().time(); + } + + public SnapshotInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SourceControlImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SourceControlImpl.java new file mode 100644 index 0000000000000..3efca0c074777 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SourceControlImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SourceControlInner; +import com.azure.resourcemanager.appservice.generated.models.SourceControl; +import java.time.OffsetDateTime; + +public final class SourceControlImpl implements SourceControl { + private SourceControlInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SourceControlImpl( + SourceControlInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String token() { + return this.innerModel().token(); + } + + public String tokenSecret() { + return this.innerModel().tokenSecret(); + } + + public String refreshToken() { + return this.innerModel().refreshToken(); + } + + public OffsetDateTime expirationTime() { + return this.innerModel().expirationTime(); + } + + public SourceControlInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StampCapacityImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StampCapacityImpl.java new file mode 100644 index 0000000000000..27334fdc22fd6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StampCapacityImpl.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StampCapacityInner; +import com.azure.resourcemanager.appservice.generated.models.ComputeModeOptions; +import com.azure.resourcemanager.appservice.generated.models.StampCapacity; +import com.azure.resourcemanager.appservice.generated.models.WorkerSizeOptions; + +public final class StampCapacityImpl implements StampCapacity { + private StampCapacityInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StampCapacityImpl( + StampCapacityInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String name() { + return this.innerModel().name(); + } + + public Long availableCapacity() { + return this.innerModel().availableCapacity(); + } + + public Long totalCapacity() { + return this.innerModel().totalCapacity(); + } + + public String unit() { + return this.innerModel().unit(); + } + + public ComputeModeOptions computeMode() { + return this.innerModel().computeMode(); + } + + public WorkerSizeOptions workerSize() { + return this.innerModel().workerSize(); + } + + public Integer workerSizeId() { + return this.innerModel().workerSizeId(); + } + + public Boolean excludeFromCapacityAllocation() { + return this.innerModel().excludeFromCapacityAllocation(); + } + + public Boolean isApplicableForAllComputeModes() { + return this.innerModel().isApplicableForAllComputeModes(); + } + + public String siteMode() { + return this.innerModel().siteMode(); + } + + public Boolean isLinux() { + return this.innerModel().isLinux(); + } + + public StampCapacityInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteArmResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteArmResourceImpl.java new file mode 100644 index 0000000000000..c79599ccca413 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteArmResourceImpl.java @@ -0,0 +1,465 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteArmResourceInner; +import com.azure.resourcemanager.appservice.generated.models.EnterpriseGradeCdnStatus; +import com.azure.resourcemanager.appservice.generated.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appservice.generated.models.ResponseMessageEnvelopeRemotePrivateEndpointConnection; +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.azure.resourcemanager.appservice.generated.models.StagingEnvironmentPolicy; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildProperties; +import com.azure.resourcemanager.appservice.generated.models.StaticSitePatchResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteResetPropertiesArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteTemplateOptions; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationRequestResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationResponseResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionApp; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteZipDeploymentArmResource; +import com.azure.resourcemanager.appservice.generated.models.StringDictionary; +import com.azure.resourcemanager.appservice.generated.models.StringList; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class StaticSiteArmResourceImpl + implements StaticSiteArmResource, StaticSiteArmResource.Definition, StaticSiteArmResource.Update { + private StaticSiteArmResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager 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 SkuDescription sku() { + return this.innerModel().sku(); + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String defaultHostname() { + return this.innerModel().defaultHostname(); + } + + public String repositoryUrl() { + return this.innerModel().repositoryUrl(); + } + + public String branch() { + return this.innerModel().branch(); + } + + public List customDomains() { + List inner = this.innerModel().customDomains(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String repositoryToken() { + return this.innerModel().repositoryToken(); + } + + public StaticSiteBuildProperties buildProperties() { + return this.innerModel().buildProperties(); + } + + public List privateEndpointConnections() { + List inner = + this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public StagingEnvironmentPolicy stagingEnvironmentPolicy() { + return this.innerModel().stagingEnvironmentPolicy(); + } + + public Boolean allowConfigFileUpdates() { + return this.innerModel().allowConfigFileUpdates(); + } + + public StaticSiteTemplateOptions templateProperties() { + return this.innerModel().templateProperties(); + } + + public String contentDistributionEndpoint() { + return this.innerModel().contentDistributionEndpoint(); + } + + public String keyVaultReferenceIdentity() { + return this.innerModel().keyVaultReferenceIdentity(); + } + + public List userProvidedFunctionApps() { + List inner = this.innerModel().userProvidedFunctionApps(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String provider() { + return this.innerModel().provider(); + } + + public EnterpriseGradeCdnStatus enterpriseGradeCdnStatus() { + return this.innerModel().enterpriseGradeCdnStatus(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public StaticSiteArmResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private StaticSitePatchResource updateStaticSiteEnvelope; + + public StaticSiteArmResourceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public StaticSiteArmResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .createOrUpdateStaticSite(resourceGroupName, name, this.innerModel(), Context.NONE); + return this; + } + + public StaticSiteArmResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .createOrUpdateStaticSite(resourceGroupName, name, this.innerModel(), context); + return this; + } + + StaticSiteArmResourceImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new StaticSiteArmResourceInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public StaticSiteArmResourceImpl update() { + this.updateStaticSiteEnvelope = new StaticSitePatchResource(); + return this; + } + + public StaticSiteArmResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .updateStaticSiteWithResponse(resourceGroupName, name, updateStaticSiteEnvelope, Context.NONE) + .getValue(); + return this; + } + + public StaticSiteArmResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .updateStaticSiteWithResponse(resourceGroupName, name, updateStaticSiteEnvelope, context) + .getValue(); + return this; + } + + StaticSiteArmResourceImpl( + StaticSiteArmResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "staticSites"); + } + + public StaticSiteArmResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .getByResourceGroupWithResponse(resourceGroupName, name, Context.NONE) + .getValue(); + return this; + } + + public StaticSiteArmResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .getByResourceGroupWithResponse(resourceGroupName, name, context) + .getValue(); + return this; + } + + public StaticSiteUserInvitationResponseResource createUserRolesInvitationLink( + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + return serviceManager + .staticSites() + .createUserRolesInvitationLink(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope); + } + + public Response createUserRolesInvitationLinkWithResponse( + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, Context context) { + return serviceManager + .staticSites() + .createUserRolesInvitationLinkWithResponse( + resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, context); + } + + public void detachStaticSite() { + serviceManager.staticSites().detachStaticSite(resourceGroupName, name); + } + + public void detachStaticSite(Context context) { + serviceManager.staticSites().detachStaticSite(resourceGroupName, name, context); + } + + public StringDictionary listStaticSiteAppSettings() { + return serviceManager.staticSites().listStaticSiteAppSettings(resourceGroupName, name); + } + + public Response listStaticSiteAppSettingsWithResponse(Context context) { + return serviceManager.staticSites().listStaticSiteAppSettingsWithResponse(resourceGroupName, name, context); + } + + public StringList listStaticSiteConfiguredRoles() { + return serviceManager.staticSites().listStaticSiteConfiguredRoles(resourceGroupName, name); + } + + public Response listStaticSiteConfiguredRolesWithResponse(Context context) { + return serviceManager.staticSites().listStaticSiteConfiguredRolesWithResponse(resourceGroupName, name, context); + } + + public StringDictionary listStaticSiteFunctionAppSettings() { + return serviceManager.staticSites().listStaticSiteFunctionAppSettings(resourceGroupName, name); + } + + public Response listStaticSiteFunctionAppSettingsWithResponse(Context context) { + return serviceManager + .staticSites() + .listStaticSiteFunctionAppSettingsWithResponse(resourceGroupName, name, context); + } + + public StringDictionary listStaticSiteSecrets() { + return serviceManager.staticSites().listStaticSiteSecrets(resourceGroupName, name); + } + + public Response listStaticSiteSecretsWithResponse(Context context) { + return serviceManager.staticSites().listStaticSiteSecretsWithResponse(resourceGroupName, name, context); + } + + public void resetStaticSiteApiKey(StaticSiteResetPropertiesArmResource resetPropertiesEnvelope) { + serviceManager.staticSites().resetStaticSiteApiKey(resourceGroupName, name, resetPropertiesEnvelope); + } + + public Response resetStaticSiteApiKeyWithResponse( + StaticSiteResetPropertiesArmResource resetPropertiesEnvelope, Context context) { + return serviceManager + .staticSites() + .resetStaticSiteApiKeyWithResponse(resourceGroupName, name, resetPropertiesEnvelope, context); + } + + public void createZipDeploymentForStaticSite(StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + serviceManager + .staticSites() + .createZipDeploymentForStaticSite(resourceGroupName, name, staticSiteZipDeploymentEnvelope); + } + + public void createZipDeploymentForStaticSite( + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, Context context) { + serviceManager + .staticSites() + .createZipDeploymentForStaticSite(resourceGroupName, name, staticSiteZipDeploymentEnvelope, context); + } + + public StaticSiteArmResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public StaticSiteArmResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public StaticSiteArmResourceImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public StaticSiteArmResourceImpl withSku(SkuDescription sku) { + this.innerModel().withSku(sku); + return this; + } + + public StaticSiteArmResourceImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + + public StaticSiteArmResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.innerModel().withKind(kind); + return this; + } else { + this.updateStaticSiteEnvelope.withKind(kind); + return this; + } + } + + public StaticSiteArmResourceImpl withRepositoryUrl(String repositoryUrl) { + if (isInCreateMode()) { + this.innerModel().withRepositoryUrl(repositoryUrl); + return this; + } else { + this.updateStaticSiteEnvelope.withRepositoryUrl(repositoryUrl); + return this; + } + } + + public StaticSiteArmResourceImpl withBranch(String branch) { + if (isInCreateMode()) { + this.innerModel().withBranch(branch); + return this; + } else { + this.updateStaticSiteEnvelope.withBranch(branch); + return this; + } + } + + public StaticSiteArmResourceImpl withRepositoryToken(String repositoryToken) { + if (isInCreateMode()) { + this.innerModel().withRepositoryToken(repositoryToken); + return this; + } else { + this.updateStaticSiteEnvelope.withRepositoryToken(repositoryToken); + return this; + } + } + + public StaticSiteArmResourceImpl withBuildProperties(StaticSiteBuildProperties buildProperties) { + if (isInCreateMode()) { + this.innerModel().withBuildProperties(buildProperties); + return this; + } else { + this.updateStaticSiteEnvelope.withBuildProperties(buildProperties); + return this; + } + } + + public StaticSiteArmResourceImpl withStagingEnvironmentPolicy(StagingEnvironmentPolicy stagingEnvironmentPolicy) { + if (isInCreateMode()) { + this.innerModel().withStagingEnvironmentPolicy(stagingEnvironmentPolicy); + return this; + } else { + this.updateStaticSiteEnvelope.withStagingEnvironmentPolicy(stagingEnvironmentPolicy); + return this; + } + } + + public StaticSiteArmResourceImpl withAllowConfigFileUpdates(Boolean allowConfigFileUpdates) { + if (isInCreateMode()) { + this.innerModel().withAllowConfigFileUpdates(allowConfigFileUpdates); + return this; + } else { + this.updateStaticSiteEnvelope.withAllowConfigFileUpdates(allowConfigFileUpdates); + return this; + } + } + + public StaticSiteArmResourceImpl withTemplateProperties(StaticSiteTemplateOptions templateProperties) { + if (isInCreateMode()) { + this.innerModel().withTemplateProperties(templateProperties); + return this; + } else { + this.updateStaticSiteEnvelope.withTemplateProperties(templateProperties); + return this; + } + } + + public StaticSiteArmResourceImpl withProvider(String provider) { + if (isInCreateMode()) { + this.innerModel().withProvider(provider); + return this; + } else { + this.updateStaticSiteEnvelope.withProvider(provider); + return this; + } + } + + public StaticSiteArmResourceImpl withEnterpriseGradeCdnStatus(EnterpriseGradeCdnStatus enterpriseGradeCdnStatus) { + if (isInCreateMode()) { + this.innerModel().withEnterpriseGradeCdnStatus(enterpriseGradeCdnStatus); + return this; + } else { + this.updateStaticSiteEnvelope.withEnterpriseGradeCdnStatus(enterpriseGradeCdnStatus); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteBuildArmResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteBuildArmResourceImpl.java new file mode 100644 index 0000000000000..ee5e6024ce4ac --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteBuildArmResourceImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteBuildArmResourceInner; +import com.azure.resourcemanager.appservice.generated.models.BuildStatus; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionApp; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; + +public final class StaticSiteBuildArmResourceImpl implements StaticSiteBuildArmResource { + private StaticSiteBuildArmResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StaticSiteBuildArmResourceImpl( + StaticSiteBuildArmResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String buildId() { + return this.innerModel().buildId(); + } + + public String sourceBranch() { + return this.innerModel().sourceBranch(); + } + + public String pullRequestTitle() { + return this.innerModel().pullRequestTitle(); + } + + public String hostname() { + return this.innerModel().hostname(); + } + + public OffsetDateTime createdTimeUtc() { + return this.innerModel().createdTimeUtc(); + } + + public OffsetDateTime lastUpdatedOn() { + return this.innerModel().lastUpdatedOn(); + } + + public BuildStatus status() { + return this.innerModel().status(); + } + + public List userProvidedFunctionApps() { + List inner = this.innerModel().userProvidedFunctionApps(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public StaticSiteBuildArmResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteCustomDomainOverviewArmResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteCustomDomainOverviewArmResourceImpl.java new file mode 100644 index 0000000000000..666939db0cd46 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteCustomDomainOverviewArmResourceImpl.java @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteCustomDomainOverviewArmResourceInner; +import com.azure.resourcemanager.appservice.generated.models.CustomDomainStatus; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainOverviewArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainRequestPropertiesArmResource; +import java.time.OffsetDateTime; + +public final class StaticSiteCustomDomainOverviewArmResourceImpl + implements StaticSiteCustomDomainOverviewArmResource, + StaticSiteCustomDomainOverviewArmResource.Definition, + StaticSiteCustomDomainOverviewArmResource.Update { + private StaticSiteCustomDomainOverviewArmResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String domainName() { + return this.innerModel().domainName(); + } + + public OffsetDateTime createdOn() { + return this.innerModel().createdOn(); + } + + public CustomDomainStatus status() { + return this.innerModel().status(); + } + + public String validationToken() { + return this.innerModel().validationToken(); + } + + public String errorMessage() { + return this.innerModel().errorMessage(); + } + + public StaticSiteCustomDomainOverviewArmResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String domainName; + + private StaticSiteCustomDomainRequestPropertiesArmResource createStaticSiteCustomDomainRequestPropertiesEnvelope; + + private StaticSiteCustomDomainRequestPropertiesArmResource updateStaticSiteCustomDomainRequestPropertiesEnvelope; + + public StaticSiteCustomDomainOverviewArmResourceImpl withExistingStaticSite(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public StaticSiteCustomDomainOverviewArmResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .createOrUpdateStaticSiteCustomDomain( + resourceGroupName, + name, + domainName, + createStaticSiteCustomDomainRequestPropertiesEnvelope, + Context.NONE); + return this; + } + + public StaticSiteCustomDomainOverviewArmResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .createOrUpdateStaticSiteCustomDomain( + resourceGroupName, + name, + domainName, + createStaticSiteCustomDomainRequestPropertiesEnvelope, + context); + return this; + } + + StaticSiteCustomDomainOverviewArmResourceImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new StaticSiteCustomDomainOverviewArmResourceInner(); + this.serviceManager = serviceManager; + this.domainName = name; + this.createStaticSiteCustomDomainRequestPropertiesEnvelope = + new StaticSiteCustomDomainRequestPropertiesArmResource(); + } + + public StaticSiteCustomDomainOverviewArmResourceImpl update() { + this.updateStaticSiteCustomDomainRequestPropertiesEnvelope = + new StaticSiteCustomDomainRequestPropertiesArmResource(); + return this; + } + + public StaticSiteCustomDomainOverviewArmResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .createOrUpdateStaticSiteCustomDomain( + resourceGroupName, + name, + domainName, + updateStaticSiteCustomDomainRequestPropertiesEnvelope, + Context.NONE); + return this; + } + + public StaticSiteCustomDomainOverviewArmResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .createOrUpdateStaticSiteCustomDomain( + resourceGroupName, + name, + domainName, + updateStaticSiteCustomDomainRequestPropertiesEnvelope, + context); + return this; + } + + StaticSiteCustomDomainOverviewArmResourceImpl( + StaticSiteCustomDomainOverviewArmResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "staticSites"); + this.domainName = Utils.getValueFromIdByName(innerObject.id(), "customDomains"); + } + + public StaticSiteCustomDomainOverviewArmResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .getStaticSiteCustomDomainWithResponse(resourceGroupName, name, domainName, Context.NONE) + .getValue(); + return this; + } + + public StaticSiteCustomDomainOverviewArmResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .getStaticSiteCustomDomainWithResponse(resourceGroupName, name, domainName, context) + .getValue(); + return this; + } + + public void validateCustomDomainCanBeAddedToStaticSite( + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + serviceManager + .staticSites() + .validateCustomDomainCanBeAddedToStaticSite( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope); + } + + public void validateCustomDomainCanBeAddedToStaticSite( + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + serviceManager + .staticSites() + .validateCustomDomainCanBeAddedToStaticSite( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context); + } + + public StaticSiteCustomDomainOverviewArmResourceImpl withKind(String kind) { + if (isInCreateMode()) { + this.createStaticSiteCustomDomainRequestPropertiesEnvelope.withKind(kind); + return this; + } else { + this.updateStaticSiteCustomDomainRequestPropertiesEnvelope.withKind(kind); + return this; + } + } + + public StaticSiteCustomDomainOverviewArmResourceImpl withValidationMethod(String validationMethod) { + if (isInCreateMode()) { + this.createStaticSiteCustomDomainRequestPropertiesEnvelope.withValidationMethod(validationMethod); + return this; + } else { + this.updateStaticSiteCustomDomainRequestPropertiesEnvelope.withValidationMethod(validationMethod); + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteFunctionOverviewArmResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteFunctionOverviewArmResourceImpl.java new file mode 100644 index 0000000000000..eced493215990 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteFunctionOverviewArmResourceImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteFunctionOverviewArmResourceInner; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteFunctionOverviewArmResource; +import com.azure.resourcemanager.appservice.generated.models.TriggerTypes; + +public final class StaticSiteFunctionOverviewArmResourceImpl implements StaticSiteFunctionOverviewArmResource { + private StaticSiteFunctionOverviewArmResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StaticSiteFunctionOverviewArmResourceImpl( + StaticSiteFunctionOverviewArmResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String functionName() { + return this.innerModel().functionName(); + } + + public TriggerTypes triggerType() { + return this.innerModel().triggerType(); + } + + public StaticSiteFunctionOverviewArmResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserArmResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserArmResourceImpl.java new file mode 100644 index 0000000000000..57c2828ec3789 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserArmResourceImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserArmResource; + +public final class StaticSiteUserArmResourceImpl implements StaticSiteUserArmResource { + private StaticSiteUserArmResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StaticSiteUserArmResourceImpl( + StaticSiteUserArmResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String provider() { + return this.innerModel().provider(); + } + + public String userId() { + return this.innerModel().userId(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String roles() { + return this.innerModel().roles(); + } + + public StaticSiteUserArmResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserInvitationResponseResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserInvitationResponseResourceImpl.java new file mode 100644 index 0000000000000..beecea2756d21 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserInvitationResponseResourceImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserInvitationResponseResourceInner; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationResponseResource; +import java.time.OffsetDateTime; + +public final class StaticSiteUserInvitationResponseResourceImpl implements StaticSiteUserInvitationResponseResource { + private StaticSiteUserInvitationResponseResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StaticSiteUserInvitationResponseResourceImpl( + StaticSiteUserInvitationResponseResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public OffsetDateTime expiresOn() { + return this.innerModel().expiresOn(); + } + + public String invitationUrl() { + return this.innerModel().invitationUrl(); + } + + public StaticSiteUserInvitationResponseResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserProvidedFunctionAppArmResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserProvidedFunctionAppArmResourceImpl.java new file mode 100644 index 0000000000000..a0747f5f6697e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSiteUserProvidedFunctionAppArmResourceImpl.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionAppArmResource; +import java.time.OffsetDateTime; + +public final class StaticSiteUserProvidedFunctionAppArmResourceImpl + implements StaticSiteUserProvidedFunctionAppArmResource, + StaticSiteUserProvidedFunctionAppArmResource.Definition, + StaticSiteUserProvidedFunctionAppArmResource.Update { + private StaticSiteUserProvidedFunctionAppArmResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String functionAppResourceId() { + return this.innerModel().functionAppResourceId(); + } + + public String functionAppRegion() { + return this.innerModel().functionAppRegion(); + } + + public OffsetDateTime createdOn() { + return this.innerModel().createdOn(); + } + + public StaticSiteUserProvidedFunctionAppArmResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String environmentName; + + private String functionAppName; + + private Boolean createIsForced; + + private Boolean updateIsForced; + + public StaticSiteUserProvidedFunctionAppArmResourceImpl withExistingBuild( + String resourceGroupName, String name, String environmentName) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.environmentName = environmentName; + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .registerUserProvidedFunctionAppWithStaticSiteBuild( + resourceGroupName, + name, + environmentName, + functionAppName, + this.innerModel(), + createIsForced, + Context.NONE); + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .registerUserProvidedFunctionAppWithStaticSiteBuild( + resourceGroupName, + name, + environmentName, + functionAppName, + this.innerModel(), + createIsForced, + context); + return this; + } + + StaticSiteUserProvidedFunctionAppArmResourceImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new StaticSiteUserProvidedFunctionAppArmResourceInner(); + this.serviceManager = serviceManager; + this.functionAppName = name; + this.createIsForced = null; + } + + public StaticSiteUserProvidedFunctionAppArmResourceImpl update() { + this.updateIsForced = null; + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .registerUserProvidedFunctionAppWithStaticSiteBuild( + resourceGroupName, + name, + environmentName, + functionAppName, + this.innerModel(), + updateIsForced, + Context.NONE); + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .registerUserProvidedFunctionAppWithStaticSiteBuild( + resourceGroupName, + name, + environmentName, + functionAppName, + this.innerModel(), + updateIsForced, + context); + return this; + } + + StaticSiteUserProvidedFunctionAppArmResourceImpl( + StaticSiteUserProvidedFunctionAppArmResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "staticSites"); + this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "builds"); + this.functionAppName = Utils.getValueFromIdByName(innerObject.id(), "userProvidedFunctionApps"); + } + + public StaticSiteUserProvidedFunctionAppArmResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + resourceGroupName, name, environmentName, functionAppName, Context.NONE) + .getValue(); + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getStaticSites() + .getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + resourceGroupName, name, environmentName, functionAppName, context) + .getValue(); + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResourceImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResourceImpl withFunctionAppResourceId(String functionAppResourceId) { + this.innerModel().withFunctionAppResourceId(functionAppResourceId); + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResourceImpl withFunctionAppRegion(String functionAppRegion) { + this.innerModel().withFunctionAppRegion(functionAppRegion); + return this; + } + + public StaticSiteUserProvidedFunctionAppArmResourceImpl withIsForced(Boolean isForced) { + if (isInCreateMode()) { + this.createIsForced = isForced; + return this; + } else { + this.updateIsForced = isForced; + return this; + } + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesClientImpl.java new file mode 100644 index 0000000000000..e667a742980b7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesClientImpl.java @@ -0,0 +1,11996 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.StaticSitesClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteBuildArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteCustomDomainOverviewArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteFunctionOverviewArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserInvitationResponseResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSitesWorkflowPreviewInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringListInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.PrivateEndpointConnectionCollection; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildCollection; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCollection; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainOverviewCollection; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainRequestPropertiesArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteFunctionOverviewCollection; +import com.azure.resourcemanager.appservice.generated.models.StaticSitePatchResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteResetPropertiesArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserCollection; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationRequestResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionAppsCollection; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteZipDeploymentArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSitesWorkflowPreviewRequest; +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 StaticSitesClient. */ +public final class StaticSitesClientImpl implements StaticSitesClient { + private final ClientLogger logger = new ClientLogger(StaticSitesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final StaticSitesService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of StaticSitesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + StaticSitesClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(StaticSitesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientStaticSites to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface StaticSitesService { + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}" + + "/previewStaticSiteWorkflowFile") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> previewWorkflow( + @HostParam("$host") String endpoint, + @PathParam("location") String location, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites") + @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.Web/staticSites") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @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.Web/staticSites" + + "/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdateStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StaticSiteArmResourceInner staticSiteEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StaticSitePatchResource staticSiteEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/authproviders/{authprovider}/listUsers") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteUsers( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("authprovider") String authprovider, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/authproviders/{authprovider}/users/{userid}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteStaticSiteUser( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("authprovider") String authprovider, + @PathParam("userid") String userid, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/authproviders/{authprovider}/users/{userid}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateStaticSiteUser( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("authprovider") String authprovider, + @PathParam("userid") String userid, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StaticSiteUserArmResourceInner staticSiteUserEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getStaticSiteBuilds( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/staticSites" + + "/{name}/builds/{environmentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getStaticSiteBuild( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> deleteStaticSiteBuild( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}/config/appsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateStaticSiteBuildAppSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StringDictionaryInner appSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}/config/functionappsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateStaticSiteBuildFunctionAppSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StringDictionaryInner appSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}/functions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteBuildFunctions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}/listAppSettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteBuildAppSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}/listFunctionAppSettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteBuildFunctionAppSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @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.Web/staticSites" + + "/{name}/builds/{environmentName}/userProvidedFunctionApps") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getUserProvidedFunctionAppsForStaticSiteBuild( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @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.Web/staticSites" + + "/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getUserProvidedFunctionAppForStaticSiteBuild( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("functionAppName") String functionAppName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> registerUserProvidedFunctionAppWithStaticSiteBuild( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("functionAppName") String functionAppName, + @QueryParam("isForced") Boolean isForced, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> detachUserProvidedFunctionAppFromStaticSiteBuild( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("functionAppName") String functionAppName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/builds/{environmentName}/zipdeploy") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createZipDeploymentForStaticSiteBuild( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("environmentName") String environmentName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/config/appsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateStaticSiteAppSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StringDictionaryInner appSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/config/functionappsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateStaticSiteFunctionAppSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StringDictionaryInner appSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/createUserInvitation") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createUserRolesInvitationLink( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/customDomains") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteCustomDomains( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/staticSites" + + "/{name}/customDomains/{domainName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getStaticSiteCustomDomain( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/customDomains/{domainName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdateStaticSiteCustomDomain( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/customDomains/{domainName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> deleteStaticSiteCustomDomain( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/customDomains/{domainName}/validate") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> validateCustomDomainCanBeAddedToStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainName") String domainName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/detach") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> detachStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/staticSites" + + "/{name}/functions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteFunctions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/listAppSettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteAppSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/listConfiguredRoles") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteConfiguredRoles( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/listFunctionAppSettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteFunctionAppSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/listSecrets") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listStaticSiteSecrets( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/staticSites" + + "/{name}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateEndpointConnectionList( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/staticSites" + + "/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> approveOrRejectPrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> deletePrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @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.Web/staticSites" + + "/{name}/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateLinkResources( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/resetapikey") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resetStaticSiteApiKey( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StaticSiteResetPropertiesArmResource resetPropertiesEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/userProvidedFunctionApps") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getUserProvidedFunctionAppsForStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/staticSites" + + "/{name}/userProvidedFunctionApps/{functionAppName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getUserProvidedFunctionAppForStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionAppName") String functionAppName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/userProvidedFunctionApps/{functionAppName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> registerUserProvidedFunctionAppWithStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionAppName") String functionAppName, + @QueryParam("isForced") Boolean isForced, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/userProvidedFunctionApps/{functionAppName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> detachUserProvidedFunctionAppFromStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionAppName") String functionAppName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites" + + "/{name}/zipdeploy") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createZipDeploymentForStaticSite( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getStaticSitesByResourceGroupNext( + @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> listStaticSiteUsersNext( + @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> getStaticSiteBuildsNext( + @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> listStaticSiteBuildFunctionsNext( + @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> getUserProvidedFunctionAppsForStaticSiteBuildNext( + @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> listStaticSiteCustomDomainsNext( + @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> listStaticSiteFunctionsNext( + @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> getPrivateEndpointConnectionListNext( + @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> getUserProvidedFunctionAppsForStaticSiteNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> previewWorkflowWithResponseAsync( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (staticSitesWorkflowPreviewRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSitesWorkflowPreviewRequest is required and cannot be null.")); + } else { + staticSitesWorkflowPreviewRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .previewWorkflow( + this.client.getEndpoint(), + location, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSitesWorkflowPreviewRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> previewWorkflowWithResponseAsync( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (staticSitesWorkflowPreviewRequest == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSitesWorkflowPreviewRequest is required and cannot be null.")); + } else { + staticSitesWorkflowPreviewRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .previewWorkflow( + this.client.getEndpoint(), + location, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSitesWorkflowPreviewRequest, + accept, + context); + } + + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono previewWorkflowAsync( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest) { + return previewWorkflowWithResponseAsync(location, staticSitesWorkflowPreviewRequest) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSitesWorkflowPreviewInner previewWorkflow( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest) { + return previewWorkflowAsync(location, staticSitesWorkflowPreviewRequest).block(); + } + + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response previewWorkflowWithResponse( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Context context) { + return previewWorkflowWithResponseAsync(location, staticSitesWorkflowPreviewRequest, context).block(); + } + + /** + * Description for Get all Static Sites 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 collection of static sites. + */ + @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())); + } + + /** + * Description for Get all Static Sites 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 collection of static sites. + */ + @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)); + } + + /** + * Description for Get all Static Sites 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 collection of static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all Static Sites 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 collection of static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all Static Sites 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 collection of static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for Get all Static Sites 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 collection of static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static sites. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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())); + } + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static sites. + */ + @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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + 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)); + } + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> getStaticSitesByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> getStaticSitesByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static sites. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteArmResourceInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateStaticSiteWithResponseAsync( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (staticSiteEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter staticSiteEnvelope is required and cannot be null.")); + } else { + staticSiteEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateStaticSiteWithResponseAsync( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (staticSiteEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter staticSiteEnvelope is required and cannot be null.")); + } else { + staticSiteEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteEnvelope, + accept, + context); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StaticSiteArmResourceInner> + beginCreateOrUpdateStaticSiteAsync( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope) { + Mono>> mono = + createOrUpdateStaticSiteWithResponseAsync(resourceGroupName, name, staticSiteEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + StaticSiteArmResourceInner.class, + StaticSiteArmResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StaticSiteArmResourceInner> + beginCreateOrUpdateStaticSiteAsync( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateStaticSiteWithResponseAsync(resourceGroupName, name, staticSiteEnvelope, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + StaticSiteArmResourceInner.class, + StaticSiteArmResourceInner.class, + context); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StaticSiteArmResourceInner> beginCreateOrUpdateStaticSite( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope) { + return beginCreateOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope).getSyncPoller(); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StaticSiteArmResourceInner> beginCreateOrUpdateStaticSite( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope, Context context) { + return beginCreateOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope, context).getSyncPoller(); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateStaticSiteAsync( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope) { + return beginCreateOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateStaticSiteAsync( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope, Context context) { + return beginCreateOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteArmResourceInner createOrUpdateStaticSite( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope) { + return createOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope).block(); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteArmResourceInner createOrUpdateStaticSite( + String resourceGroupName, String name, StaticSiteArmResourceInner staticSiteEnvelope, Context context) { + return createOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope, context).block(); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String name) { + return beginDeleteAsync(resourceGroupName, name).getSyncPoller(); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, name, context).getSyncPoller(); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name) { + return beginDeleteAsync(resourceGroupName, name).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, name, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 name) { + deleteAsync(resourceGroupName, name).block(); + } + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 name, Context context) { + deleteAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateStaticSiteWithResponseAsync( + String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (staticSiteEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter staticSiteEnvelope is required and cannot be null.")); + } else { + staticSiteEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateStaticSiteWithResponseAsync( + String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (staticSiteEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter staticSiteEnvelope is required and cannot be null.")); + } else { + staticSiteEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteEnvelope, + accept, + context); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateStaticSiteAsync( + String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope) { + return updateStaticSiteWithResponseAsync(resourceGroupName, name, staticSiteEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteArmResourceInner updateStaticSite( + String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope) { + return updateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope).block(); + } + + /** + * Description for Creates a new static site in an existing resource group, or updates an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to create or update. + * @param staticSiteEnvelope A JSON representation of the staticsite properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateStaticSiteWithResponse( + String resourceGroupName, String name, StaticSitePatchResource staticSiteEnvelope, Context context) { + return updateStaticSiteWithResponseAsync(resourceGroupName, name, staticSiteEnvelope, context).block(); + } + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom users. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteUsersSinglePageAsync( + String resourceGroupName, String name, String authprovider) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (authprovider == null) { + return Mono.error(new IllegalArgumentException("Parameter authprovider is required 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 + .listStaticSiteUsers( + this.client.getEndpoint(), + resourceGroupName, + name, + authprovider, + 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())); + } + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom users. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteUsersSinglePageAsync( + String resourceGroupName, String name, String authprovider, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (authprovider == null) { + return Mono.error(new IllegalArgumentException("Parameter authprovider is required 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 + .listStaticSiteUsers( + this.client.getEndpoint(), + resourceGroupName, + name, + authprovider, + 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)); + } + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom users. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listStaticSiteUsersAsync( + String resourceGroupName, String name, String authprovider) { + return new PagedFlux<>( + () -> listStaticSiteUsersSinglePageAsync(resourceGroupName, name, authprovider), + nextLink -> listStaticSiteUsersNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom users. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listStaticSiteUsersAsync( + String resourceGroupName, String name, String authprovider, Context context) { + return new PagedFlux<>( + () -> listStaticSiteUsersSinglePageAsync(resourceGroupName, name, authprovider, context), + nextLink -> listStaticSiteUsersNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom users. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listStaticSiteUsers( + String resourceGroupName, String name, String authprovider) { + return new PagedIterable<>(listStaticSiteUsersAsync(resourceGroupName, name, authprovider)); + } + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom users. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listStaticSiteUsers( + String resourceGroupName, String name, String authprovider, Context context) { + return new PagedIterable<>(listStaticSiteUsersAsync(resourceGroupName, name, authprovider, context)); + } + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteStaticSiteUserWithResponseAsync( + String resourceGroupName, String name, String authprovider, String userid) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (authprovider == null) { + return Mono.error(new IllegalArgumentException("Parameter authprovider is required and cannot be null.")); + } + if (userid == null) { + return Mono.error(new IllegalArgumentException("Parameter userid is required 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 + .deleteStaticSiteUser( + this.client.getEndpoint(), + resourceGroupName, + name, + authprovider, + userid, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteStaticSiteUserWithResponseAsync( + String resourceGroupName, String name, String authprovider, String userid, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (authprovider == null) { + return Mono.error(new IllegalArgumentException("Parameter authprovider is required and cannot be null.")); + } + if (userid == null) { + return Mono.error(new IllegalArgumentException("Parameter userid is required 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 + .deleteStaticSiteUser( + this.client.getEndpoint(), + resourceGroupName, + name, + authprovider, + userid, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteStaticSiteUserAsync( + String resourceGroupName, String name, String authprovider, String userid) { + return deleteStaticSiteUserWithResponseAsync(resourceGroupName, name, authprovider, userid) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteStaticSiteUser(String resourceGroupName, String name, String authprovider, String userid) { + deleteStaticSiteUserAsync(resourceGroupName, name, authprovider, userid).block(); + } + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteStaticSiteUserWithResponse( + String resourceGroupName, String name, String authprovider, String userid, Context context) { + return deleteStaticSiteUserWithResponseAsync(resourceGroupName, name, authprovider, userid, context).block(); + } + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateStaticSiteUserWithResponseAsync( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (authprovider == null) { + return Mono.error(new IllegalArgumentException("Parameter authprovider is required and cannot be null.")); + } + if (userid == null) { + return Mono.error(new IllegalArgumentException("Parameter userid is required 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 (staticSiteUserEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter staticSiteUserEnvelope is required and cannot be null.")); + } else { + staticSiteUserEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateStaticSiteUser( + this.client.getEndpoint(), + resourceGroupName, + name, + authprovider, + userid, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteUserEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateStaticSiteUserWithResponseAsync( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (authprovider == null) { + return Mono.error(new IllegalArgumentException("Parameter authprovider is required and cannot be null.")); + } + if (userid == null) { + return Mono.error(new IllegalArgumentException("Parameter userid is required 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 (staticSiteUserEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter staticSiteUserEnvelope is required and cannot be null.")); + } else { + staticSiteUserEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateStaticSiteUser( + this.client.getEndpoint(), + resourceGroupName, + name, + authprovider, + userid, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteUserEnvelope, + accept, + context); + } + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateStaticSiteUserAsync( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope) { + return updateStaticSiteUserWithResponseAsync( + resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserArmResourceInner updateStaticSiteUser( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope) { + return updateStaticSiteUserAsync(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope).block(); + } + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateStaticSiteUserWithResponse( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope, + Context context) { + return updateStaticSiteUserWithResponseAsync( + resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope, context) + .block(); + } + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site builds. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSiteBuildsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getStaticSiteBuilds( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site builds. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSiteBuildsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getStaticSiteBuilds( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site builds. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getStaticSiteBuildsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getStaticSiteBuildsSinglePageAsync(resourceGroupName, name), + nextLink -> getStaticSiteBuildsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site builds. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getStaticSiteBuildsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getStaticSiteBuildsSinglePageAsync(resourceGroupName, name, context), + nextLink -> getStaticSiteBuildsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site builds. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getStaticSiteBuilds(String resourceGroupName, String name) { + return new PagedIterable<>(getStaticSiteBuildsAsync(resourceGroupName, name)); + } + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site builds. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getStaticSiteBuilds( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getStaticSiteBuildsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSiteBuildWithResponseAsync( + String resourceGroupName, String name, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .getStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSiteBuildWithResponseAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .getStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getStaticSiteBuildAsync( + String resourceGroupName, String name, String environmentName) { + return getStaticSiteBuildWithResponseAsync(resourceGroupName, name, environmentName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteBuildArmResourceInner getStaticSiteBuild( + String resourceGroupName, String name, String environmentName) { + return getStaticSiteBuildAsync(resourceGroupName, name, environmentName).block(); + } + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, Context context) { + return getStaticSiteBuildWithResponseAsync(resourceGroupName, name, environmentName, context).block(); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteStaticSiteBuildWithResponseAsync( + String resourceGroupName, String name, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .deleteStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteStaticSiteBuildWithResponseAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .deleteStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteStaticSiteBuildAsync( + String resourceGroupName, String name, String environmentName) { + Mono>> mono = + deleteStaticSiteBuildWithResponseAsync(resourceGroupName, name, environmentName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteStaticSiteBuildAsync( + String resourceGroupName, String name, String environmentName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteStaticSiteBuildWithResponseAsync(resourceGroupName, name, environmentName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteStaticSiteBuild( + String resourceGroupName, String name, String environmentName) { + return beginDeleteStaticSiteBuildAsync(resourceGroupName, name, environmentName).getSyncPoller(); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteStaticSiteBuild( + String resourceGroupName, String name, String environmentName, Context context) { + return beginDeleteStaticSiteBuildAsync(resourceGroupName, name, environmentName, context).getSyncPoller(); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteStaticSiteBuildAsync(String resourceGroupName, String name, String environmentName) { + return beginDeleteStaticSiteBuildAsync(resourceGroupName, name, environmentName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteStaticSiteBuildAsync( + String resourceGroupName, String name, String environmentName, Context context) { + return beginDeleteStaticSiteBuildAsync(resourceGroupName, name, environmentName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteStaticSiteBuild(String resourceGroupName, String name, String environmentName) { + deleteStaticSiteBuildAsync(resourceGroupName, name, environmentName).block(); + } + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteStaticSiteBuild(String resourceGroupName, String name, String environmentName, Context context) { + deleteStaticSiteBuildAsync(resourceGroupName, name, environmentName, context).block(); + } + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateStaticSiteBuildAppSettingsWithResponseAsync( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateStaticSiteBuildAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateStaticSiteBuildAppSettingsWithResponseAsync( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateStaticSiteBuildAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context); + } + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateStaticSiteBuildAppSettingsAsync( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteBuildAppSettingsWithResponseAsync( + resourceGroupName, name, environmentName, appSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner createOrUpdateStaticSiteBuildAppSettings( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteBuildAppSettingsAsync(resourceGroupName, name, environmentName, appSettings) + .block(); + } + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateStaticSiteBuildAppSettingsWithResponse( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context) { + return createOrUpdateStaticSiteBuildAppSettingsWithResponseAsync( + resourceGroupName, name, environmentName, appSettings, context) + .block(); + } + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponseAsync( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateStaticSiteBuildFunctionAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponseAsync( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateStaticSiteBuildFunctionAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context); + } + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateStaticSiteBuildFunctionAppSettingsAsync( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponseAsync( + resourceGroupName, name, environmentName, appSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner createOrUpdateStaticSiteBuildFunctionAppSettings( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteBuildFunctionAppSettingsAsync( + resourceGroupName, name, environmentName, appSettings) + .block(); + } + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponse( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context) { + return createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponseAsync( + resourceGroupName, name, environmentName, appSettings, context) + .block(); + } + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteBuildFunctionsSinglePageAsync( + String resourceGroupName, String name, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .listStaticSiteBuildFunctions( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + 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())); + } + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteBuildFunctionsSinglePageAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .listStaticSiteBuildFunctions( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + 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)); + } + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listStaticSiteBuildFunctionsAsync( + String resourceGroupName, String name, String environmentName) { + return new PagedFlux<>( + () -> listStaticSiteBuildFunctionsSinglePageAsync(resourceGroupName, name, environmentName), + nextLink -> listStaticSiteBuildFunctionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listStaticSiteBuildFunctionsAsync( + String resourceGroupName, String name, String environmentName, Context context) { + return new PagedFlux<>( + () -> listStaticSiteBuildFunctionsSinglePageAsync(resourceGroupName, name, environmentName, context), + nextLink -> listStaticSiteBuildFunctionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listStaticSiteBuildFunctions( + String resourceGroupName, String name, String environmentName) { + return new PagedIterable<>(listStaticSiteBuildFunctionsAsync(resourceGroupName, name, environmentName)); + } + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listStaticSiteBuildFunctions( + String resourceGroupName, String name, String environmentName, Context context) { + return new PagedIterable<>( + listStaticSiteBuildFunctionsAsync(resourceGroupName, name, environmentName, context)); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteBuildAppSettingsWithResponseAsync( + String resourceGroupName, String name, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .listStaticSiteBuildAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteBuildAppSettingsWithResponseAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .listStaticSiteBuildAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listStaticSiteBuildAppSettingsAsync( + String resourceGroupName, String name, String environmentName) { + return listStaticSiteBuildAppSettingsWithResponseAsync(resourceGroupName, name, environmentName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listStaticSiteBuildAppSettings( + String resourceGroupName, String name, String environmentName) { + return listStaticSiteBuildAppSettingsAsync(resourceGroupName, name, environmentName).block(); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStaticSiteBuildAppSettingsWithResponse( + String resourceGroupName, String name, String environmentName, Context context) { + return listStaticSiteBuildAppSettingsWithResponseAsync(resourceGroupName, name, environmentName, context) + .block(); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteBuildFunctionAppSettingsWithResponseAsync( + String resourceGroupName, String name, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .listStaticSiteBuildFunctionAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteBuildFunctionAppSettingsWithResponseAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .listStaticSiteBuildFunctionAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listStaticSiteBuildFunctionAppSettingsAsync( + String resourceGroupName, String name, String environmentName) { + return listStaticSiteBuildFunctionAppSettingsWithResponseAsync(resourceGroupName, name, environmentName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listStaticSiteBuildFunctionAppSettings( + String resourceGroupName, String name, String environmentName) { + return listStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, environmentName).block(); + } + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStaticSiteBuildFunctionAppSettingsWithResponse( + String resourceGroupName, String name, String environmentName, Context context) { + return listStaticSiteBuildFunctionAppSettingsWithResponseAsync( + resourceGroupName, name, environmentName, context) + .block(); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppsForStaticSiteBuildSinglePageAsync( + String resourceGroupName, String name, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .getUserProvidedFunctionAppsForStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + 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())); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppsForStaticSiteBuildSinglePageAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 + .getUserProvidedFunctionAppsForStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + 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)); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + getUserProvidedFunctionAppsForStaticSiteBuildAsync( + String resourceGroupName, String name, String environmentName) { + return new PagedFlux<>( + () -> + getUserProvidedFunctionAppsForStaticSiteBuildSinglePageAsync(resourceGroupName, name, environmentName), + nextLink -> getUserProvidedFunctionAppsForStaticSiteBuildNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux + getUserProvidedFunctionAppsForStaticSiteBuildAsync( + String resourceGroupName, String name, String environmentName, Context context) { + return new PagedFlux<>( + () -> + getUserProvidedFunctionAppsForStaticSiteBuildSinglePageAsync( + resourceGroupName, name, environmentName, context), + nextLink -> getUserProvidedFunctionAppsForStaticSiteBuildNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + getUserProvidedFunctionAppsForStaticSiteBuild(String resourceGroupName, String name, String environmentName) { + return new PagedIterable<>( + getUserProvidedFunctionAppsForStaticSiteBuildAsync(resourceGroupName, name, environmentName)); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable + getUserProvidedFunctionAppsForStaticSiteBuild( + String resourceGroupName, String name, String environmentName, Context context) { + return new PagedIterable<>( + getUserProvidedFunctionAppsForStaticSiteBuildAsync(resourceGroupName, name, environmentName, context)); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppForStaticSiteBuildWithResponseAsync( + String resourceGroupName, String name, String environmentName, String functionAppName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 + .getUserProvidedFunctionAppForStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + functionAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppForStaticSiteBuildWithResponseAsync( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 + .getUserProvidedFunctionAppForStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + functionAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getUserProvidedFunctionAppForStaticSiteBuildAsync( + String resourceGroupName, String name, String environmentName, String functionAppName) { + return getUserProvidedFunctionAppForStaticSiteBuildWithResponseAsync( + resourceGroupName, name, environmentName, functionAppName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserProvidedFunctionAppArmResourceInner getUserProvidedFunctionAppForStaticSiteBuild( + String resourceGroupName, String name, String environmentName, String functionAppName) { + return getUserProvidedFunctionAppForStaticSiteBuildAsync( + resourceGroupName, name, environmentName, functionAppName) + .block(); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context) { + return getUserProvidedFunctionAppForStaticSiteBuildWithResponseAsync( + resourceGroupName, name, environmentName, functionAppName, context) + .block(); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> registerUserProvidedFunctionAppWithStaticSiteBuildWithResponseAsync( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 (staticSiteUserProvidedFunctionEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteUserProvidedFunctionEnvelope is required and cannot be null.")); + } else { + staticSiteUserProvidedFunctionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .registerUserProvidedFunctionAppWithStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + functionAppName, + isForced, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteUserProvidedFunctionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> registerUserProvidedFunctionAppWithStaticSiteBuildWithResponseAsync( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 (staticSiteUserProvidedFunctionEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteUserProvidedFunctionEnvelope is required and cannot be null.")); + } else { + staticSiteUserProvidedFunctionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .registerUserProvidedFunctionAppWithStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + functionAppName, + isForced, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteUserProvidedFunctionEnvelope, + accept, + context); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + Mono>> mono = + registerUserProvidedFunctionAppWithStaticSiteBuildWithResponseAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + StaticSiteUserProvidedFunctionAppArmResourceInner.class, + StaticSiteUserProvidedFunctionAppArmResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + registerUserProvidedFunctionAppWithStaticSiteBuildWithResponseAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced, + context); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + StaticSiteUserProvidedFunctionAppArmResourceInner.class, + StaticSiteUserProvidedFunctionAppArmResourceInner.class, + context); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + return beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced) + .getSyncPoller(); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + return beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced, + context) + .getSyncPoller(); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + registerUserProvidedFunctionAppWithStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + return beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + registerUserProvidedFunctionAppWithStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope) { + final Boolean isForced = null; + return beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono + registerUserProvidedFunctionAppWithStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + return beginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced, + context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + return registerUserProvidedFunctionAppWithStaticSiteBuildAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced) + .block(); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope) { + final Boolean isForced = null; + return registerUserProvidedFunctionAppWithStaticSiteBuildAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced) + .block(); + } + + /** + * Description for Register a user provided function app with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app to register with the static site build. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + return registerUserProvidedFunctionAppWithStaticSiteBuildAsync( + resourceGroupName, + name, + environmentName, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced, + context) + .block(); + } + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> detachUserProvidedFunctionAppFromStaticSiteBuildWithResponseAsync( + String resourceGroupName, String name, String environmentName, String functionAppName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 + .detachUserProvidedFunctionAppFromStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + functionAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> detachUserProvidedFunctionAppFromStaticSiteBuildWithResponseAsync( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 + .detachUserProvidedFunctionAppFromStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + functionAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono detachUserProvidedFunctionAppFromStaticSiteBuildAsync( + String resourceGroupName, String name, String environmentName, String functionAppName) { + return detachUserProvidedFunctionAppFromStaticSiteBuildWithResponseAsync( + resourceGroupName, name, environmentName, functionAppName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 detachUserProvidedFunctionAppFromStaticSiteBuild( + String resourceGroupName, String name, String environmentName, String functionAppName) { + detachUserProvidedFunctionAppFromStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName) + .block(); + } + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detachUserProvidedFunctionAppFromStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context) { + return detachUserProvidedFunctionAppFromStaticSiteBuildWithResponseAsync( + resourceGroupName, name, environmentName, functionAppName, context) + .block(); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createZipDeploymentForStaticSiteBuildWithResponseAsync( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 (staticSiteZipDeploymentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteZipDeploymentEnvelope is required and cannot be null.")); + } else { + staticSiteZipDeploymentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createZipDeploymentForStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteZipDeploymentEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createZipDeploymentForStaticSiteBuildWithResponseAsync( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required 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 (staticSiteZipDeploymentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteZipDeploymentEnvelope is required and cannot be null.")); + } else { + staticSiteZipDeploymentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createZipDeploymentForStaticSiteBuild( + this.client.getEndpoint(), + resourceGroupName, + name, + environmentName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteZipDeploymentEnvelope, + accept, + context); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCreateZipDeploymentForStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + Mono>> mono = + createZipDeploymentForStaticSiteBuildWithResponseAsync( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCreateZipDeploymentForStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createZipDeploymentForStaticSiteBuildWithResponseAsync( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCreateZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + return beginCreateZipDeploymentForStaticSiteBuildAsync( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope) + .getSyncPoller(); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCreateZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + return beginCreateZipDeploymentForStaticSiteBuildAsync( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, context) + .getSyncPoller(); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createZipDeploymentForStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + return beginCreateZipDeploymentForStaticSiteBuildAsync( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createZipDeploymentForStaticSiteBuildAsync( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + return beginCreateZipDeploymentForStaticSiteBuildAsync( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 createZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + createZipDeploymentForStaticSiteBuildAsync( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope) + .block(); + } + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 createZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + createZipDeploymentForStaticSiteBuildAsync( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, context) + .block(); + } + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateStaticSiteAppSettingsWithResponseAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateStaticSiteAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateStaticSiteAppSettingsWithResponseAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateStaticSiteAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context); + } + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateStaticSiteAppSettingsAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteAppSettingsWithResponseAsync(resourceGroupName, name, appSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner createOrUpdateStaticSiteAppSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteAppSettingsAsync(resourceGroupName, name, appSettings).block(); + } + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateStaticSiteAppSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + return createOrUpdateStaticSiteAppSettingsWithResponseAsync(resourceGroupName, name, appSettings, context) + .block(); + } + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateStaticSiteFunctionAppSettingsWithResponseAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateStaticSiteFunctionAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateStaticSiteFunctionAppSettingsWithResponseAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateStaticSiteFunctionAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context); + } + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateStaticSiteFunctionAppSettingsAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteFunctionAppSettingsWithResponseAsync(resourceGroupName, name, appSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner createOrUpdateStaticSiteFunctionAppSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + return createOrUpdateStaticSiteFunctionAppSettingsAsync(resourceGroupName, name, appSettings).block(); + } + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateStaticSiteFunctionAppSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + return createOrUpdateStaticSiteFunctionAppSettingsWithResponseAsync( + resourceGroupName, name, appSettings, context) + .block(); + } + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + createUserRolesInvitationLinkWithResponseAsync( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (staticSiteUserRolesInvitationEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteUserRolesInvitationEnvelope is required and cannot be null.")); + } else { + staticSiteUserRolesInvitationEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createUserRolesInvitationLink( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteUserRolesInvitationEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + createUserRolesInvitationLinkWithResponseAsync( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (staticSiteUserRolesInvitationEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteUserRolesInvitationEnvelope is required and cannot be null.")); + } else { + staticSiteUserRolesInvitationEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createUserRolesInvitationLink( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteUserRolesInvitationEnvelope, + accept, + context); + } + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createUserRolesInvitationLinkAsync( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + return createUserRolesInvitationLinkWithResponseAsync( + resourceGroupName, name, staticSiteUserRolesInvitationEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserInvitationResponseResourceInner createUserRolesInvitationLink( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + return createUserRolesInvitationLinkAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope) + .block(); + } + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createUserRolesInvitationLinkWithResponse( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, + Context context) { + return createUserRolesInvitationLinkWithResponseAsync( + resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, context) + .block(); + } + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listStaticSiteCustomDomainsSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteCustomDomains( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listStaticSiteCustomDomainsSinglePageAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteCustomDomains( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listStaticSiteCustomDomainsAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listStaticSiteCustomDomainsSinglePageAsync(resourceGroupName, name), + nextLink -> listStaticSiteCustomDomainsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listStaticSiteCustomDomainsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listStaticSiteCustomDomainsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listStaticSiteCustomDomainsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listStaticSiteCustomDomains( + String resourceGroupName, String name) { + return new PagedIterable<>(listStaticSiteCustomDomainsAsync(resourceGroupName, name)); + } + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site custom domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listStaticSiteCustomDomains( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listStaticSiteCustomDomainsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSiteCustomDomainWithResponseAsync( + String resourceGroupName, String name, String domainName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .getStaticSiteCustomDomain( + this.client.getEndpoint(), + resourceGroupName, + name, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSiteCustomDomainWithResponseAsync( + String resourceGroupName, String name, String domainName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .getStaticSiteCustomDomain( + this.client.getEndpoint(), + resourceGroupName, + name, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getStaticSiteCustomDomainAsync( + String resourceGroupName, String name, String domainName) { + return getStaticSiteCustomDomainWithResponseAsync(resourceGroupName, name, domainName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteCustomDomainOverviewArmResourceInner getStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName) { + return getStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).block(); + } + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getStaticSiteCustomDomainWithResponse( + String resourceGroupName, String name, String domainName, Context context) { + return getStaticSiteCustomDomainWithResponseAsync(resourceGroupName, name, domainName, context).block(); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateStaticSiteCustomDomainWithResponseAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 (staticSiteCustomDomainRequestPropertiesEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteCustomDomainRequestPropertiesEnvelope is required and cannot be null.")); + } else { + staticSiteCustomDomainRequestPropertiesEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateStaticSiteCustomDomain( + this.client.getEndpoint(), + resourceGroupName, + name, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteCustomDomainRequestPropertiesEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateStaticSiteCustomDomainWithResponseAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 (staticSiteCustomDomainRequestPropertiesEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteCustomDomainRequestPropertiesEnvelope is required and cannot be null.")); + } else { + staticSiteCustomDomainRequestPropertiesEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateStaticSiteCustomDomain( + this.client.getEndpoint(), + resourceGroupName, + name, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteCustomDomainRequestPropertiesEnvelope, + accept, + context); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, StaticSiteCustomDomainOverviewArmResourceInner> + beginCreateOrUpdateStaticSiteCustomDomainAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + Mono>> mono = + createOrUpdateStaticSiteCustomDomainWithResponseAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + StaticSiteCustomDomainOverviewArmResourceInner.class, + StaticSiteCustomDomainOverviewArmResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, StaticSiteCustomDomainOverviewArmResourceInner> + beginCreateOrUpdateStaticSiteCustomDomainAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateStaticSiteCustomDomainWithResponseAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + StaticSiteCustomDomainOverviewArmResourceInner.class, + StaticSiteCustomDomainOverviewArmResourceInner.class, + context); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, StaticSiteCustomDomainOverviewArmResourceInner> + beginCreateOrUpdateStaticSiteCustomDomain( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + return beginCreateOrUpdateStaticSiteCustomDomainAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope) + .getSyncPoller(); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, StaticSiteCustomDomainOverviewArmResourceInner> + beginCreateOrUpdateStaticSiteCustomDomain( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + return beginCreateOrUpdateStaticSiteCustomDomainAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context) + .getSyncPoller(); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateStaticSiteCustomDomainAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + return beginCreateOrUpdateStaticSiteCustomDomainAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateStaticSiteCustomDomainAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + return beginCreateOrUpdateStaticSiteCustomDomainAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteCustomDomainOverviewArmResourceInner createOrUpdateStaticSiteCustomDomain( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + return createOrUpdateStaticSiteCustomDomainAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope) + .block(); + } + + /** + * Description for Creates a new static site custom domain in an existing resource group and static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to create. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteCustomDomainOverviewArmResourceInner createOrUpdateStaticSiteCustomDomain( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + return createOrUpdateStaticSiteCustomDomainAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context) + .block(); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteStaticSiteCustomDomainWithResponseAsync( + String resourceGroupName, String name, String domainName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .deleteStaticSiteCustomDomain( + this.client.getEndpoint(), + resourceGroupName, + name, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteStaticSiteCustomDomainWithResponseAsync( + String resourceGroupName, String name, String domainName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 + .deleteStaticSiteCustomDomain( + this.client.getEndpoint(), + resourceGroupName, + name, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteStaticSiteCustomDomainAsync( + String resourceGroupName, String name, String domainName) { + Mono>> mono = + deleteStaticSiteCustomDomainWithResponseAsync(resourceGroupName, name, domainName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteStaticSiteCustomDomainAsync( + String resourceGroupName, String name, String domainName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteStaticSiteCustomDomainWithResponseAsync(resourceGroupName, name, domainName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName) { + return beginDeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).getSyncPoller(); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDeleteStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName, Context context) { + return beginDeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName, context).getSyncPoller(); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteStaticSiteCustomDomainAsync(String resourceGroupName, String name, String domainName) { + return beginDeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteStaticSiteCustomDomainAsync( + String resourceGroupName, String name, String domainName, Context context) { + return beginDeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteStaticSiteCustomDomain(String resourceGroupName, String name, String domainName) { + deleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).block(); + } + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName, Context context) { + deleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName, context).block(); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateCustomDomainCanBeAddedToStaticSiteWithResponseAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 (staticSiteCustomDomainRequestPropertiesEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteCustomDomainRequestPropertiesEnvelope is required and cannot be null.")); + } else { + staticSiteCustomDomainRequestPropertiesEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .validateCustomDomainCanBeAddedToStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteCustomDomainRequestPropertiesEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> validateCustomDomainCanBeAddedToStaticSiteWithResponseAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainName == null) { + return Mono.error(new IllegalArgumentException("Parameter domainName is required 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 (staticSiteCustomDomainRequestPropertiesEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteCustomDomainRequestPropertiesEnvelope is required and cannot be null.")); + } else { + staticSiteCustomDomainRequestPropertiesEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .validateCustomDomainCanBeAddedToStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + domainName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteCustomDomainRequestPropertiesEnvelope, + accept, + context); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginValidateCustomDomainCanBeAddedToStaticSiteAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + Mono>> mono = + validateCustomDomainCanBeAddedToStaticSiteWithResponseAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginValidateCustomDomainCanBeAddedToStaticSiteAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + validateCustomDomainCanBeAddedToStaticSiteWithResponseAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginValidateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + return beginValidateCustomDomainCanBeAddedToStaticSiteAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope) + .getSyncPoller(); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginValidateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + return beginValidateCustomDomainCanBeAddedToStaticSiteAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context) + .getSyncPoller(); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateCustomDomainCanBeAddedToStaticSiteAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + return beginValidateCustomDomainCanBeAddedToStaticSiteAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono validateCustomDomainCanBeAddedToStaticSiteAsync( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + return beginValidateCustomDomainCanBeAddedToStaticSiteAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 validateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + validateCustomDomainCanBeAddedToStaticSiteAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope) + .block(); + } + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 validateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + validateCustomDomainCanBeAddedToStaticSiteAsync( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context) + .block(); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> detachStaticSiteWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .detachStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> detachStaticSiteWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .detachStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDetachStaticSiteAsync(String resourceGroupName, String name) { + Mono>> mono = detachStaticSiteWithResponseAsync(resourceGroupName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDetachStaticSiteAsync( + String resourceGroupName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = detachStaticSiteWithResponseAsync(resourceGroupName, name, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDetachStaticSite(String resourceGroupName, String name) { + return beginDetachStaticSiteAsync(resourceGroupName, name).getSyncPoller(); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDetachStaticSite( + String resourceGroupName, String name, Context context) { + return beginDetachStaticSiteAsync(resourceGroupName, name, context).getSyncPoller(); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono detachStaticSiteAsync(String resourceGroupName, String name) { + return beginDetachStaticSiteAsync(resourceGroupName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono detachStaticSiteAsync(String resourceGroupName, String name, Context context) { + return beginDetachStaticSiteAsync(resourceGroupName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 detachStaticSite(String resourceGroupName, String name) { + detachStaticSiteAsync(resourceGroupName, name).block(); + } + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 detachStaticSite(String resourceGroupName, String name, Context context) { + detachStaticSiteAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteFunctionsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteFunctions( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteFunctionsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteFunctions( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listStaticSiteFunctionsAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listStaticSiteFunctionsSinglePageAsync(resourceGroupName, name), + nextLink -> listStaticSiteFunctionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listStaticSiteFunctionsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listStaticSiteFunctionsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listStaticSiteFunctionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listStaticSiteFunctions( + String resourceGroupName, String name) { + return new PagedIterable<>(listStaticSiteFunctionsAsync(resourceGroupName, name)); + } + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site functions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listStaticSiteFunctions( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listStaticSiteFunctionsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteAppSettingsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteAppSettingsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listStaticSiteAppSettingsAsync(String resourceGroupName, String name) { + return listStaticSiteAppSettingsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listStaticSiteAppSettings(String resourceGroupName, String name) { + return listStaticSiteAppSettingsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStaticSiteAppSettingsWithResponse( + String resourceGroupName, String name, Context context) { + return listStaticSiteAppSettingsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteConfiguredRolesWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteConfiguredRoles( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteConfiguredRolesWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteConfiguredRoles( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listStaticSiteConfiguredRolesAsync(String resourceGroupName, String name) { + return listStaticSiteConfiguredRolesWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringListInner listStaticSiteConfiguredRoles(String resourceGroupName, String name) { + return listStaticSiteConfiguredRolesAsync(resourceGroupName, name).block(); + } + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStaticSiteConfiguredRolesWithResponse( + String resourceGroupName, String name, Context context) { + return listStaticSiteConfiguredRolesWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteFunctionAppSettingsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteFunctionAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteFunctionAppSettingsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteFunctionAppSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listStaticSiteFunctionAppSettingsAsync(String resourceGroupName, String name) { + return listStaticSiteFunctionAppSettingsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listStaticSiteFunctionAppSettings(String resourceGroupName, String name) { + return listStaticSiteFunctionAppSettingsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStaticSiteFunctionAppSettingsWithResponse( + String resourceGroupName, String name, Context context) { + return listStaticSiteFunctionAppSettingsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteSecretsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteSecretsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listStaticSiteSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listStaticSiteSecretsAsync(String resourceGroupName, String name) { + return listStaticSiteSecretsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listStaticSiteSecrets(String resourceGroupName, String name) { + return listStaticSiteSecretsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listStaticSiteSecretsWithResponse( + String resourceGroupName, String name, Context context) { + return listStaticSiteSecretsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateEndpointConnectionList( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSinglePageAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateEndpointConnectionList( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getPrivateEndpointConnectionListAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getPrivateEndpointConnectionListSinglePageAsync(resourceGroupName, name), + nextLink -> getPrivateEndpointConnectionListNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getPrivateEndpointConnectionListAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getPrivateEndpointConnectionListSinglePageAsync(resourceGroupName, name, context), + nextLink -> getPrivateEndpointConnectionListNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name) { + return new PagedIterable<>(getPrivateEndpointConnectionListAsync(resourceGroupName, name)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getPrivateEndpointConnectionListAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .getPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .getPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return getPrivateEndpointConnectionWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return getPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).block(); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return getPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .block(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveOrRejectPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 (privateEndpointWrapper == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); + } else { + privateEndpointWrapper.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .approveOrRejectPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + privateEndpointWrapper, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveOrRejectPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 (privateEndpointWrapper == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); + } else { + privateEndpointWrapper.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .approveOrRejectPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + privateEndpointWrapper, + accept, + context); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + Mono>> mono = + approveOrRejectPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + RemotePrivateEndpointConnectionArmResourceInner.class, + RemotePrivateEndpointConnectionArmResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + approveOrRejectPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + RemotePrivateEndpointConnectionArmResourceInner.class, + RemotePrivateEndpointConnectionArmResourceInner.class, + context); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return approveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .block(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return approveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .block(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .deletePrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .deletePrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginDeletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + Mono>> mono = + deletePrivateEndpointConnectionWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Object.class, Object.class, this.client.getContext()); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginDeletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deletePrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Object.class, Object.class, context); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return beginDeletePrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return beginDeletePrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return deletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).block(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return deletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, context) + .block(); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourcesWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateLinkResources( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourcesWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateLinkResources( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateLinkResourcesAsync(String resourceGroupName, String name) { + return getPrivateLinkResourcesWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourcesWrapperInner getPrivateLinkResources(String resourceGroupName, String name) { + return getPrivateLinkResourcesAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context) { + return getPrivateLinkResourcesWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetStaticSiteApiKeyWithResponseAsync( + String resourceGroupName, String name, StaticSiteResetPropertiesArmResource resetPropertiesEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (resetPropertiesEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resetPropertiesEnvelope is required and cannot be null.")); + } else { + resetPropertiesEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .resetStaticSiteApiKey( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resetPropertiesEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetStaticSiteApiKeyWithResponseAsync( + String resourceGroupName, + String name, + StaticSiteResetPropertiesArmResource resetPropertiesEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (resetPropertiesEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter resetPropertiesEnvelope is required and cannot be null.")); + } else { + resetPropertiesEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .resetStaticSiteApiKey( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + resetPropertiesEnvelope, + accept, + context); + } + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetStaticSiteApiKeyAsync( + String resourceGroupName, String name, StaticSiteResetPropertiesArmResource resetPropertiesEnvelope) { + return resetStaticSiteApiKeyWithResponseAsync(resourceGroupName, name, resetPropertiesEnvelope) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetStaticSiteApiKey( + String resourceGroupName, String name, StaticSiteResetPropertiesArmResource resetPropertiesEnvelope) { + resetStaticSiteApiKeyAsync(resourceGroupName, name, resetPropertiesEnvelope).block(); + } + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetStaticSiteApiKeyWithResponse( + String resourceGroupName, + String name, + StaticSiteResetPropertiesArmResource resetPropertiesEnvelope, + Context context) { + return resetStaticSiteApiKeyWithResponseAsync(resourceGroupName, name, resetPropertiesEnvelope, context) + .block(); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppsForStaticSiteSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getUserProvidedFunctionAppsForStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppsForStaticSiteSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getUserProvidedFunctionAppsForStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getUserProvidedFunctionAppsForStaticSiteAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getUserProvidedFunctionAppsForStaticSiteSinglePageAsync(resourceGroupName, name), + nextLink -> getUserProvidedFunctionAppsForStaticSiteNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getUserProvidedFunctionAppsForStaticSiteAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getUserProvidedFunctionAppsForStaticSiteSinglePageAsync(resourceGroupName, name, context), + nextLink -> getUserProvidedFunctionAppsForStaticSiteNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getUserProvidedFunctionAppsForStaticSite( + String resourceGroupName, String name) { + return new PagedIterable<>(getUserProvidedFunctionAppsForStaticSiteAsync(resourceGroupName, name)); + } + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getUserProvidedFunctionAppsForStaticSite( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getUserProvidedFunctionAppsForStaticSiteAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppForStaticSiteWithResponseAsync( + String resourceGroupName, String name, String functionAppName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 + .getUserProvidedFunctionAppForStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + functionAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppForStaticSiteWithResponseAsync( + String resourceGroupName, String name, String functionAppName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 + .getUserProvidedFunctionAppForStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + functionAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getUserProvidedFunctionAppForStaticSiteAsync( + String resourceGroupName, String name, String functionAppName) { + return getUserProvidedFunctionAppForStaticSiteWithResponseAsync(resourceGroupName, name, functionAppName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserProvidedFunctionAppArmResourceInner getUserProvidedFunctionAppForStaticSite( + String resourceGroupName, String name, String functionAppName) { + return getUserProvidedFunctionAppForStaticSiteAsync(resourceGroupName, name, functionAppName).block(); + } + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response + getUserProvidedFunctionAppForStaticSiteWithResponse( + String resourceGroupName, String name, String functionAppName, Context context) { + return getUserProvidedFunctionAppForStaticSiteWithResponseAsync( + resourceGroupName, name, functionAppName, context) + .block(); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> registerUserProvidedFunctionAppWithStaticSiteWithResponseAsync( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 (staticSiteUserProvidedFunctionEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteUserProvidedFunctionEnvelope is required and cannot be null.")); + } else { + staticSiteUserProvidedFunctionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .registerUserProvidedFunctionAppWithStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + functionAppName, + isForced, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteUserProvidedFunctionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> registerUserProvidedFunctionAppWithStaticSiteWithResponseAsync( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 (staticSiteUserProvidedFunctionEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteUserProvidedFunctionEnvelope is required and cannot be null.")); + } else { + staticSiteUserProvidedFunctionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .registerUserProvidedFunctionAppWithStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + functionAppName, + isForced, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteUserProvidedFunctionEnvelope, + accept, + context); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSiteAsync( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + Mono>> mono = + registerUserProvidedFunctionAppWithStaticSiteWithResponseAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + StaticSiteUserProvidedFunctionAppArmResourceInner.class, + StaticSiteUserProvidedFunctionAppArmResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSiteAsync( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + registerUserProvidedFunctionAppWithStaticSiteWithResponseAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, context); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + StaticSiteUserProvidedFunctionAppArmResourceInner.class, + StaticSiteUserProvidedFunctionAppArmResourceInner.class, + context); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + return beginRegisterUserProvidedFunctionAppWithStaticSiteAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + .getSyncPoller(); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + StaticSiteUserProvidedFunctionAppArmResourceInner> + beginRegisterUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + return beginRegisterUserProvidedFunctionAppWithStaticSiteAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, context) + .getSyncPoller(); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono registerUserProvidedFunctionAppWithStaticSiteAsync( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + return beginRegisterUserProvidedFunctionAppWithStaticSiteAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono registerUserProvidedFunctionAppWithStaticSiteAsync( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope) { + final Boolean isForced = null; + return beginRegisterUserProvidedFunctionAppWithStaticSiteAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono registerUserProvidedFunctionAppWithStaticSiteAsync( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + return beginRegisterUserProvidedFunctionAppWithStaticSiteAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + return registerUserProvidedFunctionAppWithStaticSiteAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + .block(); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope) { + final Boolean isForced = null; + return registerUserProvidedFunctionAppWithStaticSiteAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced) + .block(); + } + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StaticSiteUserProvidedFunctionAppArmResourceInner registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + return registerUserProvidedFunctionAppWithStaticSiteAsync( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, context) + .block(); + } + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> detachUserProvidedFunctionAppFromStaticSiteWithResponseAsync( + String resourceGroupName, String name, String functionAppName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 + .detachUserProvidedFunctionAppFromStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + functionAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> detachUserProvidedFunctionAppFromStaticSiteWithResponseAsync( + String resourceGroupName, String name, String functionAppName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required 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 + .detachUserProvidedFunctionAppFromStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + functionAppName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono detachUserProvidedFunctionAppFromStaticSiteAsync( + String resourceGroupName, String name, String functionAppName) { + return detachUserProvidedFunctionAppFromStaticSiteWithResponseAsync(resourceGroupName, name, functionAppName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 detachUserProvidedFunctionAppFromStaticSite( + String resourceGroupName, String name, String functionAppName) { + detachUserProvidedFunctionAppFromStaticSiteAsync(resourceGroupName, name, functionAppName).block(); + } + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response detachUserProvidedFunctionAppFromStaticSiteWithResponse( + String resourceGroupName, String name, String functionAppName, Context context) { + return detachUserProvidedFunctionAppFromStaticSiteWithResponseAsync( + resourceGroupName, name, functionAppName, context) + .block(); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createZipDeploymentForStaticSiteWithResponseAsync( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (staticSiteZipDeploymentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteZipDeploymentEnvelope is required and cannot be null.")); + } else { + staticSiteZipDeploymentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createZipDeploymentForStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteZipDeploymentEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createZipDeploymentForStaticSiteWithResponseAsync( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (staticSiteZipDeploymentEnvelope == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter staticSiteZipDeploymentEnvelope is required and cannot be null.")); + } else { + staticSiteZipDeploymentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createZipDeploymentForStaticSite( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + staticSiteZipDeploymentEnvelope, + accept, + context); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCreateZipDeploymentForStaticSiteAsync( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + Mono>> mono = + createZipDeploymentForStaticSiteWithResponseAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginCreateZipDeploymentForStaticSiteAsync( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createZipDeploymentForStaticSiteWithResponseAsync( + resourceGroupName, name, staticSiteZipDeploymentEnvelope, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCreateZipDeploymentForStaticSite( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + return beginCreateZipDeploymentForStaticSiteAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope) + .getSyncPoller(); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginCreateZipDeploymentForStaticSite( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + return beginCreateZipDeploymentForStaticSiteAsync( + resourceGroupName, name, staticSiteZipDeploymentEnvelope, context) + .getSyncPoller(); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createZipDeploymentForStaticSiteAsync( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + return beginCreateZipDeploymentForStaticSiteAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createZipDeploymentForStaticSiteAsync( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + return beginCreateZipDeploymentForStaticSiteAsync( + resourceGroupName, name, staticSiteZipDeploymentEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 createZipDeploymentForStaticSite( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + createZipDeploymentForStaticSiteAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope).block(); + } + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 createZipDeploymentForStaticSite( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + createZipDeploymentForStaticSiteAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static sites. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static sites. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static sites. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSitesByResourceGroupNextSinglePageAsync( + 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.getStaticSitesByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static sites. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSitesByResourceGroupNextSinglePageAsync( + 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 + .getStaticSitesByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site custom users. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteUsersNextSinglePageAsync( + 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.listStaticSiteUsersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site custom users. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteUsersNextSinglePageAsync( + 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 + .listStaticSiteUsersNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site builds. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSiteBuildsNextSinglePageAsync( + 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.getStaticSiteBuildsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site builds. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getStaticSiteBuildsNextSinglePageAsync( + 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 + .getStaticSiteBuildsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site functions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listStaticSiteBuildFunctionsNextSinglePageAsync(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.listStaticSiteBuildFunctionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site functions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listStaticSiteBuildFunctionsNextSinglePageAsync(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 + .listStaticSiteBuildFunctionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppsForStaticSiteBuildNextSinglePageAsync(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 + .getUserProvidedFunctionAppsForStaticSiteBuildNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppsForStaticSiteBuildNextSinglePageAsync(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 + .getUserProvidedFunctionAppsForStaticSiteBuildNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site custom domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listStaticSiteCustomDomainsNextSinglePageAsync(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.listStaticSiteCustomDomainsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site custom domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listStaticSiteCustomDomainsNextSinglePageAsync(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 + .listStaticSiteCustomDomainsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site functions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteFunctionsNextSinglePageAsync( + 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.listStaticSiteFunctionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site functions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listStaticSiteFunctionsNextSinglePageAsync( + 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 + .listStaticSiteFunctionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListNextSinglePageAsync(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.getPrivateEndpointConnectionListNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListNextSinglePageAsync(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 + .getPrivateEndpointConnectionListNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppsForStaticSiteNextSinglePageAsync(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 + .getUserProvidedFunctionAppsForStaticSiteNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of static site user provided function apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getUserProvidedFunctionAppsForStaticSiteNextSinglePageAsync(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 + .getUserProvidedFunctionAppsForStaticSiteNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesImpl.java new file mode 100644 index 0000000000000..d630a3c1a5c56 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesImpl.java @@ -0,0 +1,1310 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.StaticSitesClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteBuildArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteCustomDomainOverviewArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteFunctionOverviewArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserInvitationResponseResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSitesWorkflowPreviewInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringListInner; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkResourcesWrapper; +import com.azure.resourcemanager.appservice.generated.models.RemotePrivateEndpointConnectionArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainOverviewArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainRequestPropertiesArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteFunctionOverviewArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteResetPropertiesArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationRequestResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationResponseResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserProvidedFunctionAppArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteZipDeploymentArmResource; +import com.azure.resourcemanager.appservice.generated.models.StaticSites; +import com.azure.resourcemanager.appservice.generated.models.StaticSitesWorkflowPreview; +import com.azure.resourcemanager.appservice.generated.models.StaticSitesWorkflowPreviewRequest; +import com.azure.resourcemanager.appservice.generated.models.StringDictionary; +import com.azure.resourcemanager.appservice.generated.models.StringList; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class StaticSitesImpl implements StaticSites { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSitesImpl.class); + + private final StaticSitesClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public StaticSitesImpl( + StaticSitesClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public StaticSitesWorkflowPreview previewWorkflow( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest) { + StaticSitesWorkflowPreviewInner inner = + this.serviceClient().previewWorkflow(location, staticSitesWorkflowPreviewRequest); + if (inner != null) { + return new StaticSitesWorkflowPreviewImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response previewWorkflowWithResponse( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Context context) { + Response inner = + this.serviceClient().previewWorkflowWithResponse(location, staticSitesWorkflowPreviewRequest, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StaticSitesWorkflowPreviewImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new StaticSiteArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new StaticSiteArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new StaticSiteArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new StaticSiteArmResourceImpl(inner1, this.manager())); + } + + public StaticSiteArmResource getByResourceGroup(String resourceGroupName, String name) { + StaticSiteArmResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name); + if (inner != null) { + return new StaticSiteArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StaticSiteArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String name) { + this.serviceClient().delete(resourceGroupName, name); + } + + public void delete(String resourceGroupName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, name, context); + } + + public PagedIterable listStaticSiteUsers( + String resourceGroupName, String name, String authprovider) { + PagedIterable inner = + this.serviceClient().listStaticSiteUsers(resourceGroupName, name, authprovider); + return Utils.mapPage(inner, inner1 -> new StaticSiteUserArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable listStaticSiteUsers( + String resourceGroupName, String name, String authprovider, Context context) { + PagedIterable inner = + this.serviceClient().listStaticSiteUsers(resourceGroupName, name, authprovider, context); + return Utils.mapPage(inner, inner1 -> new StaticSiteUserArmResourceImpl(inner1, this.manager())); + } + + public void deleteStaticSiteUser(String resourceGroupName, String name, String authprovider, String userid) { + this.serviceClient().deleteStaticSiteUser(resourceGroupName, name, authprovider, userid); + } + + public Response deleteStaticSiteUserWithResponse( + String resourceGroupName, String name, String authprovider, String userid, Context context) { + return this + .serviceClient() + .deleteStaticSiteUserWithResponse(resourceGroupName, name, authprovider, userid, context); + } + + public StaticSiteUserArmResource updateStaticSiteUser( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope) { + StaticSiteUserArmResourceInner inner = + this + .serviceClient() + .updateStaticSiteUser(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope); + if (inner != null) { + return new StaticSiteUserArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateStaticSiteUserWithResponse( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateStaticSiteUserWithResponse( + resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StaticSiteUserArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getStaticSiteBuilds(String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getStaticSiteBuilds(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new StaticSiteBuildArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable getStaticSiteBuilds( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getStaticSiteBuilds(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new StaticSiteBuildArmResourceImpl(inner1, this.manager())); + } + + public StaticSiteBuildArmResource getStaticSiteBuild( + String resourceGroupName, String name, String environmentName) { + StaticSiteBuildArmResourceInner inner = + this.serviceClient().getStaticSiteBuild(resourceGroupName, name, environmentName); + if (inner != null) { + return new StaticSiteBuildArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, Context context) { + Response inner = + this.serviceClient().getStaticSiteBuildWithResponse(resourceGroupName, name, environmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StaticSiteBuildArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteStaticSiteBuild(String resourceGroupName, String name, String environmentName) { + this.serviceClient().deleteStaticSiteBuild(resourceGroupName, name, environmentName); + } + + public void deleteStaticSiteBuild(String resourceGroupName, String name, String environmentName, Context context) { + this.serviceClient().deleteStaticSiteBuild(resourceGroupName, name, environmentName, context); + } + + public StringDictionary createOrUpdateStaticSiteBuildAppSettings( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings) { + StringDictionaryInner inner = + this + .serviceClient() + .createOrUpdateStaticSiteBuildAppSettings(resourceGroupName, name, environmentName, appSettings); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateStaticSiteBuildAppSettingsWithResponse( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateStaticSiteBuildAppSettingsWithResponse( + resourceGroupName, name, environmentName, appSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary createOrUpdateStaticSiteBuildFunctionAppSettings( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings) { + StringDictionaryInner inner = + this + .serviceClient() + .createOrUpdateStaticSiteBuildFunctionAppSettings( + resourceGroupName, name, environmentName, appSettings); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponse( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponse( + resourceGroupName, name, environmentName, appSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listStaticSiteBuildFunctions( + String resourceGroupName, String name, String environmentName) { + PagedIterable inner = + this.serviceClient().listStaticSiteBuildFunctions(resourceGroupName, name, environmentName); + return Utils.mapPage(inner, inner1 -> new StaticSiteFunctionOverviewArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable listStaticSiteBuildFunctions( + String resourceGroupName, String name, String environmentName, Context context) { + PagedIterable inner = + this.serviceClient().listStaticSiteBuildFunctions(resourceGroupName, name, environmentName, context); + return Utils.mapPage(inner, inner1 -> new StaticSiteFunctionOverviewArmResourceImpl(inner1, this.manager())); + } + + public StringDictionary listStaticSiteBuildAppSettings( + String resourceGroupName, String name, String environmentName) { + StringDictionaryInner inner = + this.serviceClient().listStaticSiteBuildAppSettings(resourceGroupName, name, environmentName); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listStaticSiteBuildAppSettingsWithResponse( + String resourceGroupName, String name, String environmentName, Context context) { + Response inner = + this + .serviceClient() + .listStaticSiteBuildAppSettingsWithResponse(resourceGroupName, name, environmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary listStaticSiteBuildFunctionAppSettings( + String resourceGroupName, String name, String environmentName) { + StringDictionaryInner inner = + this.serviceClient().listStaticSiteBuildFunctionAppSettings(resourceGroupName, name, environmentName); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listStaticSiteBuildFunctionAppSettingsWithResponse( + String resourceGroupName, String name, String environmentName, Context context) { + Response inner = + this + .serviceClient() + .listStaticSiteBuildFunctionAppSettingsWithResponse(resourceGroupName, name, environmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getUserProvidedFunctionAppsForStaticSiteBuild( + String resourceGroupName, String name, String environmentName) { + PagedIterable inner = + this + .serviceClient() + .getUserProvidedFunctionAppsForStaticSiteBuild(resourceGroupName, name, environmentName); + return Utils + .mapPage(inner, inner1 -> new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable getUserProvidedFunctionAppsForStaticSiteBuild( + String resourceGroupName, String name, String environmentName, Context context) { + PagedIterable inner = + this + .serviceClient() + .getUserProvidedFunctionAppsForStaticSiteBuild(resourceGroupName, name, environmentName, context); + return Utils + .mapPage(inner, inner1 -> new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner1, this.manager())); + } + + public StaticSiteUserProvidedFunctionAppArmResource getUserProvidedFunctionAppForStaticSiteBuild( + String resourceGroupName, String name, String environmentName, String functionAppName) { + StaticSiteUserProvidedFunctionAppArmResourceInner inner = + this + .serviceClient() + .getUserProvidedFunctionAppForStaticSiteBuild( + resourceGroupName, name, environmentName, functionAppName); + if (inner != null) { + return new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response + getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context) { + Response inner = + this + .serviceClient() + .getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + resourceGroupName, name, environmentName, functionAppName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void detachUserProvidedFunctionAppFromStaticSiteBuild( + String resourceGroupName, String name, String environmentName, String functionAppName) { + this + .serviceClient() + .detachUserProvidedFunctionAppFromStaticSiteBuild( + resourceGroupName, name, environmentName, functionAppName); + } + + public Response detachUserProvidedFunctionAppFromStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context) { + return this + .serviceClient() + .detachUserProvidedFunctionAppFromStaticSiteBuildWithResponse( + resourceGroupName, name, environmentName, functionAppName, context); + } + + public void createZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + this + .serviceClient() + .createZipDeploymentForStaticSiteBuild( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope); + } + + public void createZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + this + .serviceClient() + .createZipDeploymentForStaticSiteBuild( + resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, context); + } + + public StringDictionary createOrUpdateStaticSiteAppSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + StringDictionaryInner inner = + this.serviceClient().createOrUpdateStaticSiteAppSettings(resourceGroupName, name, appSettings); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateStaticSiteAppSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateStaticSiteAppSettingsWithResponse(resourceGroupName, name, appSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary createOrUpdateStaticSiteFunctionAppSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + StringDictionaryInner inner = + this.serviceClient().createOrUpdateStaticSiteFunctionAppSettings(resourceGroupName, name, appSettings); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateStaticSiteFunctionAppSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateStaticSiteFunctionAppSettingsWithResponse(resourceGroupName, name, appSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StaticSiteUserInvitationResponseResource createUserRolesInvitationLink( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) { + StaticSiteUserInvitationResponseResourceInner inner = + this + .serviceClient() + .createUserRolesInvitationLink(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope); + if (inner != null) { + return new StaticSiteUserInvitationResponseResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createUserRolesInvitationLinkWithResponse( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createUserRolesInvitationLinkWithResponse( + resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StaticSiteUserInvitationResponseResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listStaticSiteCustomDomains( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listStaticSiteCustomDomains(resourceGroupName, name); + return Utils + .mapPage(inner, inner1 -> new StaticSiteCustomDomainOverviewArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable listStaticSiteCustomDomains( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listStaticSiteCustomDomains(resourceGroupName, name, context); + return Utils + .mapPage(inner, inner1 -> new StaticSiteCustomDomainOverviewArmResourceImpl(inner1, this.manager())); + } + + public StaticSiteCustomDomainOverviewArmResource getStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName) { + StaticSiteCustomDomainOverviewArmResourceInner inner = + this.serviceClient().getStaticSiteCustomDomain(resourceGroupName, name, domainName); + if (inner != null) { + return new StaticSiteCustomDomainOverviewArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getStaticSiteCustomDomainWithResponse( + String resourceGroupName, String name, String domainName, Context context) { + Response inner = + this.serviceClient().getStaticSiteCustomDomainWithResponse(resourceGroupName, name, domainName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StaticSiteCustomDomainOverviewArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteStaticSiteCustomDomain(String resourceGroupName, String name, String domainName) { + this.serviceClient().deleteStaticSiteCustomDomain(resourceGroupName, name, domainName); + } + + public void deleteStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName, Context context) { + this.serviceClient().deleteStaticSiteCustomDomain(resourceGroupName, name, domainName, context); + } + + public void validateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope) { + this + .serviceClient() + .validateCustomDomainCanBeAddedToStaticSite( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope); + } + + public void validateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context) { + this + .serviceClient() + .validateCustomDomainCanBeAddedToStaticSite( + resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, context); + } + + public void detachStaticSite(String resourceGroupName, String name) { + this.serviceClient().detachStaticSite(resourceGroupName, name); + } + + public void detachStaticSite(String resourceGroupName, String name, Context context) { + this.serviceClient().detachStaticSite(resourceGroupName, name, context); + } + + public PagedIterable listStaticSiteFunctions( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listStaticSiteFunctions(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new StaticSiteFunctionOverviewArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable listStaticSiteFunctions( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listStaticSiteFunctions(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new StaticSiteFunctionOverviewArmResourceImpl(inner1, this.manager())); + } + + public StringDictionary listStaticSiteAppSettings(String resourceGroupName, String name) { + StringDictionaryInner inner = this.serviceClient().listStaticSiteAppSettings(resourceGroupName, name); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listStaticSiteAppSettingsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listStaticSiteAppSettingsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringList listStaticSiteConfiguredRoles(String resourceGroupName, String name) { + StringListInner inner = this.serviceClient().listStaticSiteConfiguredRoles(resourceGroupName, name); + if (inner != null) { + return new StringListImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listStaticSiteConfiguredRolesWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listStaticSiteConfiguredRolesWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringListImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary listStaticSiteFunctionAppSettings(String resourceGroupName, String name) { + StringDictionaryInner inner = this.serviceClient().listStaticSiteFunctionAppSettings(resourceGroupName, name); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listStaticSiteFunctionAppSettingsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listStaticSiteFunctionAppSettingsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary listStaticSiteSecrets(String resourceGroupName, String name) { + StringDictionaryInner inner = this.serviceClient().listStaticSiteSecrets(resourceGroupName, name); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listStaticSiteSecretsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listStaticSiteSecretsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getPrivateEndpointConnectionList(resourceGroupName, name); + return Utils + .mapPage(inner, inner1 -> new RemotePrivateEndpointConnectionArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getPrivateEndpointConnectionList(resourceGroupName, name, context); + return Utils + .mapPage(inner, inner1 -> new RemotePrivateEndpointConnectionArmResourceImpl(inner1, this.manager())); + } + + public RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this.serviceClient().getPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + Response inner = + this + .serviceClient() + .getPrivateEndpointConnectionWithResponse( + resourceGroupName, name, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RemotePrivateEndpointConnectionArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this + .serviceClient() + .approveOrRejectPrivateEndpointConnection( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this + .serviceClient() + .approveOrRejectPrivateEndpointConnection( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return this + .serviceClient() + .deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName); + } + + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return this + .serviceClient() + .deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, context); + } + + public PrivateLinkResourcesWrapper getPrivateLinkResources(String resourceGroupName, String name) { + PrivateLinkResourcesWrapperInner inner = this.serviceClient().getPrivateLinkResources(resourceGroupName, name); + if (inner != null) { + return new PrivateLinkResourcesWrapperImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getPrivateLinkResourcesWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourcesWrapperImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void resetStaticSiteApiKey( + String resourceGroupName, String name, StaticSiteResetPropertiesArmResource resetPropertiesEnvelope) { + this.serviceClient().resetStaticSiteApiKey(resourceGroupName, name, resetPropertiesEnvelope); + } + + public Response resetStaticSiteApiKeyWithResponse( + String resourceGroupName, + String name, + StaticSiteResetPropertiesArmResource resetPropertiesEnvelope, + Context context) { + return this + .serviceClient() + .resetStaticSiteApiKeyWithResponse(resourceGroupName, name, resetPropertiesEnvelope, context); + } + + public PagedIterable getUserProvidedFunctionAppsForStaticSite( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getUserProvidedFunctionAppsForStaticSite(resourceGroupName, name); + return Utils + .mapPage(inner, inner1 -> new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable getUserProvidedFunctionAppsForStaticSite( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getUserProvidedFunctionAppsForStaticSite(resourceGroupName, name, context); + return Utils + .mapPage(inner, inner1 -> new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner1, this.manager())); + } + + public StaticSiteUserProvidedFunctionAppArmResource getUserProvidedFunctionAppForStaticSite( + String resourceGroupName, String name, String functionAppName) { + StaticSiteUserProvidedFunctionAppArmResourceInner inner = + this.serviceClient().getUserProvidedFunctionAppForStaticSite(resourceGroupName, name, functionAppName); + if (inner != null) { + return new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getUserProvidedFunctionAppForStaticSiteWithResponse( + String resourceGroupName, String name, String functionAppName, Context context) { + Response inner = + this + .serviceClient() + .getUserProvidedFunctionAppForStaticSiteWithResponse(resourceGroupName, name, functionAppName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StaticSiteUserProvidedFunctionAppArmResource registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced) { + StaticSiteUserProvidedFunctionAppArmResourceInner inner = + this + .serviceClient() + .registerUserProvidedFunctionAppWithStaticSite( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced); + if (inner != null) { + return new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public StaticSiteUserProvidedFunctionAppArmResource registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope) { + StaticSiteUserProvidedFunctionAppArmResourceInner inner = + this + .serviceClient() + .registerUserProvidedFunctionAppWithStaticSite( + resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope); + if (inner != null) { + return new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public StaticSiteUserProvidedFunctionAppArmResource registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context) { + StaticSiteUserProvidedFunctionAppArmResourceInner inner = + this + .serviceClient() + .registerUserProvidedFunctionAppWithStaticSite( + resourceGroupName, + name, + functionAppName, + staticSiteUserProvidedFunctionEnvelope, + isForced, + context); + if (inner != null) { + return new StaticSiteUserProvidedFunctionAppArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void detachUserProvidedFunctionAppFromStaticSite( + String resourceGroupName, String name, String functionAppName) { + this.serviceClient().detachUserProvidedFunctionAppFromStaticSite(resourceGroupName, name, functionAppName); + } + + public Response detachUserProvidedFunctionAppFromStaticSiteWithResponse( + String resourceGroupName, String name, String functionAppName, Context context) { + return this + .serviceClient() + .detachUserProvidedFunctionAppFromStaticSiteWithResponse(resourceGroupName, name, functionAppName, context); + } + + public void createZipDeploymentForStaticSite( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope) { + this.serviceClient().createZipDeploymentForStaticSite(resourceGroupName, name, staticSiteZipDeploymentEnvelope); + } + + public void createZipDeploymentForStaticSite( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context) { + this + .serviceClient() + .createZipDeploymentForStaticSite(resourceGroupName, name, staticSiteZipDeploymentEnvelope, context); + } + + public StaticSiteArmResource 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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, context); + } + + public StaticSiteUserProvidedFunctionAppArmResource getUserProvidedFunctionAppForStaticSiteBuildById(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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "builds"); + if (environmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + String functionAppName = Utils.getValueFromIdByName(id, "userProvidedFunctionApps"); + if (functionAppName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'userProvidedFunctionApps'.", + id))); + } + return this + .getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + resourceGroupName, name, environmentName, functionAppName, Context.NONE) + .getValue(); + } + + public Response + getUserProvidedFunctionAppForStaticSiteBuildByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + String environmentName = Utils.getValueFromIdByName(id, "builds"); + if (environmentName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + String functionAppName = Utils.getValueFromIdByName(id, "userProvidedFunctionApps"); + if (functionAppName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'userProvidedFunctionApps'.", + id))); + } + return this + .getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + resourceGroupName, name, environmentName, functionAppName, context); + } + + public StaticSiteCustomDomainOverviewArmResource getStaticSiteCustomDomainById(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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + String domainName = Utils.getValueFromIdByName(id, "customDomains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); + } + return this.getStaticSiteCustomDomainWithResponse(resourceGroupName, name, domainName, Context.NONE).getValue(); + } + + public Response getStaticSiteCustomDomainByIdWithResponse( + 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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + String domainName = Utils.getValueFromIdByName(id, "customDomains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); + } + return this.getStaticSiteCustomDomainWithResponse(resourceGroupName, name, domainName, 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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + this.delete(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + this.delete(resourceGroupName, name, context); + } + + public void deleteStaticSiteCustomDomainById(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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + String domainName = Utils.getValueFromIdByName(id, "customDomains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); + } + this.deleteStaticSiteCustomDomain(resourceGroupName, name, domainName, Context.NONE); + } + + public void deleteStaticSiteCustomDomainByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "staticSites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'staticSites'.", id))); + } + String domainName = Utils.getValueFromIdByName(id, "customDomains"); + if (domainName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'customDomains'.", id))); + } + this.deleteStaticSiteCustomDomain(resourceGroupName, name, domainName, context); + } + + private StaticSitesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public StaticSiteArmResourceImpl defineStaticSite(String name) { + return new StaticSiteArmResourceImpl(name, this.manager()); + } + + public StaticSiteUserProvidedFunctionAppArmResourceImpl defineStaticSiteUserProvidedFunctionAppArmResource( + String name) { + return new StaticSiteUserProvidedFunctionAppArmResourceImpl(name, this.manager()); + } + + public StaticSiteCustomDomainOverviewArmResourceImpl defineStaticSiteCustomDomain(String name) { + return new StaticSiteCustomDomainOverviewArmResourceImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesWorkflowPreviewImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesWorkflowPreviewImpl.java new file mode 100644 index 0000000000000..c894f9973c01c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StaticSitesWorkflowPreviewImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSitesWorkflowPreviewInner; +import com.azure.resourcemanager.appservice.generated.models.StaticSitesWorkflowPreview; + +public final class StaticSitesWorkflowPreviewImpl implements StaticSitesWorkflowPreview { + private StaticSitesWorkflowPreviewInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StaticSitesWorkflowPreviewImpl( + StaticSitesWorkflowPreviewInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String path() { + return this.innerModel().path(); + } + + public String contents() { + return this.innerModel().contents(); + } + + public StaticSitesWorkflowPreviewInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StorageMigrationResponseImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StorageMigrationResponseImpl.java new file mode 100644 index 0000000000000..7e89b35e7c9b3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StorageMigrationResponseImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StorageMigrationResponseInner; +import com.azure.resourcemanager.appservice.generated.models.StorageMigrationResponse; + +public final class StorageMigrationResponseImpl implements StorageMigrationResponse { + private StorageMigrationResponseInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StorageMigrationResponseImpl( + StorageMigrationResponseInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String operationId() { + return this.innerModel().operationId(); + } + + public StorageMigrationResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StringDictionaryImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StringDictionaryImpl.java new file mode 100644 index 0000000000000..e726a74b5179d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StringDictionaryImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.models.StringDictionary; +import java.util.Collections; +import java.util.Map; + +public final class StringDictionaryImpl implements StringDictionary { + private StringDictionaryInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StringDictionaryImpl( + StringDictionaryInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Map properties() { + Map inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public StringDictionaryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StringListImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StringListImpl.java new file mode 100644 index 0000000000000..aafec7552ce26 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/StringListImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StringListInner; +import com.azure.resourcemanager.appservice.generated.models.StringList; +import java.util.Collections; +import java.util.List; + +public final class StringListImpl implements StringList { + private StringListInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + StringListImpl( + StringListInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public List properties() { + List inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public StringListInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SwiftVirtualNetworkImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SwiftVirtualNetworkImpl.java new file mode 100644 index 0000000000000..e3019b576c54a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/SwiftVirtualNetworkImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SwiftVirtualNetworkInner; +import com.azure.resourcemanager.appservice.generated.models.SwiftVirtualNetwork; + +public final class SwiftVirtualNetworkImpl implements SwiftVirtualNetwork { + private SwiftVirtualNetworkInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + SwiftVirtualNetworkImpl( + SwiftVirtualNetworkInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String subnetResourceId() { + return this.innerModel().subnetResourceId(); + } + + public Boolean swiftSupported() { + return this.innerModel().swiftSupported(); + } + + public SwiftVirtualNetworkInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TldLegalAgreementImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TldLegalAgreementImpl.java new file mode 100644 index 0000000000000..a4ac08764c726 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TldLegalAgreementImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.TldLegalAgreementInner; +import com.azure.resourcemanager.appservice.generated.models.TldLegalAgreement; + +public final class TldLegalAgreementImpl implements TldLegalAgreement { + private TldLegalAgreementInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + TldLegalAgreementImpl( + TldLegalAgreementInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String agreementKey() { + return this.innerModel().agreementKey(); + } + + public String title() { + return this.innerModel().title(); + } + + public String content() { + return this.innerModel().content(); + } + + public String url() { + return this.innerModel().url(); + } + + public TldLegalAgreementInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainImpl.java new file mode 100644 index 0000000000000..a8d9b99fd9814 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainImpl.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.TopLevelDomainInner; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomain; + +public final class TopLevelDomainImpl implements TopLevelDomain { + private TopLevelDomainInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + TopLevelDomainImpl( + TopLevelDomainInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public Boolean privacy() { + return this.innerModel().privacy(); + } + + public TopLevelDomainInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainsClientImpl.java new file mode 100644 index 0000000000000..f02a9af5cd958 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainsClientImpl.java @@ -0,0 +1,725 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.TopLevelDomainsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.TldLegalAgreementInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TopLevelDomainInner; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.TldLegalAgreementCollection; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomainAgreementOption; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomainCollection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in TopLevelDomainsClient. */ +public final class TopLevelDomainsClientImpl implements TopLevelDomainsClient { + private final ClientLogger logger = new ClientLogger(TopLevelDomainsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final TopLevelDomainsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of TopLevelDomainsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + TopLevelDomainsClientImpl(WebSiteManagementClientImpl client) { + this.service = + RestProxy.create(TopLevelDomainsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientTopLevelDomains to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface TopLevelDomainsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains") + @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}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}" + + "/listAgreements") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listAgreements( + @HostParam("$host") String endpoint, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") TopLevelDomainAgreementOption agreementOption, + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listAgreementsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Get all top-level domains supported for registration. + * + * @throws 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 Top-level domains. + */ + @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())); + } + + /** + * Description for Get all top-level domains supported for registration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Top-level domains. + */ + @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)); + } + + /** + * Description for Get all top-level domains supported for registration. + * + * @throws 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 Top-level domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all top-level domains supported for registration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Top-level domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all top-level domains supported for registration. + * + * @throws 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 Top-level domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for Get all top-level domains supported for registration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Top-level domains. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top level domain object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .get( + this.client.getEndpoint(), + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top level domain object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .get( + this.client.getEndpoint(), + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top level domain object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String name) { + return getWithResponseAsync(name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top level domain object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TopLevelDomainInner get(String name) { + return getAsync(name).block(); + } + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top level domain object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String name, Context context) { + return getWithResponseAsync(name, context).block(); + } + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAgreementsSinglePageAsync( + String name, TopLevelDomainAgreementOption agreementOption) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (agreementOption == null) { + return Mono + .error(new IllegalArgumentException("Parameter agreementOption is required and cannot be null.")); + } else { + agreementOption.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listAgreements( + this.client.getEndpoint(), + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + agreementOption, + 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())); + } + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAgreementsSinglePageAsync( + String name, TopLevelDomainAgreementOption agreementOption, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (agreementOption == null) { + return Mono + .error(new IllegalArgumentException("Parameter agreementOption is required and cannot be null.")); + } else { + agreementOption.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listAgreements( + this.client.getEndpoint(), + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + agreementOption, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAgreementsAsync( + String name, TopLevelDomainAgreementOption agreementOption) { + return new PagedFlux<>( + () -> listAgreementsSinglePageAsync(name, agreementOption), + nextLink -> listAgreementsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAgreementsAsync( + String name, TopLevelDomainAgreementOption agreementOption, Context context) { + return new PagedFlux<>( + () -> listAgreementsSinglePageAsync(name, agreementOption, context), + nextLink -> listAgreementsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAgreements( + String name, TopLevelDomainAgreementOption agreementOption) { + return new PagedIterable<>(listAgreementsAsync(name, agreementOption)); + } + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listAgreements( + String name, TopLevelDomainAgreementOption agreementOption, Context context) { + return new PagedIterable<>(listAgreementsAsync(name, agreementOption, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Top-level domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Top-level domains. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAgreementsNextSinglePageAsync(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.listAgreementsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of top-level domain legal agreements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAgreementsNextSinglePageAsync( + 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 + .listAgreementsNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainsImpl.java new file mode 100644 index 0000000000000..9672822e81925 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TopLevelDomainsImpl.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.appservice.generated.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.appservice.generated.fluent.TopLevelDomainsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.TldLegalAgreementInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TopLevelDomainInner; +import com.azure.resourcemanager.appservice.generated.models.TldLegalAgreement; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomain; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomainAgreementOption; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomains; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class TopLevelDomainsImpl implements TopLevelDomains { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopLevelDomainsImpl.class); + + private final TopLevelDomainsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public TopLevelDomainsImpl( + TopLevelDomainsClient innerClient, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new TopLevelDomainImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new TopLevelDomainImpl(inner1, this.manager())); + } + + public TopLevelDomain get(String name) { + TopLevelDomainInner inner = this.serviceClient().get(name); + if (inner != null) { + return new TopLevelDomainImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse(String name, Context context) { + Response inner = this.serviceClient().getWithResponse(name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TopLevelDomainImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listAgreements(String name, TopLevelDomainAgreementOption agreementOption) { + PagedIterable inner = this.serviceClient().listAgreements(name, agreementOption); + return Utils.mapPage(inner, inner1 -> new TldLegalAgreementImpl(inner1, this.manager())); + } + + public PagedIterable listAgreements( + String name, TopLevelDomainAgreementOption agreementOption, Context context) { + PagedIterable inner = + this.serviceClient().listAgreements(name, agreementOption, context); + return Utils.mapPage(inner, inner1 -> new TldLegalAgreementImpl(inner1, this.manager())); + } + + private TopLevelDomainsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TriggeredJobHistoryImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TriggeredJobHistoryImpl.java new file mode 100644 index 0000000000000..c50e1e756d4df --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TriggeredJobHistoryImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredJobHistoryInner; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobHistory; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobRun; +import java.util.Collections; +import java.util.List; + +public final class TriggeredJobHistoryImpl implements TriggeredJobHistory { + private TriggeredJobHistoryInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + TriggeredJobHistoryImpl( + TriggeredJobHistoryInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public List runs() { + List inner = this.innerModel().runs(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public TriggeredJobHistoryInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TriggeredWebJobImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TriggeredWebJobImpl.java new file mode 100644 index 0000000000000..a74f187fcb008 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/TriggeredWebJobImpl.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredWebJobInner; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobRun; +import com.azure.resourcemanager.appservice.generated.models.TriggeredWebJob; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import java.util.Collections; +import java.util.Map; + +public final class TriggeredWebJobImpl implements TriggeredWebJob { + private TriggeredWebJobInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + TriggeredWebJobImpl( + TriggeredWebJobInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public TriggeredJobRun latestRun() { + return this.innerModel().latestRun(); + } + + public String historyUrl() { + return this.innerModel().historyUrl(); + } + + public String schedulerLogsUrl() { + return this.innerModel().schedulerLogsUrl(); + } + + public String runCommand() { + return this.innerModel().runCommand(); + } + + public String url() { + return this.innerModel().url(); + } + + public String extraInfoUrl() { + return this.innerModel().extraInfoUrl(); + } + + public WebJobType webJobType() { + return this.innerModel().webJobType(); + } + + public String error() { + return this.innerModel().error(); + } + + public Boolean usingSdk() { + return this.innerModel().usingSdk(); + } + + public Map settings() { + Map inner = this.innerModel().settings(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public TriggeredWebJobInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/UsageImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/UsageImpl.java new file mode 100644 index 0000000000000..ea76416ef53cb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/UsageImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.UsageInner; +import com.azure.resourcemanager.appservice.generated.models.ComputeModeOptions; +import com.azure.resourcemanager.appservice.generated.models.Usage; +import java.time.OffsetDateTime; + +public final class UsageImpl implements Usage { + private UsageInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + UsageImpl(UsageInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String displayName() { + return this.innerModel().displayName(); + } + + public String resourceName() { + return this.innerModel().resourceName(); + } + + public String unit() { + return this.innerModel().unit(); + } + + public Long currentValue() { + return this.innerModel().currentValue(); + } + + public Long limit() { + return this.innerModel().limit(); + } + + public OffsetDateTime nextResetTime() { + return this.innerModel().nextResetTime(); + } + + public ComputeModeOptions computeMode() { + return this.innerModel().computeMode(); + } + + public String siteMode() { + return this.innerModel().siteMode(); + } + + public UsageInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/UserImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/UserImpl.java new file mode 100644 index 0000000000000..8b32f9482af4f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/UserImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; +import com.azure.resourcemanager.appservice.generated.models.User; + +public final class UserImpl implements User { + private UserInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + UserImpl(UserInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String publishingUsername() { + return this.innerModel().publishingUsername(); + } + + public String publishingPassword() { + return this.innerModel().publishingPassword(); + } + + public String publishingPasswordHash() { + return this.innerModel().publishingPasswordHash(); + } + + public String publishingPasswordHashSalt() { + return this.innerModel().publishingPasswordHashSalt(); + } + + public String scmUri() { + return this.innerModel().scmUri(); + } + + public UserInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/Utils.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/Utils.java new file mode 100644 index 0000000000000..7fff6cf276542 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/Utils.java @@ -0,0 +1,204 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +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.util.CoreUtils; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.publisher.Flux; + +final class Utils { + static String getValueFromIdByName(String id, String name) { + if (id == null) { + return null; + } + Iterator itr = Arrays.stream(id.split("/")).iterator(); + while (itr.hasNext()) { + String part = itr.next(); + if (part != null && !part.trim().isEmpty()) { + if (part.equalsIgnoreCase(name)) { + if (itr.hasNext()) { + return itr.next(); + } else { + return null; + } + } + } + } + return null; + } + + static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { + if (id == null || pathTemplate == null) { + return null; + } + String parameterNameParentheses = "{" + parameterName + "}"; + List idSegmentsReverted = Arrays.asList(id.split("/")); + List pathSegments = Arrays.asList(pathTemplate.split("/")); + Collections.reverse(idSegmentsReverted); + Iterator idItrReverted = idSegmentsReverted.iterator(); + int pathIndex = pathSegments.size(); + while (idItrReverted.hasNext() && pathIndex > 0) { + String idSegment = idItrReverted.next(); + String pathSegment = pathSegments.get(--pathIndex); + if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { + if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { + if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { + List segments = new ArrayList<>(); + segments.add(idSegment); + idItrReverted.forEachRemaining(segments::add); + Collections.reverse(segments); + if (segments.size() > 0 && segments.get(0).isEmpty()) { + segments.remove(0); + } + return String.join("/", segments); + } else { + return idSegment; + } + } + } + } + return null; + } + + static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { + return new PagedIterableImpl(pageIterable, mapper); + } + + private static final class PagedIterableImpl extends PagedIterable { + + private final PagedIterable pagedIterable; + private final Function mapper; + private final Function, PagedResponse> pageMapper; + + private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { + super( + PagedFlux + .create( + () -> + (continuationToken, pageSize) -> + Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + this.pagedIterable = pagedIterable; + this.mapper = mapper; + this.pageMapper = getPageMapper(mapper); + } + + private static Function, PagedResponse> getPageMapper(Function mapper) { + return page -> + new PagedResponseBase( + page.getRequest(), + page.getStatusCode(), + page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), + page.getContinuationToken(), + null); + } + + @Override + public Stream stream() { + return pagedIterable.stream().map(mapper); + } + + @Override + public Stream> streamByPage() { + return pagedIterable.streamByPage().map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken) { + return pagedIterable.streamByPage(continuationToken).map(pageMapper); + } + + @Override + public Stream> streamByPage(int preferredPageSize) { + return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); + } + + @Override + public Stream> streamByPage(String continuationToken, int preferredPageSize) { + return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); + } + + @Override + public Iterator iterator() { + return new IteratorImpl(pagedIterable.iterator(), mapper); + } + + @Override + public Iterable> iterableByPage() { + return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken), pageMapper); + } + + @Override + public Iterable> iterableByPage(int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(preferredPageSize), pageMapper); + } + + @Override + public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { + return new IterableImpl, PagedResponse>( + pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + } + } + + private static final class IteratorImpl implements Iterator { + + private final Iterator iterator; + private final Function mapper; + + private IteratorImpl(Iterator iterator, Function mapper) { + this.iterator = iterator; + this.mapper = mapper; + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public S next() { + return mapper.apply(iterator.next()); + } + + @Override + public void remove() { + iterator.remove(); + } + } + + private static final class IterableImpl implements Iterable { + + private final Iterable iterable; + private final Function mapper; + + private IterableImpl(Iterable iterable, Function mapper) { + this.iterable = iterable; + this.mapper = mapper; + } + + @Override + public Iterator iterator() { + return new IteratorImpl(iterable.iterator(), mapper); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ValidateResponseImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ValidateResponseImpl.java new file mode 100644 index 0000000000000..a3932be863329 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/ValidateResponseImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ValidateResponseInner; +import com.azure.resourcemanager.appservice.generated.models.ValidateResponse; +import com.azure.resourcemanager.appservice.generated.models.ValidateResponseError; + +public final class ValidateResponseImpl implements ValidateResponse { + private ValidateResponseInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + ValidateResponseImpl( + ValidateResponseInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String status() { + return this.innerModel().status(); + } + + public ValidateResponseError error() { + return this.innerModel().error(); + } + + public ValidateResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetGatewayImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetGatewayImpl.java new file mode 100644 index 0000000000000..2e6f0a7cd6db1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetGatewayImpl.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; +import com.azure.resourcemanager.appservice.generated.models.VnetGateway; + +public final class VnetGatewayImpl implements VnetGateway, VnetGateway.Definition, VnetGateway.Update { + private VnetGatewayInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String vnetName() { + return this.innerModel().vnetName(); + } + + public String vpnPackageUri() { + return this.innerModel().vpnPackageUri(); + } + + public VnetGatewayInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String vnetName; + + private String gatewayName; + + private String slot; + + public VnetGatewayImpl withExistingVirtualNetworkConnection( + String resourceGroupName, String name, String vnetName, String slot) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.vnetName = vnetName; + this.slot = slot; + return this; + } + + public VnetGateway create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateVnetConnectionGatewaySlotWithResponse( + resourceGroupName, name, vnetName, gatewayName, slot, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public VnetGateway create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateVnetConnectionGatewaySlotWithResponse( + resourceGroupName, name, vnetName, gatewayName, slot, this.innerModel(), context) + .getValue(); + return this; + } + + VnetGatewayImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new VnetGatewayInner(); + this.serviceManager = serviceManager; + this.gatewayName = name; + } + + public VnetGatewayImpl update() { + return this; + } + + public VnetGateway apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateVnetConnectionGatewaySlotWithResponse( + resourceGroupName, name, vnetName, gatewayName, slot, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public VnetGateway apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateVnetConnectionGatewaySlotWithResponse( + resourceGroupName, name, vnetName, gatewayName, slot, this.innerModel(), context) + .getValue(); + return this; + } + + VnetGatewayImpl( + VnetGatewayInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + this.vnetName = Utils.getValueFromIdByName(innerObject.id(), "virtualNetworkConnections"); + this.gatewayName = Utils.getValueFromIdByName(innerObject.id(), "gateways"); + this.slot = Utils.getValueFromIdByName(innerObject.id(), "slots"); + } + + public VnetGateway refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getVnetConnectionGatewaySlotWithResponse( + resourceGroupName, name, vnetName, gatewayName, slot, Context.NONE) + .getValue(); + return this; + } + + public VnetGateway refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getVnetConnectionGatewaySlotWithResponse(resourceGroupName, name, vnetName, gatewayName, slot, context) + .getValue(); + return this; + } + + public VnetGatewayImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public VnetGatewayImpl withVnetName(String vnetName) { + this.innerModel().withVnetName(vnetName); + return this; + } + + public VnetGatewayImpl withVpnPackageUri(String vpnPackageUri) { + this.innerModel().withVpnPackageUri(vpnPackageUri); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetInfoResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetInfoResourceImpl.java new file mode 100644 index 0000000000000..3d17a792dcac1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetInfoResourceImpl.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetRouteInner; +import com.azure.resourcemanager.appservice.generated.models.VnetInfoResource; +import com.azure.resourcemanager.appservice.generated.models.VnetRoute; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class VnetInfoResourceImpl + implements VnetInfoResource, VnetInfoResource.Definition, VnetInfoResource.Update { + private VnetInfoResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String vnetResourceId() { + return this.innerModel().vnetResourceId(); + } + + public String certThumbprint() { + return this.innerModel().certThumbprint(); + } + + public String certBlob() { + return this.innerModel().certBlob(); + } + + public List routes() { + List inner = this.innerModel().routes(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new VnetRouteImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Boolean resyncRequired() { + return this.innerModel().resyncRequired(); + } + + public String dnsServers() { + return this.innerModel().dnsServers(); + } + + public Boolean isSwift() { + return this.innerModel().isSwift(); + } + + public VnetInfoResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String vnetName; + + private String slot; + + public VnetInfoResourceImpl withExistingSlot(String resourceGroupName, String name, String slot) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.slot = slot; + return this; + } + + public VnetInfoResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateVnetConnectionSlotWithResponse( + resourceGroupName, name, vnetName, slot, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public VnetInfoResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .createOrUpdateVnetConnectionSlotWithResponse( + resourceGroupName, name, vnetName, slot, this.innerModel(), context) + .getValue(); + return this; + } + + VnetInfoResourceImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new VnetInfoResourceInner(); + this.serviceManager = serviceManager; + this.vnetName = name; + } + + public VnetInfoResourceImpl update() { + return this; + } + + public VnetInfoResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateVnetConnectionSlotWithResponse( + resourceGroupName, name, vnetName, slot, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public VnetInfoResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .updateVnetConnectionSlotWithResponse( + resourceGroupName, name, vnetName, slot, this.innerModel(), context) + .getValue(); + return this; + } + + VnetInfoResourceImpl( + VnetInfoResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "sites"); + this.vnetName = Utils.getValueFromIdByName(innerObject.id(), "virtualNetworkConnections"); + this.slot = Utils.getValueFromIdByName(innerObject.id(), "slots"); + } + + public VnetInfoResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getVnetConnectionSlotWithResponse(resourceGroupName, name, vnetName, slot, Context.NONE) + .getValue(); + return this; + } + + public VnetInfoResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getWebApps() + .getVnetConnectionSlotWithResponse(resourceGroupName, name, vnetName, slot, context) + .getValue(); + return this; + } + + public VnetInfoResourceImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public VnetInfoResourceImpl withVnetResourceId(String vnetResourceId) { + this.innerModel().withVnetResourceId(vnetResourceId); + return this; + } + + public VnetInfoResourceImpl withCertBlob(String certBlob) { + this.innerModel().withCertBlob(certBlob); + return this; + } + + public VnetInfoResourceImpl withDnsServers(String dnsServers) { + this.innerModel().withDnsServers(dnsServers); + return this; + } + + public VnetInfoResourceImpl withIsSwift(Boolean isSwift) { + this.innerModel().withIsSwift(isSwift); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetRouteImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetRouteImpl.java new file mode 100644 index 0000000000000..d796b19844183 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetRouteImpl.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.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetRouteInner; +import com.azure.resourcemanager.appservice.generated.models.RouteType; +import com.azure.resourcemanager.appservice.generated.models.VnetRoute; + +public final class VnetRouteImpl implements VnetRoute, VnetRoute.Definition, VnetRoute.Update { + private VnetRouteInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public String startAddress() { + return this.innerModel().startAddress(); + } + + public String endAddress() { + return this.innerModel().endAddress(); + } + + public RouteType routeType() { + return this.innerModel().routeType(); + } + + public VnetRouteInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String vnetName; + + private String routeName; + + public VnetRouteImpl withExistingVirtualNetworkConnection(String resourceGroupName, String name, String vnetName) { + this.resourceGroupName = resourceGroupName; + this.name = name; + this.vnetName = vnetName; + return this; + } + + public VnetRoute create() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .createOrUpdateVnetRouteWithResponse( + resourceGroupName, name, vnetName, routeName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public VnetRoute create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .createOrUpdateVnetRouteWithResponse( + resourceGroupName, name, vnetName, routeName, this.innerModel(), context) + .getValue(); + return this; + } + + VnetRouteImpl(String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new VnetRouteInner(); + this.serviceManager = serviceManager; + this.routeName = name; + } + + public VnetRouteImpl update() { + return this; + } + + public VnetRoute apply() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .updateVnetRouteWithResponse( + resourceGroupName, name, vnetName, routeName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public VnetRoute apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServicePlans() + .updateVnetRouteWithResponse(resourceGroupName, name, vnetName, routeName, this.innerModel(), context) + .getValue(); + return this; + } + + VnetRouteImpl( + VnetRouteInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "serverfarms"); + this.vnetName = Utils.getValueFromIdByName(innerObject.id(), "virtualNetworkConnections"); + this.routeName = Utils.getValueFromIdByName(innerObject.id(), "routes"); + } + + public VnetRouteImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public VnetRouteImpl withStartAddress(String startAddress) { + this.innerModel().withStartAddress(startAddress); + return this; + } + + public VnetRouteImpl withEndAddress(String endAddress) { + this.innerModel().withEndAddress(endAddress); + return this; + } + + public VnetRouteImpl withRouteType(RouteType routeType) { + this.innerModel().withRouteType(routeType); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetValidationFailureDetailsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetValidationFailureDetailsImpl.java new file mode 100644 index 0000000000000..496877a8f130c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/VnetValidationFailureDetailsImpl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetValidationFailureDetailsInner; +import com.azure.resourcemanager.appservice.generated.models.VnetValidationFailureDetails; +import com.azure.resourcemanager.appservice.generated.models.VnetValidationTestFailure; +import java.util.Collections; +import java.util.List; + +public final class VnetValidationFailureDetailsImpl implements VnetValidationFailureDetails { + private VnetValidationFailureDetailsInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + VnetValidationFailureDetailsImpl( + VnetValidationFailureDetailsInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String message() { + return this.innerModel().message(); + } + + public Boolean failed() { + return this.innerModel().failed(); + } + + public List failedTests() { + List inner = this.innerModel().failedTests(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List warnings() { + List inner = this.innerModel().warnings(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public VnetValidationFailureDetailsInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppStackImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppStackImpl.java new file mode 100644 index 0000000000000..5ee8d397c5e6e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppStackImpl.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.WebAppStackInner; +import com.azure.resourcemanager.appservice.generated.models.StackPreferredOs; +import com.azure.resourcemanager.appservice.generated.models.WebAppMajorVersion; +import com.azure.resourcemanager.appservice.generated.models.WebAppStack; +import java.util.Collections; +import java.util.List; + +public final class WebAppStackImpl implements WebAppStack { + private WebAppStackInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + WebAppStackImpl( + WebAppStackInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String location() { + return this.innerModel().location(); + } + + public String displayText() { + return this.innerModel().displayText(); + } + + public String value() { + return this.innerModel().value(); + } + + public List majorVersions() { + List inner = this.innerModel().majorVersions(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public StackPreferredOs preferredOs() { + return this.innerModel().preferredOs(); + } + + public WebAppStackInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppsClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppsClientImpl.java new file mode 100644 index 0000000000000..d430943a3c350 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppsClientImpl.java @@ -0,0 +1,86102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.http.rest.StreamResponse; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appservice.generated.fluent.WebAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApiKVReferenceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AzureStoragePropertyDictionaryResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupItemInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ConnectionStringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContinuousWebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameAnalysisResultInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionEnvelopeInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionSecretsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostKeysInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostnameBindingInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.KeyInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployLogInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployStatusInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MigrateMySqlStatusInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkFeaturesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkTraceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PerfMonResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessModuleInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessThreadInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PublicCertificateInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RelayServiceConnectionEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsV2Inner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteCloneabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigurationSnapshotInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteExtensionInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteLogsConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePhpErrorLogFlagInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSourceControlInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotConfigNamesResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotDifferenceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StorageMigrationResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SwiftVirtualNetworkInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredJobHistoryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredWebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebSiteInstanceStatusInner; +import com.azure.resourcemanager.appservice.generated.models.ApiKVReferenceCollection; +import com.azure.resourcemanager.appservice.generated.models.BackupItemCollection; +import com.azure.resourcemanager.appservice.generated.models.ContinuousWebJobCollection; +import com.azure.resourcemanager.appservice.generated.models.CsmPublishingProfileOptions; +import com.azure.resourcemanager.appservice.generated.models.CsmSlotEntity; +import com.azure.resourcemanager.appservice.generated.models.CsmUsageQuotaCollection; +import com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appservice.generated.models.DeletedAppRestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.DeploymentCollection; +import com.azure.resourcemanager.appservice.generated.models.FunctionEnvelopeCollection; +import com.azure.resourcemanager.appservice.generated.models.HostnameBindingCollection; +import com.azure.resourcemanager.appservice.generated.models.IdentifierCollection; +import com.azure.resourcemanager.appservice.generated.models.MSDeploy; +import com.azure.resourcemanager.appservice.generated.models.MigrateMySqlRequest; +import com.azure.resourcemanager.appservice.generated.models.PerfMonCounterCollection; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOnPatchResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateEndpointConnectionCollection; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.ProcessInfoCollection; +import com.azure.resourcemanager.appservice.generated.models.ProcessModuleInfoCollection; +import com.azure.resourcemanager.appservice.generated.models.ProcessThreadInfoCollection; +import com.azure.resourcemanager.appservice.generated.models.PublicCertificateCollection; +import com.azure.resourcemanager.appservice.generated.models.PublishingCredentialsPoliciesCollection; +import com.azure.resourcemanager.appservice.generated.models.SiteConfigResourceCollection; +import com.azure.resourcemanager.appservice.generated.models.SiteConfigurationSnapshotInfoCollection; +import com.azure.resourcemanager.appservice.generated.models.SiteExtensionInfoCollection; +import com.azure.resourcemanager.appservice.generated.models.SlotDifferenceCollection; +import com.azure.resourcemanager.appservice.generated.models.SnapshotCollection; +import com.azure.resourcemanager.appservice.generated.models.SnapshotRestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.StorageMigrationOptions; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobHistoryCollection; +import com.azure.resourcemanager.appservice.generated.models.TriggeredWebJobCollection; +import com.azure.resourcemanager.appservice.generated.models.WebAppCollection; +import com.azure.resourcemanager.appservice.generated.models.WebAppInstanceStatusCollection; +import com.azure.resourcemanager.appservice.generated.models.WebJobCollection; +import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream; +import java.io.InputStream; +import java.io.SequenceInputStream; +import java.nio.ByteBuffer; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in WebAppsClient. */ +public final class WebAppsClientImpl implements WebAppsClient { + private final ClientLogger logger = new ClientLogger(WebAppsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final WebAppsService service; + + /** The service client containing this operation class. */ + private final WebSiteManagementClientImpl client; + + /** + * Initializes an instance of WebAppsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + WebAppsClientImpl(WebSiteManagementClientImpl client) { + this.service = RestProxy.create(WebAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for WebSiteManagementClientWebApps to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "WebSiteManagementCli") + private interface WebAppsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Web/sites") + @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.Web/sites") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("includeSlots") Boolean includeSlots, + @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.Web/sites/{name}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteInner siteEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("deleteMetrics") Boolean deleteMetrics, + @QueryParam("deleteEmptyServerFarm") Boolean deleteEmptyServerFarm, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SitePatchResourceInner siteEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/analyzeCustomHostname") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> analyzeCustomHostname( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("hostName") String hostname, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/applySlotConfig") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> applySlotConfigToProduction( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmSlotEntity slotSwapEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/backup") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> backup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/backups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBackups( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/backups/{backupId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getBackupStatus( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("backupId") String backupId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/backups/{backupId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteBackup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("backupId") String backupId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/backups/{backupId}/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBackupStatusSecrets( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("backupId") String backupId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/backups/{backupId}/restore") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> restore( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("backupId") String backupId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RestoreRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/basicPublishingCredentialsPolicies") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBasicPublishingCredentialsPolicies( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/basicPublishingCredentialsPolicies/ftp") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getFtpAllowed( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/basicPublishingCredentialsPolicies/ftp") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateFtpAllowed( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/basicPublishingCredentialsPolicies/scm") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getScmAllowed( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/basicPublishingCredentialsPolicies/scm") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateScmAllowed( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listConfigurations( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/appsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateApplicationSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StringDictionaryInner appSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/appsettings/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listApplicationSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/authsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateAuthSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteAuthSettingsInner siteAuthSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/authsettings/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAuthSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/config/authsettingsV2") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAuthSettingsV2WithoutSecrets( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/authsettingsV2") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateAuthSettingsV2( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteAuthSettingsV2Inner siteAuthSettingsV2, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/authsettingsV2/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAuthSettingsV2( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/azurestorageaccounts") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateAzureStorageAccounts( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/azurestorageaccounts/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listAzureStorageAccounts( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/backup") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateBackupConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/backup") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteBackupConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/backup/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getBackupConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/config/configreferences/appsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAppSettingsKeyVaultReferences( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/config/configreferences/appsettings/{appSettingKey}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAppSettingKeyVaultReference( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("appSettingKey") String appSettingKey, + @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.Web/sites/{name}" + + "/config/configreferences/connectionstrings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteConnectionStringKeyVaultReferences( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/config/configreferences/connectionstrings/{connectionStringKey}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteConnectionStringKeyVaultReference( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("connectionStringKey") String connectionStringKey, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/connectionstrings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateConnectionStrings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ConnectionStringDictionaryInner connectionStrings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/connectionstrings/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listConnectionStrings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/config/logs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDiagnosticLogsConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/logs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateDiagnosticLogsConfig( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteLogsConfigInner siteLogsConfig, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/metadata") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateMetadata( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StringDictionaryInner metadata, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/metadata/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listMetadata( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/publishingcredentials/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listPublishingCredentials( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/pushsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSitePushSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PushSettingsInner pushSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/pushsettings/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSitePushSettings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/config/slotConfigNames") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSlotConfigurationNames( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/slotConfigNames") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSlotConfigurationNames( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SlotConfigNamesResourceInner slotConfigNames, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/web") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/web") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteConfigResourceInner siteConfig, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/web") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateConfiguration( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteConfigResourceInner siteConfig, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/web/snapshots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listConfigurationSnapshotInfo( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/config/web/snapshots/{snapshotId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getConfigurationSnapshot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("snapshotId") String snapshotId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/config/web/snapshots/{snapshotId}/recover") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> recoverSiteConfigurationSnapshot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("snapshotId") String snapshotId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/containerlogs") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getWebSiteContainerLogs( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/containerlogs/zip/download") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getContainerLogsZip( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/continuouswebjobs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listContinuousWebJobs( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/continuouswebjobs/{webJobName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getContinuousWebJob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/continuouswebjobs/{webJobName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteContinuousWebJob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/continuouswebjobs/{webJobName}/start") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> startContinuousWebJob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/continuouswebjobs/{webJobName}/stop") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> stopContinuousWebJob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @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.Web/sites/{name}" + + "/deployments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listDeployments( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/deployments/{id}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDeployment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("id") String id, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/deployments/{id}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createDeployment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("id") String id, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DeploymentInner deployment, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/deployments/{id}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteDeployment( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("id") String id, + @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.Web/sites/{name}" + + "/deployments/{id}/log") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listDeploymentLog( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("id") String id, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/discoverbackup") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> discoverBackup( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RestoreRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/domainOwnershipIdentifiers") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listDomainOwnershipIdentifiers( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDomainOwnershipIdentifier( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateDomainOwnershipIdentifier( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") IdentifierInner domainOwnershipIdentifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteDomainOwnershipIdentifier( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateDomainOwnershipIdentifier( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") IdentifierInner domainOwnershipIdentifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/extensions/MSDeploy") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getMSDeployStatus( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/extensions/MSDeploy") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createMSDeployOperation( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MSDeploy mSDeploy, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/extensions/MSDeploy/log") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMSDeployLog( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/functions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listFunctions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/functions/admin/token") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getFunctionsAdminToken( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/functions/{functionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getFunction( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/functions/{functionName}") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createFunction( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FunctionEnvelopeInner functionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/functions/{functionName}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteFunction( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/functions/{functionName}/keys/{keyName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateFunctionSecret( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("keyName") String keyName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KeyInfoInner key, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/functions/{functionName}/keys/{keyName}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteFunctionSecret( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("keyName") String keyName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/functions/{functionName}/listkeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listFunctionKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/functions/{functionName}/listsecrets") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listFunctionSecrets( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/host/default/listkeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHostKeys( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/host/default/listsyncstatus") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSyncStatus( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/host/default/sync") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> syncFunctions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/host/default/{keyType}/{keyName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateHostSecret( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("keyType") String keyType, + @PathParam("keyName") String keyName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KeyInfoInner key, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/host/default/{keyType}/{keyName}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteHostSecret( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("keyType") String keyType, + @PathParam("keyName") String keyName, + @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.Web/sites/{name}" + + "/hostNameBindings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHostnameBindings( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/hostNameBindings/{hostName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getHostnameBinding( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("hostName") String hostname, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hostNameBindings/{hostName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateHostnameBinding( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("hostName") String hostname, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HostnameBindingInner hostnameBinding, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hostNameBindings/{hostName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteHostnameBinding( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("hostName") String hostname, + @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.Web/sites/{name}" + + "/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getHybridConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateHybridConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HybridConnectionInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteHybridConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateHybridConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HybridConnectionInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hybridConnectionRelays") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHybridConnections( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/hybridconnection") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listRelayServiceConnections( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/hybridconnection/{entityName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getRelayServiceConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("entityName") String entityName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hybridconnection/{entityName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateRelayServiceConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("entityName") String entityName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RelayServiceConnectionEntityInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hybridconnection/{entityName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteRelayServiceConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("entityName") String entityName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/hybridconnection/{entityName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateRelayServiceConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("entityName") String entityName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RelayServiceConnectionEntityInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/instances") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listInstanceIdentifiers( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/instances/{instanceId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getInstanceInfo( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/instances/{instanceId}/extensions/MSDeploy") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getInstanceMsDeployStatus( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("instanceId") String instanceId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/instances/{instanceId}/extensions/MSDeploy") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createInstanceMSDeployOperation( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("instanceId") String instanceId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MSDeploy mSDeploy, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/instances/{instanceId}/extensions/MSDeploy/log") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInstanceMSDeployLog( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/instances/{instanceId}/processes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcesses( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/instances/{instanceId}/processes/{processId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInstanceProcess( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("instanceId") String instanceId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/instances/{instanceId}/processes/{processId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteInstanceProcess( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/instances/{instanceId}/processes/{processId}/dump") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getInstanceProcessDump( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/instances/{instanceId}/processes/{processId}/modules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessModules( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInstanceProcessModule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("baseAddress") String baseAddress, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/instances/{instanceId}/processes/{processId}/threads") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessThreads( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("instanceId") String instanceId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/iscloneable") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> isCloneable( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/listbackups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteBackups( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/listsyncfunctiontriggerstatus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSyncFunctionTriggers( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/migrate") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> migrateStorage( + @HostParam("$host") String endpoint, + @QueryParam("subscriptionName") String subscriptionName, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StorageMigrationOptions migrationOptions, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/migratemysql") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> migrateMySql( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MigrateMySqlRequest migrationRequestEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/migratemysql/status") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getMigrateMySqlStatus( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/networkConfig/virtualNetwork") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSwiftVirtualNetworkConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/networkConfig/virtualNetwork") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateSwiftVirtualNetworkConnectionWithCheck( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SwiftVirtualNetworkInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/networkConfig/virtualNetwork") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteSwiftVirtualNetwork( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/networkConfig/virtualNetwork") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSwiftVirtualNetworkConnectionWithCheck( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SwiftVirtualNetworkInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/networkFeatures/{view}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNetworkFeatures( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("view") String view, + @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.Web/sites/{name}" + + "/networkTrace/operationresults/{operationId}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getNetworkTraceOperation( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("operationId") String operationId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/networkTrace/start") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> startWebSiteNetworkTrace( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("durationInSeconds") Integer durationInSeconds, + @QueryParam("maxFrameLength") Integer maxFrameLength, + @QueryParam("sasUrl") String sasUrl, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/networkTrace/startOperation") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> startWebSiteNetworkTraceOperation( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("durationInSeconds") Integer durationInSeconds, + @QueryParam("maxFrameLength") Integer maxFrameLength, + @QueryParam("sasUrl") String sasUrl, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/networkTrace/stop") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> stopWebSiteNetworkTrace( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/networkTrace/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> getNetworkTraces( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("operationId") String operationId, + @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.Web/sites/{name}" + + "/networkTraces/current/operationresults/{operationId}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getNetworkTraceOperationV2( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("operationId") String operationId, + @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.Web/sites/{name}" + + "/networkTraces/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> getNetworkTracesV2( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("operationId") String operationId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/newpassword") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> generateNewSitePublishingPassword( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/perfcounters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listPerfMonCounters( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/phplogging") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSitePhpErrorLogFlag( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/premieraddons") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listPremierAddOns( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/premieraddons/{premierAddOnName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPremierAddOn( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("premierAddOnName") String premierAddOnName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/premieraddons/{premierAddOnName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> addPremierAddOn( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("premierAddOnName") String premierAddOnName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PremierAddOnInner premierAddOn, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/premieraddons/{premierAddOnName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deletePremierAddOn( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("premierAddOnName") String premierAddOnName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/premieraddons/{premierAddOnName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updatePremierAddOn( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("premierAddOnName") String premierAddOnName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PremierAddOnPatchResource premierAddOn, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/privateAccess/virtualNetworks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateAccess( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/privateAccess/virtualNetworks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> putPrivateAccessVnet( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateAccessInner access, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateEndpointConnectionList( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> approveOrRejectPrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> deletePrivateEndpointConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @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.Web/sites/{name}" + + "/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateLinkResources( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/processes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcesses( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/processes/{processId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getProcess( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/processes/{processId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteProcess( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @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.Web/sites/{name}" + + "/processes/{processId}/dump") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getProcessDump( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @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.Web/sites/{name}" + + "/processes/{processId}/modules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessModules( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @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.Web/sites/{name}" + + "/processes/{processId}/modules/{baseAddress}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getProcessModule( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("baseAddress") String baseAddress, + @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.Web/sites/{name}" + + "/processes/{processId}/threads") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessThreads( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @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.Web/sites/{name}" + + "/publicCertificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listPublicCertificates( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/publicCertificates/{publicCertificateName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPublicCertificate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("publicCertificateName") String publicCertificateName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/publicCertificates/{publicCertificateName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdatePublicCertificate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("publicCertificateName") String publicCertificateName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PublicCertificateInner publicCertificate, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/publicCertificates/{publicCertificateName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deletePublicCertificate( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("publicCertificateName") String publicCertificateName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/publishxml") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono listPublishingProfileXmlWithSecrets( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmPublishingProfileOptions publishingProfileOptions, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/resetSlotConfig") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resetProductionSlotConfig( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/restart") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> restart( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("softRestart") Boolean softRestart, + @QueryParam("synchronous") Boolean synchronous, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/restoreFromBackupBlob") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> restoreFromBackupBlob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RestoreRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/restoreFromDeletedApp") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> restoreFromDeletedApp( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DeletedAppRestoreRequest restoreRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/restoreSnapshot") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> restoreSnapshot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SnapshotRestoreRequest restoreRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/siteextensions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSiteExtensions( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/siteextensions/{siteExtensionId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSiteExtension( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("siteExtensionId") String siteExtensionId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/siteextensions/{siteExtensionId}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> installSiteExtension( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("siteExtensionId") String siteExtensionId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/siteextensions/{siteExtensionId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteSiteExtension( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("siteExtensionId") String siteExtensionId, + @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.Web/sites/{name}" + + "/slots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSlots( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/slots/{slot}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdateSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteInner siteEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @QueryParam("deleteMetrics") Boolean deleteMetrics, + @QueryParam("deleteEmptyServerFarm") Boolean deleteEmptyServerFarm, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SitePatchResourceInner siteEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/analyzeCustomHostname") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> analyzeCustomHostnameSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @QueryParam("hostName") String hostname, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/applySlotConfig") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> applySlotConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmSlotEntity slotSwapEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/backup") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> backupSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/backups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBackupsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/backups/{backupId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getBackupStatusSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("backupId") String backupId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/backups/{backupId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteBackupSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("backupId") String backupId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/backups/{backupId}/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBackupStatusSecretsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("backupId") String backupId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/backups/{backupId}/restore") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> restoreSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("backupId") String backupId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RestoreRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/basicPublishingCredentialsPolicies") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBasicPublishingCredentialsPoliciesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/basicPublishingCredentialsPolicies/ftp") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getFtpAllowedSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/basicPublishingCredentialsPolicies/ftp") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateFtpAllowedSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/basicPublishingCredentialsPolicies/scm") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getScmAllowedSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/basicPublishingCredentialsPolicies/scm") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateScmAllowedSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listConfigurationsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/appsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateApplicationSettingsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StringDictionaryInner appSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/appsettings/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listApplicationSettingsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/authsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateAuthSettingsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteAuthSettingsInner siteAuthSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/authsettings/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAuthSettingsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/authsettingsV2") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateAuthSettingsV2Slot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteAuthSettingsV2Inner siteAuthSettingsV2, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/authsettingsV2/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAuthSettingsV2Slot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/azurestorageaccounts") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateAzureStorageAccountsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/azurestorageaccounts/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listAzureStorageAccountsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/backup") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateBackupConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") BackupRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/backup") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteBackupConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/backup/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getBackupConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/config/configreferences/appsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAppSettingsKeyVaultReferencesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/config/configreferences/appsettings/{appSettingKey}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAppSettingKeyVaultReferenceSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("appSettingKey") String appSettingKey, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/config/configreferences/connectionstrings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteConnectionStringKeyVaultReferencesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSiteConnectionStringKeyVaultReferenceSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("connectionStringKey") String connectionStringKey, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/connectionstrings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateConnectionStringsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ConnectionStringDictionaryInner connectionStrings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/connectionstrings/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listConnectionStringsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/config/logs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDiagnosticLogsConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/logs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateDiagnosticLogsConfigSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteLogsConfigInner siteLogsConfig, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/metadata") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateMetadataSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") StringDictionaryInner metadata, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/metadata/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listMetadataSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/publishingcredentials/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listPublishingCredentialsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/pushsettings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSitePushSettingsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PushSettingsInner pushSettings, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/pushsettings/list") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSitePushSettingsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/config/web") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/web") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteConfigResourceInner siteConfig, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/web") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteConfigResourceInner siteConfig, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/web/snapshots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listConfigurationSnapshotInfoSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/config/web/snapshots/{snapshotId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getConfigurationSnapshotSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("snapshotId") String snapshotId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/config/web/snapshots/{snapshotId}/recover") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> recoverSiteConfigurationSnapshotSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("snapshotId") String snapshotId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/containerlogs") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getWebSiteContainerLogsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/containerlogs/zip/download") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getContainerLogsZipSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/continuouswebjobs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listContinuousWebJobsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/continuouswebjobs/{webJobName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getContinuousWebJobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/continuouswebjobs/{webJobName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteContinuousWebJobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/continuouswebjobs/{webJobName}/start") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> startContinuousWebJobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/continuouswebjobs/{webJobName}/stop") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> stopContinuousWebJobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/deployments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listDeploymentsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/deployments/{id}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDeploymentSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("id") String id, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/deployments/{id}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createDeploymentSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("id") String id, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DeploymentInner deployment, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/deployments/{id}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteDeploymentSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("id") String id, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/deployments/{id}/log") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listDeploymentLogSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("id") String id, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/discoverbackup") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> discoverBackupSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RestoreRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/domainOwnershipIdentifiers") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listDomainOwnershipIdentifiersSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDomainOwnershipIdentifierSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateDomainOwnershipIdentifierSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") IdentifierInner domainOwnershipIdentifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteDomainOwnershipIdentifierSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateDomainOwnershipIdentifierSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("domainOwnershipIdentifierName") String domainOwnershipIdentifierName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") IdentifierInner domainOwnershipIdentifier, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/extensions/MSDeploy") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getMSDeployStatusSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/extensions/MSDeploy") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createMSDeployOperationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MSDeploy mSDeploy, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/extensions/MSDeploy/log") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getMSDeployLogSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/functions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceFunctionsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/functions/admin/token") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getFunctionsAdminTokenSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/functions/{functionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInstanceFunctionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/functions/{functionName}") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createInstanceFunctionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") FunctionEnvelopeInner functionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/functions/{functionName}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteInstanceFunctionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/functions/{functionName}/keys/{keyName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateFunctionSecretSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("keyName") String keyName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KeyInfoInner key, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/functions/{functionName}/keys/{keyName}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteFunctionSecretSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("keyName") String keyName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/functions/{functionName}/listkeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listFunctionKeysSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/functions/{functionName}/listsecrets") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listFunctionSecretsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("functionName") String functionName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/host/default/listkeys") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHostKeysSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/host/default/listsyncstatus") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSyncStatusSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/host/default/sync") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> syncFunctionsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/host/default/{keyType}/{keyName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateHostSecretSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("keyType") String keyType, + @PathParam("keyName") String keyName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") KeyInfoInner key, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/host/default/{keyType}/{keyName}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteHostSecretSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("keyType") String keyType, + @PathParam("keyName") String keyName, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/hostNameBindings") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHostnameBindingsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/hostNameBindings/{hostName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getHostnameBindingSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("hostName") String hostname, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hostNameBindings/{hostName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateHostnameBindingSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("hostName") String hostname, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HostnameBindingInner hostnameBinding, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hostNameBindings/{hostName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteHostnameBindingSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("hostName") String hostname, + @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.Web/sites/{name}" + + "/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getHybridConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateHybridConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HybridConnectionInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteHybridConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateHybridConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("namespaceName") String namespaceName, + @PathParam("relayName") String relayName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") HybridConnectionInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hybridConnectionRelays") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listHybridConnectionsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/hybridconnection") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listRelayServiceConnectionsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/hybridconnection/{entityName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getRelayServiceConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("entityName") String entityName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hybridconnection/{entityName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateRelayServiceConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("entityName") String entityName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RelayServiceConnectionEntityInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hybridconnection/{entityName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteRelayServiceConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("entityName") String entityName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/hybridconnection/{entityName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateRelayServiceConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("entityName") String entityName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RelayServiceConnectionEntityInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/instances") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listInstanceIdentifiersSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getInstanceInfoSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("instanceId") String instanceId, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getInstanceMsDeployStatusSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/extensions/MSDeploy") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createInstanceMSDeployOperationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") MSDeploy mSDeploy, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInstanceMSDeployLogSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/processes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/processes/{processId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInstanceProcessSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/processes/{processId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteInstanceProcessSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/processes/{processId}/dump") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getInstanceProcessDumpSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/processes/{processId}/modules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessModulesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getInstanceProcessModuleSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("baseAddress") String baseAddress, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @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.Web/sites/{name}" + + "/slots/{slot}/instances/{instanceId}/processes/{processId}/threads") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessThreadsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @PathParam("instanceId") String instanceId, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/iscloneable") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> isCloneableSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/listbackups") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSiteBackupsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/listsyncfunctiontriggerstatus") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSyncFunctionTriggersSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/migratemysql/status") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getMigrateMySqlStatusSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/networkConfig/virtualNetwork") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSwiftVirtualNetworkConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/networkConfig/virtualNetwork") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SwiftVirtualNetworkInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/networkConfig/virtualNetwork") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteSwiftVirtualNetworkSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/networkConfig/virtualNetwork") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSwiftVirtualNetworkConnectionWithCheckSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SwiftVirtualNetworkInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/networkFeatures/{view}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNetworkFeaturesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("view") String view, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/networkTrace/operationresults/{operationId}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getNetworkTraceOperationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("operationId") String operationId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/networkTrace/start") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> startWebSiteNetworkTraceSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("durationInSeconds") Integer durationInSeconds, + @PathParam("slot") String slot, + @QueryParam("maxFrameLength") Integer maxFrameLength, + @QueryParam("sasUrl") String sasUrl, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/networkTrace/startOperation") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> startWebSiteNetworkTraceOperationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("durationInSeconds") Integer durationInSeconds, + @PathParam("slot") String slot, + @QueryParam("maxFrameLength") Integer maxFrameLength, + @QueryParam("sasUrl") String sasUrl, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/networkTrace/stop") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> stopWebSiteNetworkTraceSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/networkTrace/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> getNetworkTracesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("operationId") String operationId, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/networkTraces/current/operationresults/{operationId}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getNetworkTraceOperationSlotV2( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("operationId") String operationId, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/networkTraces/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> getNetworkTracesSlotV2( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("operationId") String operationId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/newpassword") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> generateNewSitePublishingPasswordSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/perfcounters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listPerfMonCountersSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/phplogging") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSitePhpErrorLogFlagSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/premieraddons") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listPremierAddOnsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/premieraddons/{premierAddOnName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPremierAddOnSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("premierAddOnName") String premierAddOnName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/premieraddons/{premierAddOnName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> addPremierAddOnSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("premierAddOnName") String premierAddOnName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PremierAddOnInner premierAddOn, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/premieraddons/{premierAddOnName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deletePremierAddOnSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("premierAddOnName") String premierAddOnName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/premieraddons/{premierAddOnName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updatePremierAddOnSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("premierAddOnName") String premierAddOnName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PremierAddOnPatchResource premierAddOn, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/privateAccess/virtualNetworks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateAccessSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/privateAccess/virtualNetworks") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> putPrivateAccessVnetSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateAccessInner access, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/privateEndpointConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateEndpointConnectionListSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateEndpointConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> approveOrRejectPrivateEndpointConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> deletePrivateEndpointConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/privateLinkResources") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPrivateLinkResourcesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/processes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/processes/{processId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getProcessSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/processes/{processId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteProcessSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/processes/{processId}/dump") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono getProcessDumpSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/processes/{processId}/modules") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessModulesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/processes/{processId}/modules/{baseAddress}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getProcessModuleSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("baseAddress") String baseAddress, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/processes/{processId}/threads") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessThreadsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("processId") String processId, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/publicCertificates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listPublicCertificatesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/publicCertificates/{publicCertificateName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getPublicCertificateSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("publicCertificateName") String publicCertificateName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/publicCertificates/{publicCertificateName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdatePublicCertificateSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("publicCertificateName") String publicCertificateName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PublicCertificateInner publicCertificate, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/publicCertificates/{publicCertificateName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deletePublicCertificateSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("publicCertificateName") String publicCertificateName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/publishxml") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono listPublishingProfileXmlWithSecretsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmPublishingProfileOptions publishingProfileOptions, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/resetSlotConfig") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> resetSlotConfigurationSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/restart") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> restartSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @QueryParam("softRestart") Boolean softRestart, + @QueryParam("synchronous") Boolean synchronous, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/restoreFromBackupBlob") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> restoreFromBackupBlobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") RestoreRequestInner request, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/restoreFromDeletedApp") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> restoreFromDeletedAppSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DeletedAppRestoreRequest restoreRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/restoreSnapshot") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> restoreSnapshotSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SnapshotRestoreRequest restoreRequest, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/siteextensions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSiteExtensionsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/siteextensions/{siteExtensionId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getSiteExtensionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("siteExtensionId") String siteExtensionId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/siteextensions/{siteExtensionId}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> installSiteExtensionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("siteExtensionId") String siteExtensionId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/siteextensions/{siteExtensionId}") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteSiteExtensionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("siteExtensionId") String siteExtensionId, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/slotsdiffs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSlotDifferencesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmSlotEntity slotSwapEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/slotsswap") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> swapSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmSlotEntity slotSwapEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/snapshots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSnapshotsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/snapshotsdr") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSnapshotsFromDRSecondarySlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/sourcecontrols/web") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSourceControlSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/sourcecontrols/web") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdateSourceControlSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteSourceControlInner siteSourceControl, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/sourcecontrols/web") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteSourceControlSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @QueryParam("additionalFlags") String additionalFlags, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/sourcecontrols/web") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSourceControlSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteSourceControlInner siteSourceControl, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/start") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> startSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/startNetworkTrace") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> startNetworkTraceSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("durationInSeconds") Integer durationInSeconds, + @PathParam("slot") String slot, + @QueryParam("maxFrameLength") Integer maxFrameLength, + @QueryParam("sasUrl") String sasUrl, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/stop") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> stopSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/stopNetworkTrace") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> stopNetworkTraceSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/sync") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> syncRepositorySlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/syncfunctiontriggers") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> syncFunctionTriggersSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/triggeredwebjobs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listTriggeredWebJobsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/triggeredwebjobs/{webJobName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getTriggeredWebJobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/triggeredwebjobs/{webJobName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteTriggeredWebJobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/triggeredwebjobs/{webJobName}/history") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listTriggeredWebJobHistorySlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getTriggeredWebJobHistorySlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("id") String id, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/triggeredwebjobs/{webJobName}/run") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> runTriggeredWebJobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listUsagesSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/virtualNetworkConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listVnetConnectionsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getVnetConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateVnetConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetInfoResourceInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteVnetConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateVnetConnectionSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetInfoResourceInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getVnetConnectionGatewaySlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("gatewayName") String gatewayName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateVnetConnectionGatewaySlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("gatewayName") String gatewayName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetGatewayInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateVnetConnectionGatewaySlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("gatewayName") String gatewayName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetGatewayInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slots/{slot}/webjobs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWebJobsSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("slot") String slot, + @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.Web/sites/{name}" + + "/slots/{slot}/webjobs/{webJobName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getWebJobSlot( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("slot") String slot, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slotsdiffs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSlotDifferencesFromProduction( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmSlotEntity slotSwapEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/slotsswap") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> swapSlotWithProduction( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CsmSlotEntity slotSwapEntity, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/snapshots") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSnapshots( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/snapshotsdr") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listSnapshotsFromDRSecondary( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/sourcecontrols/web") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getSourceControl( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/sourcecontrols/web") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdateSourceControl( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteSourceControlInner siteSourceControl, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/sourcecontrols/web") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteSourceControl( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("additionalFlags") String additionalFlags, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/sourcecontrols/web") + @ExpectedResponses({200, 201, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateSourceControl( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SiteSourceControlInner siteSourceControl, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/start") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> start( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/startNetworkTrace") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> startNetworkTrace( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @QueryParam("durationInSeconds") Integer durationInSeconds, + @QueryParam("maxFrameLength") Integer maxFrameLength, + @QueryParam("sasUrl") String sasUrl, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/stop") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> stop( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/stopNetworkTrace") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> stopNetworkTrace( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/sync") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> syncRepository( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/syncfunctiontriggers") + @ExpectedResponses({204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> syncFunctionTriggers( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/triggeredwebjobs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listTriggeredWebJobs( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/triggeredwebjobs/{webJobName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getTriggeredWebJob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/triggeredwebjobs/{webJobName}") + @ExpectedResponses({200, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> deleteTriggeredWebJob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @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.Web/sites/{name}" + + "/triggeredwebjobs/{webJobName}/history") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listTriggeredWebJobHistory( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @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.Web/sites/{name}" + + "/triggeredwebjobs/{webJobName}/history/{id}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getTriggeredWebJobHistory( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("id") String id, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/triggeredwebjobs/{webJobName}/run") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> runTriggeredWebJob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @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.Web/sites/{name}" + + "/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listUsages( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @QueryParam(value = "$filter", encoded = true) String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/virtualNetworkConnections") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> listVnetConnections( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getVnetConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateVnetConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetInfoResourceInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> deleteVnetConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/virtualNetworkConnections/{vnetName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateVnetConnection( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetInfoResourceInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getVnetConnectionGateway( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("gatewayName") String gatewayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdateVnetConnectionGateway( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("gatewayName") String gatewayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetGatewayInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> updateVnetConnectionGateway( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("vnetName") String vnetName, + @PathParam("gatewayName") String gatewayName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") VnetGatewayInner connectionEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}" + + "/webjobs") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWebJobs( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @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.Web/sites/{name}" + + "/webjobs/{webJobName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getWebJob( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("name") String name, + @PathParam("webJobName") String webJobName, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBackupsNext( + @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> listBasicPublishingCredentialsPoliciesNext( + @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> listConfigurationsNext( + @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> getAppSettingsKeyVaultReferencesNext( + @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> getSiteConnectionStringKeyVaultReferencesNext( + @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> listConfigurationSnapshotInfoNext( + @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> listContinuousWebJobsNext( + @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> listDeploymentsNext( + @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> listDomainOwnershipIdentifiersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listFunctionsNext( + @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> listHostnameBindingsNext( + @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> listInstanceIdentifiersNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessModulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessThreadsNext( + @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> listSiteBackupsNext( + @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> listPerfMonCountersNext( + @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> getPrivateEndpointConnectionListNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessModulesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessThreadsNext( + @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> listPublicCertificatesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSiteExtensionsNext( + @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> listSlotsNext( + @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> listBackupsSlotNext( + @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> listBasicPublishingCredentialsPoliciesSlotNext( + @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> listConfigurationsSlotNext( + @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> getAppSettingsKeyVaultReferencesSlotNext( + @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> getSiteConnectionStringKeyVaultReferencesSlotNext( + @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> listConfigurationSnapshotInfoSlotNext( + @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> listContinuousWebJobsSlotNext( + @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> listDeploymentsSlotNext( + @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> listDomainOwnershipIdentifiersSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceFunctionsSlotNext( + @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> listHostnameBindingsSlotNext( + @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> listInstanceIdentifiersSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessesSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessModulesSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listInstanceProcessThreadsSlotNext( + @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> listSiteBackupsSlotNext( + @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> listPerfMonCountersSlotNext( + @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> getPrivateEndpointConnectionListSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessesSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessModulesSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listProcessThreadsSlotNext( + @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> listPublicCertificatesSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listSiteExtensionsSlotNext( + @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> listSlotDifferencesSlotNext( + @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> listSnapshotsSlotNext( + @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> listSnapshotsFromDRSecondarySlotNext( + @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> listTriggeredWebJobsSlotNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listTriggeredWebJobHistorySlotNext( + @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> listUsagesSlotNext( + @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> listWebJobsSlotNext( + @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> listSlotDifferencesFromProductionNext( + @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> listSnapshotsNext( + @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> listSnapshotsFromDRSecondaryNext( + @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> listTriggeredWebJobsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listTriggeredWebJobHistoryNext( + @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> listUsagesNext( + @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> listWebJobsNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Description for Get all apps 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 collection of App Service apps. + */ + @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())); + } + + /** + * Description for Get all apps 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 collection of App Service apps. + */ + @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)); + } + + /** + * Description for Get all apps 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get all apps 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get all apps 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Description for Get all apps 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 collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default + * is false, which only gives you the production slot of all apps. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Boolean includeSlots) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + includeSlots, + 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())); + } + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default + * is false, which only gives you the production slot of all apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Boolean includeSlots, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required 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 + .listByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + includeSlots, + 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)); + } + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default + * is false, which only gives you the production slot of all apps. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Boolean includeSlots) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, includeSlots), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + final Boolean includeSlots = null; + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, includeSlots), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default + * is false, which only gives you the production slot of all apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync( + String resourceGroupName, Boolean includeSlots, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, includeSlots, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + final Boolean includeSlots = null; + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, includeSlots)); + } + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default + * is false, which only gives you the production slot of all apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup( + String resourceGroupName, Boolean includeSlots, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, includeSlots, context)); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getByResourceGroup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String name) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner getByResourceGroup(String resourceGroupName, String name) { + return getByResourceGroupAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, SiteInner siteEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); + } else { + siteEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); + } else { + siteEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteEnvelope, + accept, + context); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteInner> beginCreateOrUpdateAsync( + String resourceGroupName, String name, SiteInner siteEnvelope) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, name, siteEnvelope); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class, this.client.getContext()); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteInner> beginCreateOrUpdateAsync( + String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, name, siteEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class, context); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteInner> beginCreateOrUpdate( + String resourceGroupName, String name, SiteInner siteEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope).getSyncPoller(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteInner> beginCreateOrUpdate( + String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope, context).getSyncPoller(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String name, SiteInner siteEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner createOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope) { + return createOrUpdateAsync(resourceGroupName, name, siteEnvelope).block(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner createOrUpdate(String resourceGroupName, String name, SiteInner siteEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, name, siteEnvelope, context).block(); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + deleteMetrics, + deleteEmptyServerFarm, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync( + String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .delete( + this.client.getEndpoint(), + resourceGroupName, + name, + deleteMetrics, + deleteEmptyServerFarm, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm) { + return deleteWithResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String name) { + final Boolean deleteMetrics = null; + final Boolean deleteEmptyServerFarm = null; + return deleteWithResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String name) { + final Boolean deleteMetrics = null; + final Boolean deleteEmptyServerFarm = null; + deleteAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm).block(); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse( + String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Context context) { + return deleteWithResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, context).block(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, SitePatchResourceInner siteEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); + } else { + siteEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync( + String resourceGroupName, String name, SitePatchResourceInner siteEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); + } else { + siteEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteEnvelope, + accept, + context); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope) { + return updateWithResponseAsync(resourceGroupName, name, siteEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner update(String resourceGroupName, String name, SitePatchResourceInner siteEnvelope) { + return updateAsync(resourceGroupName, name, siteEnvelope).block(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String name, SitePatchResourceInner siteEnvelope, Context context) { + return updateWithResponseAsync(resourceGroupName, name, siteEnvelope, context).block(); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostname 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. + * @return custom domain analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> analyzeCustomHostnameWithResponseAsync( + String resourceGroupName, String name, String hostname) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .analyzeCustomHostname( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostname 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> analyzeCustomHostnameWithResponseAsync( + String resourceGroupName, String name, String hostname, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .analyzeCustomHostname( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostname 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. + * @return custom domain analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono analyzeCustomHostnameAsync( + String resourceGroupName, String name, String hostname) { + return analyzeCustomHostnameWithResponseAsync(resourceGroupName, name, hostname) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return custom domain analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono analyzeCustomHostnameAsync(String resourceGroupName, String name) { + final String hostname = null; + return analyzeCustomHostnameWithResponseAsync(resourceGroupName, name, hostname) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return custom domain analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CustomHostnameAnalysisResultInner analyzeCustomHostname(String resourceGroupName, String name) { + final String hostname = null; + return analyzeCustomHostnameAsync(resourceGroupName, name, hostname).block(); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostname 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response analyzeCustomHostnameWithResponse( + String resourceGroupName, String name, String hostname, Context context) { + return analyzeCustomHostnameWithResponseAsync(resourceGroupName, name, hostname, context).block(); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> applySlotConfigToProductionWithResponseAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .applySlotConfigToProduction( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> applySlotConfigToProductionWithResponseAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .applySlotConfigToProduction( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono applySlotConfigToProductionAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + return applySlotConfigToProductionWithResponseAsync(resourceGroupName, name, slotSwapEntity) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + applySlotConfigToProductionAsync(resourceGroupName, name, slotSwapEntity).block(); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response applySlotConfigToProductionWithResponse( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + return applySlotConfigToProductionWithResponseAsync(resourceGroupName, name, slotSwapEntity, context).block(); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> backupWithResponseAsync( + String resourceGroupName, String name, BackupRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .backup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> backupWithResponseAsync( + String resourceGroupName, String name, BackupRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .backup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono backupAsync(String resourceGroupName, String name, BackupRequestInner request) { + return backupWithResponseAsync(resourceGroupName, name, request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupItemInner backup(String resourceGroupName, String name, BackupRequestInner request) { + return backupAsync(resourceGroupName, name, request).block(); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response backupWithResponse( + String resourceGroupName, String name, BackupRequestInner request, Context context) { + return backupWithResponseAsync(resourceGroupName, name, request, context).block(); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupsSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listBackups( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listBackups( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBackupsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listBackupsSinglePageAsync(resourceGroupName, name), + nextLink -> listBackupsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBackupsAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listBackupsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listBackupsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBackups(String resourceGroupName, String name) { + return new PagedIterable<>(listBackupsAsync(resourceGroupName, name)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBackups(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listBackupsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBackupStatusWithResponseAsync( + String resourceGroupName, String name, String backupId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required 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 + .getBackupStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBackupStatusWithResponseAsync( + String resourceGroupName, String name, String backupId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required 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 + .getBackupStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBackupStatusAsync(String resourceGroupName, String name, String backupId) { + return getBackupStatusWithResponseAsync(resourceGroupName, name, backupId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupItemInner getBackupStatus(String resourceGroupName, String name, String backupId) { + return getBackupStatusAsync(resourceGroupName, name, backupId).block(); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBackupStatusWithResponse( + String resourceGroupName, String name, String backupId, Context context) { + return getBackupStatusWithResponseAsync(resourceGroupName, name, backupId, context).block(); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBackupWithResponseAsync(String resourceGroupName, String name, String backupId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required 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 + .deleteBackup( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBackupWithResponseAsync( + String resourceGroupName, String name, String backupId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required 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 + .deleteBackup( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteBackupAsync(String resourceGroupName, String name, String backupId) { + return deleteBackupWithResponseAsync(resourceGroupName, name, backupId) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteBackup(String resourceGroupName, String name, String backupId) { + deleteBackupAsync(resourceGroupName, name, backupId).block(); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteBackupWithResponse( + String resourceGroupName, String name, String backupId, Context context) { + return deleteBackupWithResponseAsync(resourceGroupName, name, backupId, context).block(); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupStatusSecretsWithResponseAsync( + String resourceGroupName, String name, String backupId, BackupRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listBackupStatusSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupStatusSecretsWithResponseAsync( + String resourceGroupName, String name, String backupId, BackupRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBackupStatusSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listBackupStatusSecretsAsync( + String resourceGroupName, String name, String backupId, BackupRequestInner request) { + return listBackupStatusSecretsWithResponseAsync(resourceGroupName, name, backupId, request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupItemInner listBackupStatusSecrets( + String resourceGroupName, String name, String backupId, BackupRequestInner request) { + return listBackupStatusSecretsAsync(resourceGroupName, name, backupId, request).block(); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBackupStatusSecretsWithResponse( + String resourceGroupName, String name, String backupId, BackupRequestInner request, Context context) { + return listBackupStatusSecretsWithResponseAsync(resourceGroupName, name, backupId, request, context).block(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreWithResponseAsync( + String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restore( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreWithResponseAsync( + String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restore( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreAsync( + String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + Mono>> mono = restoreWithResponseAsync(resourceGroupName, name, backupId, request); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreAsync( + String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreWithResponseAsync(resourceGroupName, name, backupId, request, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestore( + String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return beginRestoreAsync(resourceGroupName, name, backupId, request).getSyncPoller(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestore( + String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { + return beginRestoreAsync(resourceGroupName, name, backupId, request, context).getSyncPoller(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreAsync( + String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + return beginRestoreAsync(resourceGroupName, name, backupId, request) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreAsync( + String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { + return beginRestoreAsync(resourceGroupName, name, backupId, request, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + restoreAsync(resourceGroupName, name, backupId, request).block(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restore( + String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { + restoreAsync(resourceGroupName, name, backupId, request, context).block(); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBasicPublishingCredentialsPoliciesSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listBasicPublishingCredentialsPolicies( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBasicPublishingCredentialsPoliciesSinglePageAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listBasicPublishingCredentialsPolicies( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBasicPublishingCredentialsPoliciesAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listBasicPublishingCredentialsPoliciesSinglePageAsync(resourceGroupName, name), + nextLink -> listBasicPublishingCredentialsPoliciesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBasicPublishingCredentialsPoliciesAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listBasicPublishingCredentialsPoliciesSinglePageAsync(resourceGroupName, name, context), + nextLink -> listBasicPublishingCredentialsPoliciesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBasicPublishingCredentialsPolicies( + String resourceGroupName, String name) { + return new PagedIterable<>(listBasicPublishingCredentialsPoliciesAsync(resourceGroupName, name)); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBasicPublishingCredentialsPolicies( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listBasicPublishingCredentialsPoliciesAsync(resourceGroupName, name, context)); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFtpAllowedWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getFtpAllowed( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFtpAllowedWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getFtpAllowed( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFtpAllowedAsync( + String resourceGroupName, String name) { + return getFtpAllowedWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CsmPublishingCredentialsPoliciesEntityInner getFtpAllowed(String resourceGroupName, String name) { + return getFtpAllowedAsync(resourceGroupName, name).block(); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFtpAllowedWithResponse( + String resourceGroupName, String name, Context context) { + return getFtpAllowedWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateFtpAllowedWithResponseAsync( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (csmPublishingAccessPoliciesEntity == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter csmPublishingAccessPoliciesEntity is required and cannot be null.")); + } else { + csmPublishingAccessPoliciesEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateFtpAllowed( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + csmPublishingAccessPoliciesEntity, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateFtpAllowedWithResponseAsync( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (csmPublishingAccessPoliciesEntity == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter csmPublishingAccessPoliciesEntity is required and cannot be null.")); + } else { + csmPublishingAccessPoliciesEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateFtpAllowed( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + csmPublishingAccessPoliciesEntity, + accept, + context); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateFtpAllowedAsync( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateFtpAllowedWithResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CsmPublishingCredentialsPoliciesEntityInner updateFtpAllowed( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateFtpAllowedAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity).block(); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateFtpAllowedWithResponse( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + return updateFtpAllowedWithResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, context) + .block(); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getScmAllowedWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getScmAllowed( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getScmAllowedWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getScmAllowed( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getScmAllowedAsync( + String resourceGroupName, String name) { + return getScmAllowedWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CsmPublishingCredentialsPoliciesEntityInner getScmAllowed(String resourceGroupName, String name) { + return getScmAllowedAsync(resourceGroupName, name).block(); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getScmAllowedWithResponse( + String resourceGroupName, String name, Context context) { + return getScmAllowedWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateScmAllowedWithResponseAsync( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (csmPublishingAccessPoliciesEntity == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter csmPublishingAccessPoliciesEntity is required and cannot be null.")); + } else { + csmPublishingAccessPoliciesEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateScmAllowed( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + csmPublishingAccessPoliciesEntity, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateScmAllowedWithResponseAsync( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (csmPublishingAccessPoliciesEntity == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter csmPublishingAccessPoliciesEntity is required and cannot be null.")); + } else { + csmPublishingAccessPoliciesEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateScmAllowed( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + csmPublishingAccessPoliciesEntity, + accept, + context); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateScmAllowedAsync( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateScmAllowedWithResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CsmPublishingCredentialsPoliciesEntityInner updateScmAllowed( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateScmAllowedAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity).block(); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateScmAllowedWithResponse( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + return updateScmAllowedWithResponseAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, context) + .block(); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listConfigurations( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listConfigurations( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listConfigurationsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listConfigurationsSinglePageAsync(resourceGroupName, name), + nextLink -> listConfigurationsNextSinglePageAsync(nextLink)); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listConfigurationsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listConfigurationsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listConfigurationsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurations(String resourceGroupName, String name) { + return new PagedIterable<>(listConfigurationsAsync(resourceGroupName, name)); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurations( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listConfigurationsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateApplicationSettingsWithResponseAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateApplicationSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateApplicationSettingsWithResponseAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateApplicationSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateApplicationSettingsAsync( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + return updateApplicationSettingsWithResponseAsync(resourceGroupName, name, appSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner updateApplicationSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + return updateApplicationSettingsAsync(resourceGroupName, name, appSettings).block(); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateApplicationSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + return updateApplicationSettingsWithResponseAsync(resourceGroupName, name, appSettings, context).block(); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listApplicationSettingsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listApplicationSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listApplicationSettingsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listApplicationSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listApplicationSettingsAsync(String resourceGroupName, String name) { + return listApplicationSettingsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listApplicationSettings(String resourceGroupName, String name) { + return listApplicationSettingsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listApplicationSettingsWithResponse( + String resourceGroupName, String name, Context context) { + return listApplicationSettingsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAuthSettingsWithResponseAsync( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteAuthSettings == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteAuthSettings is required and cannot be null.")); + } else { + siteAuthSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAuthSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteAuthSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web 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 configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAuthSettingsWithResponseAsync( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteAuthSettings == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteAuthSettings is required and cannot be null.")); + } else { + siteAuthSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAuthSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteAuthSettings, + accept, + context); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAuthSettingsAsync( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsWithResponseAsync(resourceGroupName, name, siteAuthSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsInner updateAuthSettings( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsAsync(resourceGroupName, name, siteAuthSettings).block(); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web 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 configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAuthSettingsWithResponse( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings, Context context) { + return updateAuthSettingsWithResponseAsync(resourceGroupName, name, siteAuthSettings, context).block(); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAuthSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAuthSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAuthSettingsAsync(String resourceGroupName, String name) { + return getAuthSettingsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsInner getAuthSettings(String resourceGroupName, String name) { + return getAuthSettingsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAuthSettingsWithResponse( + String resourceGroupName, String name, Context context) { + return getAuthSettingsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsV2WithoutSecretsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAuthSettingsV2WithoutSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsV2WithoutSecretsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAuthSettingsV2WithoutSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAuthSettingsV2WithoutSecretsAsync(String resourceGroupName, String name) { + return getAuthSettingsV2WithoutSecretsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsV2Inner getAuthSettingsV2WithoutSecrets(String resourceGroupName, String name) { + return getAuthSettingsV2WithoutSecretsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAuthSettingsV2WithoutSecretsWithResponse( + String resourceGroupName, String name, Context context) { + return getAuthSettingsV2WithoutSecretsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAuthSettingsV2WithResponseAsync( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteAuthSettingsV2 == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteAuthSettingsV2 is required and cannot be null.")); + } else { + siteAuthSettingsV2.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAuthSettingsV2( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteAuthSettingsV2, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web 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 configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAuthSettingsV2WithResponseAsync( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteAuthSettingsV2 == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteAuthSettingsV2 is required and cannot be null.")); + } else { + siteAuthSettingsV2.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAuthSettingsV2( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteAuthSettingsV2, + accept, + context); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAuthSettingsV2Async( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2) { + return updateAuthSettingsV2WithResponseAsync(resourceGroupName, name, siteAuthSettingsV2) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsV2Inner updateAuthSettingsV2( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2) { + return updateAuthSettingsV2Async(resourceGroupName, name, siteAuthSettingsV2).block(); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web 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 configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAuthSettingsV2WithResponse( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2, Context context) { + return updateAuthSettingsV2WithResponseAsync(resourceGroupName, name, siteAuthSettingsV2, context).block(); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsV2WithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAuthSettingsV2( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsV2WithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAuthSettingsV2( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAuthSettingsV2Async(String resourceGroupName, String name) { + return getAuthSettingsV2WithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsV2Inner getAuthSettingsV2(String resourceGroupName, String name) { + return getAuthSettingsV2Async(resourceGroupName, name).block(); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAuthSettingsV2WithResponse( + String resourceGroupName, String name, Context context) { + return getAuthSettingsV2WithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAzureStorageAccountsWithResponseAsync( + String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (azureStorageAccounts == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureStorageAccounts is required and cannot be null.")); + } else { + azureStorageAccounts.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAzureStorageAccounts( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + azureStorageAccounts, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the 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 azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAzureStorageAccountsWithResponseAsync( + String resourceGroupName, + String name, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (azureStorageAccounts == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureStorageAccounts is required and cannot be null.")); + } else { + azureStorageAccounts.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAzureStorageAccounts( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + azureStorageAccounts, + accept, + context); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAzureStorageAccountsAsync( + String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + return updateAzureStorageAccountsWithResponseAsync(resourceGroupName, name, azureStorageAccounts) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureStoragePropertyDictionaryResourceInner updateAzureStorageAccounts( + String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + return updateAzureStorageAccountsAsync(resourceGroupName, name, azureStorageAccounts).block(); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the 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 azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAzureStorageAccountsWithResponse( + String resourceGroupName, + String name, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context) { + return updateAzureStorageAccountsWithResponseAsync(resourceGroupName, name, azureStorageAccounts, context) + .block(); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAzureStorageAccountsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listAzureStorageAccounts( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAzureStorageAccountsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listAzureStorageAccounts( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAzureStorageAccountsAsync( + String resourceGroupName, String name) { + return listAzureStorageAccountsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureStoragePropertyDictionaryResourceInner listAzureStorageAccounts(String resourceGroupName, String name) { + return listAzureStorageAccountsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAzureStorageAccountsWithResponse( + String resourceGroupName, String name, Context context) { + return listAzureStorageAccountsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateBackupConfigurationWithResponseAsync( + String resourceGroupName, String name, BackupRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateBackupConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateBackupConfigurationWithResponseAsync( + String resourceGroupName, String name, BackupRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateBackupConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateBackupConfigurationAsync( + String resourceGroupName, String name, BackupRequestInner request) { + return updateBackupConfigurationWithResponseAsync(resourceGroupName, name, request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupRequestInner updateBackupConfiguration( + String resourceGroupName, String name, BackupRequestInner request) { + return updateBackupConfigurationAsync(resourceGroupName, name, request).block(); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateBackupConfigurationWithResponse( + String resourceGroupName, String name, BackupRequestInner request, Context context) { + return updateBackupConfigurationWithResponseAsync(resourceGroupName, name, request, context).block(); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBackupConfigurationWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteBackupConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBackupConfigurationWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteBackupConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteBackupConfigurationAsync(String resourceGroupName, String name) { + return deleteBackupConfigurationWithResponseAsync(resourceGroupName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteBackupConfiguration(String resourceGroupName, String name) { + deleteBackupConfigurationAsync(resourceGroupName, name).block(); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteBackupConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + return deleteBackupConfigurationWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBackupConfigurationWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getBackupConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBackupConfigurationWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getBackupConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBackupConfigurationAsync(String resourceGroupName, String name) { + return getBackupConfigurationWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupRequestInner getBackupConfiguration(String resourceGroupName, String name) { + return getBackupConfigurationAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBackupConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + return getBackupConfigurationWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingsKeyVaultReferencesSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAppSettingsKeyVaultReferences( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingsKeyVaultReferencesSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getAppSettingsKeyVaultReferences( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAppSettingsKeyVaultReferencesAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getAppSettingsKeyVaultReferencesSinglePageAsync(resourceGroupName, name), + nextLink -> getAppSettingsKeyVaultReferencesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAppSettingsKeyVaultReferencesAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getAppSettingsKeyVaultReferencesSinglePageAsync(resourceGroupName, name, context), + nextLink -> getAppSettingsKeyVaultReferencesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getAppSettingsKeyVaultReferences(String resourceGroupName, String name) { + return new PagedIterable<>(getAppSettingsKeyVaultReferencesAsync(resourceGroupName, name)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getAppSettingsKeyVaultReferences( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getAppSettingsKeyVaultReferencesAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingKeyVaultReferenceWithResponseAsync( + String resourceGroupName, String name, String appSettingKey) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (appSettingKey == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettingKey is required 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 + .getAppSettingKeyVaultReference( + this.client.getEndpoint(), + resourceGroupName, + name, + appSettingKey, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingKeyVaultReferenceWithResponseAsync( + String resourceGroupName, String name, String appSettingKey, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (appSettingKey == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettingKey is required 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 + .getAppSettingKeyVaultReference( + this.client.getEndpoint(), + resourceGroupName, + name, + appSettingKey, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAppSettingKeyVaultReferenceAsync( + String resourceGroupName, String name, String appSettingKey) { + return getAppSettingKeyVaultReferenceWithResponseAsync(resourceGroupName, name, appSettingKey) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiKVReferenceInner getAppSettingKeyVaultReference( + String resourceGroupName, String name, String appSettingKey) { + return getAppSettingKeyVaultReferenceAsync(resourceGroupName, name, appSettingKey).block(); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAppSettingKeyVaultReferenceWithResponse( + String resourceGroupName, String name, String appSettingKey, Context context) { + return getAppSettingKeyVaultReferenceWithResponseAsync(resourceGroupName, name, appSettingKey, context).block(); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferencesSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getSiteConnectionStringKeyVaultReferences( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferencesSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getSiteConnectionStringKeyVaultReferences( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getSiteConnectionStringKeyVaultReferencesAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getSiteConnectionStringKeyVaultReferencesSinglePageAsync(resourceGroupName, name), + nextLink -> getSiteConnectionStringKeyVaultReferencesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getSiteConnectionStringKeyVaultReferencesAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getSiteConnectionStringKeyVaultReferencesSinglePageAsync(resourceGroupName, name, context), + nextLink -> getSiteConnectionStringKeyVaultReferencesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSiteConnectionStringKeyVaultReferences( + String resourceGroupName, String name) { + return new PagedIterable<>(getSiteConnectionStringKeyVaultReferencesAsync(resourceGroupName, name)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSiteConnectionStringKeyVaultReferences( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getSiteConnectionStringKeyVaultReferencesAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferenceWithResponseAsync( + String resourceGroupName, String name, String connectionStringKey) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (connectionStringKey == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionStringKey is required 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 + .getSiteConnectionStringKeyVaultReference( + this.client.getEndpoint(), + resourceGroupName, + name, + connectionStringKey, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferenceWithResponseAsync( + String resourceGroupName, String name, String connectionStringKey, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (connectionStringKey == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionStringKey is required 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 + .getSiteConnectionStringKeyVaultReference( + this.client.getEndpoint(), + resourceGroupName, + name, + connectionStringKey, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteConnectionStringKeyVaultReferenceAsync( + String resourceGroupName, String name, String connectionStringKey) { + return getSiteConnectionStringKeyVaultReferenceWithResponseAsync(resourceGroupName, name, connectionStringKey) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiKVReferenceInner getSiteConnectionStringKeyVaultReference( + String resourceGroupName, String name, String connectionStringKey) { + return getSiteConnectionStringKeyVaultReferenceAsync(resourceGroupName, name, connectionStringKey).block(); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteConnectionStringKeyVaultReferenceWithResponse( + String resourceGroupName, String name, String connectionStringKey, Context context) { + return getSiteConnectionStringKeyVaultReferenceWithResponseAsync( + resourceGroupName, name, connectionStringKey, context) + .block(); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateConnectionStringsWithResponseAsync( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (connectionStrings == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionStrings is required and cannot be null.")); + } else { + connectionStrings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateConnectionStrings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionStrings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateConnectionStringsWithResponseAsync( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (connectionStrings == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionStrings is required and cannot be null.")); + } else { + connectionStrings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateConnectionStrings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionStrings, + accept, + context); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateConnectionStringsAsync( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsWithResponseAsync(resourceGroupName, name, connectionStrings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectionStringDictionaryInner updateConnectionStrings( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsAsync(resourceGroupName, name, connectionStrings).block(); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateConnectionStringsWithResponse( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings, Context context) { + return updateConnectionStringsWithResponseAsync(resourceGroupName, name, connectionStrings, context).block(); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConnectionStringsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listConnectionStrings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConnectionStringsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listConnectionStrings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listConnectionStringsAsync(String resourceGroupName, String name) { + return listConnectionStringsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectionStringDictionaryInner listConnectionStrings(String resourceGroupName, String name) { + return listConnectionStringsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listConnectionStringsWithResponse( + String resourceGroupName, String name, Context context) { + return listConnectionStringsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDiagnosticLogsConfigurationWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getDiagnosticLogsConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 configuration of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDiagnosticLogsConfigurationWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getDiagnosticLogsConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDiagnosticLogsConfigurationAsync(String resourceGroupName, String name) { + return getDiagnosticLogsConfigurationWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteLogsConfigInner getDiagnosticLogsConfiguration(String resourceGroupName, String name) { + return getDiagnosticLogsConfigurationAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 configuration of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiagnosticLogsConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + return getDiagnosticLogsConfigurationWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateDiagnosticLogsConfigWithResponseAsync( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteLogsConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteLogsConfig is required and cannot be null.")); + } else { + siteLogsConfig.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateDiagnosticLogsConfig( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteLogsConfig, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateDiagnosticLogsConfigWithResponseAsync( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteLogsConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteLogsConfig is required and cannot be null.")); + } else { + siteLogsConfig.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateDiagnosticLogsConfig( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteLogsConfig, + accept, + context); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDiagnosticLogsConfigAsync( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigWithResponseAsync(resourceGroupName, name, siteLogsConfig) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteLogsConfigInner updateDiagnosticLogsConfig( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigAsync(resourceGroupName, name, siteLogsConfig).block(); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateDiagnosticLogsConfigWithResponse( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig, Context context) { + return updateDiagnosticLogsConfigWithResponseAsync(resourceGroupName, name, siteLogsConfig, context).block(); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateMetadataWithResponseAsync( + String resourceGroupName, String name, StringDictionaryInner metadata) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (metadata == null) { + return Mono.error(new IllegalArgumentException("Parameter metadata is required and cannot be null.")); + } else { + metadata.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateMetadata( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + metadata, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateMetadataWithResponseAsync( + String resourceGroupName, String name, StringDictionaryInner metadata, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (metadata == null) { + return Mono.error(new IllegalArgumentException("Parameter metadata is required and cannot be null.")); + } else { + metadata.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateMetadata( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + metadata, + accept, + context); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateMetadataAsync( + String resourceGroupName, String name, StringDictionaryInner metadata) { + return updateMetadataWithResponseAsync(resourceGroupName, name, metadata) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner updateMetadata(String resourceGroupName, String name, StringDictionaryInner metadata) { + return updateMetadataAsync(resourceGroupName, name, metadata).block(); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateMetadataWithResponse( + String resourceGroupName, String name, StringDictionaryInner metadata, Context context) { + return updateMetadataWithResponseAsync(resourceGroupName, name, metadata, context).block(); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMetadataWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMetadata( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMetadataWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listMetadata( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listMetadataAsync(String resourceGroupName, String name) { + return listMetadataWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listMetadata(String resourceGroupName, String name) { + return listMetadataAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listMetadataWithResponse( + String resourceGroupName, String name, Context context) { + return listMetadataWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listPublishingCredentialsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listPublishingCredentials( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listPublishingCredentialsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listPublishingCredentials( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UserInner> beginListPublishingCredentialsAsync( + String resourceGroupName, String name) { + Mono>> mono = listPublishingCredentialsWithResponseAsync(resourceGroupName, name); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class, this.client.getContext()); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UserInner> beginListPublishingCredentialsAsync( + String resourceGroupName, String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + listPublishingCredentialsWithResponseAsync(resourceGroupName, name, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class, context); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UserInner> beginListPublishingCredentials( + String resourceGroupName, String name) { + return beginListPublishingCredentialsAsync(resourceGroupName, name).getSyncPoller(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UserInner> beginListPublishingCredentials( + String resourceGroupName, String name, Context context) { + return beginListPublishingCredentialsAsync(resourceGroupName, name, context).getSyncPoller(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPublishingCredentialsAsync(String resourceGroupName, String name) { + return beginListPublishingCredentialsAsync(resourceGroupName, name) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPublishingCredentialsAsync(String resourceGroupName, String name, Context context) { + return beginListPublishingCredentialsAsync(resourceGroupName, name, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserInner listPublishingCredentials(String resourceGroupName, String name) { + return listPublishingCredentialsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserInner listPublishingCredentials(String resourceGroupName, String name, Context context) { + return listPublishingCredentialsAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSitePushSettingsWithResponseAsync( + String resourceGroupName, String name, PushSettingsInner pushSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (pushSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter pushSettings is required and cannot be null.")); + } else { + pushSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSitePushSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + pushSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web 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 push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSitePushSettingsWithResponseAsync( + String resourceGroupName, String name, PushSettingsInner pushSettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (pushSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter pushSettings is required and cannot be null.")); + } else { + pushSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSitePushSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + pushSettings, + accept, + context); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSitePushSettingsAsync( + String resourceGroupName, String name, PushSettingsInner pushSettings) { + return updateSitePushSettingsWithResponseAsync(resourceGroupName, name, pushSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PushSettingsInner updateSitePushSettings( + String resourceGroupName, String name, PushSettingsInner pushSettings) { + return updateSitePushSettingsAsync(resourceGroupName, name, pushSettings).block(); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web 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 push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSitePushSettingsWithResponse( + String resourceGroupName, String name, PushSettingsInner pushSettings, Context context) { + return updateSitePushSettingsWithResponseAsync(resourceGroupName, name, pushSettings, context).block(); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSitePushSettingsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSitePushSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSitePushSettingsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSitePushSettings( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSitePushSettingsAsync(String resourceGroupName, String name) { + return listSitePushSettingsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PushSettingsInner listSitePushSettings(String resourceGroupName, String name) { + return listSitePushSettingsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSitePushSettingsWithResponse( + String resourceGroupName, String name, Context context) { + return listSitePushSettingsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotConfigurationNamesWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSlotConfigurationNames( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotConfigurationNamesWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSlotConfigurationNames( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSlotConfigurationNamesAsync(String resourceGroupName, String name) { + return listSlotConfigurationNamesWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SlotConfigNamesResourceInner listSlotConfigurationNames(String resourceGroupName, String name) { + return listSlotConfigurationNamesAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSlotConfigurationNamesWithResponse( + String resourceGroupName, String name, Context context) { + return listSlotConfigurationNamesWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSlotConfigurationNamesWithResponseAsync( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (slotConfigNames == null) { + return Mono + .error(new IllegalArgumentException("Parameter slotConfigNames is required and cannot be null.")); + } else { + slotConfigNames.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSlotConfigurationNames( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotConfigNames, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSlotConfigurationNamesWithResponseAsync( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (slotConfigNames == null) { + return Mono + .error(new IllegalArgumentException("Parameter slotConfigNames is required and cannot be null.")); + } else { + slotConfigNames.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSlotConfigurationNames( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotConfigNames, + accept, + context); + } + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSlotConfigurationNamesAsync( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + return updateSlotConfigurationNamesWithResponseAsync(resourceGroupName, name, slotConfigNames) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SlotConfigNamesResourceInner updateSlotConfigurationNames( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + return updateSlotConfigurationNamesAsync(resourceGroupName, name, slotConfigNames).block(); + } + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSlotConfigurationNamesWithResponse( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames, Context context) { + return updateSlotConfigurationNamesWithResponseAsync(resourceGroupName, name, slotConfigNames, context).block(); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getConfigurationWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getConfigurationWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getConfigurationAsync(String resourceGroupName, String name) { + return getConfigurationWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner getConfiguration(String resourceGroupName, String name) { + return getConfigurationAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + return getConfigurationWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateConfigurationWithResponseAsync( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateConfigurationWithResponseAsync( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + accept, + context); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateConfigurationAsync( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + return createOrUpdateConfigurationWithResponseAsync(resourceGroupName, name, siteConfig) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner createOrUpdateConfiguration( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + return createOrUpdateConfigurationAsync(resourceGroupName, name, siteConfig).block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateConfigurationWithResponse( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context) { + return createOrUpdateConfigurationWithResponseAsync(resourceGroupName, name, siteConfig, context).block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateConfigurationWithResponseAsync( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateConfigurationWithResponseAsync( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateConfiguration( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + accept, + context); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateConfigurationAsync( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + return updateConfigurationWithResponseAsync(resourceGroupName, name, siteConfig) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner updateConfiguration( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + return updateConfigurationAsync(resourceGroupName, name, siteConfig).block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateConfigurationWithResponse( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context) { + return updateConfigurationWithResponseAsync(resourceGroupName, name, siteConfig, context).block(); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationSnapshotInfoSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listConfigurationSnapshotInfo( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationSnapshotInfoSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listConfigurationSnapshotInfo( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listConfigurationSnapshotInfoAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listConfigurationSnapshotInfoSinglePageAsync(resourceGroupName, name), + nextLink -> listConfigurationSnapshotInfoNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listConfigurationSnapshotInfoAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listConfigurationSnapshotInfoSinglePageAsync(resourceGroupName, name, context), + nextLink -> listConfigurationSnapshotInfoNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurationSnapshotInfo( + String resourceGroupName, String name) { + return new PagedIterable<>(listConfigurationSnapshotInfoAsync(resourceGroupName, name)); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurationSnapshotInfo( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listConfigurationSnapshotInfoAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getConfigurationSnapshotWithResponseAsync( + String resourceGroupName, String name, String snapshotId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (snapshotId == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotId is required 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 + .getConfigurationSnapshot( + this.client.getEndpoint(), + resourceGroupName, + name, + snapshotId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getConfigurationSnapshotWithResponseAsync( + String resourceGroupName, String name, String snapshotId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (snapshotId == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotId is required 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 + .getConfigurationSnapshot( + this.client.getEndpoint(), + resourceGroupName, + name, + snapshotId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getConfigurationSnapshotAsync( + String resourceGroupName, String name, String snapshotId) { + return getConfigurationSnapshotWithResponseAsync(resourceGroupName, name, snapshotId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner getConfigurationSnapshot(String resourceGroupName, String name, String snapshotId) { + return getConfigurationSnapshotAsync(resourceGroupName, name, snapshotId).block(); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getConfigurationSnapshotWithResponse( + String resourceGroupName, String name, String snapshotId, Context context) { + return getConfigurationSnapshotWithResponseAsync(resourceGroupName, name, snapshotId, context).block(); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> recoverSiteConfigurationSnapshotWithResponseAsync( + String resourceGroupName, String name, String snapshotId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (snapshotId == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotId is required 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 + .recoverSiteConfigurationSnapshot( + this.client.getEndpoint(), + resourceGroupName, + name, + snapshotId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> recoverSiteConfigurationSnapshotWithResponseAsync( + String resourceGroupName, String name, String snapshotId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (snapshotId == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotId is required 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 + .recoverSiteConfigurationSnapshot( + this.client.getEndpoint(), + resourceGroupName, + name, + snapshotId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono recoverSiteConfigurationSnapshotAsync(String resourceGroupName, String name, String snapshotId) { + return recoverSiteConfigurationSnapshotWithResponseAsync(resourceGroupName, name, snapshotId) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 recoverSiteConfigurationSnapshot(String resourceGroupName, String name, String snapshotId) { + recoverSiteConfigurationSnapshotAsync(resourceGroupName, name, snapshotId).block(); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response recoverSiteConfigurationSnapshotWithResponse( + String resourceGroupName, String name, String snapshotId, Context context) { + return recoverSiteConfigurationSnapshotWithResponseAsync(resourceGroupName, name, snapshotId, context).block(); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWebSiteContainerLogsWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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/octet-stream"; + return FluxUtil + .withContext( + context -> + service + .getWebSiteContainerLogs( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWebSiteContainerLogsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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/octet-stream"; + context = this.client.mergeContext(context); + return service + .getWebSiteContainerLogs( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux getWebSiteContainerLogsAsync(String resourceGroupName, String name) { + return getWebSiteContainerLogsWithResponseAsync(resourceGroupName, name).flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream getWebSiteContainerLogs(String resourceGroupName, String name) { + Iterator iterator = + getWebSiteContainerLogsAsync(resourceGroupName, name) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse getWebSiteContainerLogsWithResponse(String resourceGroupName, String name, Context context) { + return getWebSiteContainerLogsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getContainerLogsZipWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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/zip"; + return FluxUtil + .withContext( + context -> + service + .getContainerLogsZip( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getContainerLogsZipWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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/zip"; + context = this.client.mergeContext(context); + return service + .getContainerLogsZip( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux getContainerLogsZipAsync(String resourceGroupName, String name) { + return getContainerLogsZipWithResponseAsync(resourceGroupName, name).flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream getContainerLogsZip(String resourceGroupName, String name) { + Iterator iterator = + getContainerLogsZipAsync(resourceGroupName, name) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse getContainerLogsZipWithResponse(String resourceGroupName, String name, Context context) { + return getContainerLogsZipWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listContinuousWebJobsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listContinuousWebJobs( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listContinuousWebJobsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listContinuousWebJobs( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listContinuousWebJobsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listContinuousWebJobsSinglePageAsync(resourceGroupName, name), + nextLink -> listContinuousWebJobsNextSinglePageAsync(nextLink)); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listContinuousWebJobsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listContinuousWebJobsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listContinuousWebJobsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listContinuousWebJobs(String resourceGroupName, String name) { + return new PagedIterable<>(listContinuousWebJobsAsync(resourceGroupName, name)); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listContinuousWebJobs( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listContinuousWebJobsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getContinuousWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .getContinuousWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getContinuousWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .getContinuousWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getContinuousWebJobAsync( + String resourceGroupName, String name, String webJobName) { + return getContinuousWebJobWithResponseAsync(resourceGroupName, name, webJobName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContinuousWebJobInner getContinuousWebJob(String resourceGroupName, String name, String webJobName) { + return getContinuousWebJobAsync(resourceGroupName, name, webJobName).block(); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return getContinuousWebJobWithResponseAsync(resourceGroupName, name, webJobName, context).block(); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteContinuousWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .deleteContinuousWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteContinuousWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .deleteContinuousWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + return deleteContinuousWebJobWithResponseAsync(resourceGroupName, name, webJobName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteContinuousWebJob(String resourceGroupName, String name, String webJobName) { + deleteContinuousWebJobAsync(resourceGroupName, name, webJobName).block(); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return deleteContinuousWebJobWithResponseAsync(resourceGroupName, name, webJobName, context).block(); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startContinuousWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .startContinuousWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startContinuousWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .startContinuousWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + return startContinuousWebJobWithResponseAsync(resourceGroupName, name, webJobName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void startContinuousWebJob(String resourceGroupName, String name, String webJobName) { + startContinuousWebJobAsync(resourceGroupName, name, webJobName).block(); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return startContinuousWebJobWithResponseAsync(resourceGroupName, name, webJobName, context).block(); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopContinuousWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .stopContinuousWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopContinuousWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .stopContinuousWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopContinuousWebJobAsync(String resourceGroupName, String name, String webJobName) { + return stopContinuousWebJobWithResponseAsync(resourceGroupName, name, webJobName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopContinuousWebJob(String resourceGroupName, String name, String webJobName) { + stopContinuousWebJobAsync(resourceGroupName, name, webJobName).block(); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return stopContinuousWebJobWithResponseAsync(resourceGroupName, name, webJobName, context).block(); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listDeployments( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listDeployments( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeploymentsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listDeploymentsSinglePageAsync(resourceGroupName, name), + nextLink -> listDeploymentsNextSinglePageAsync(nextLink)); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeploymentsAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listDeploymentsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listDeploymentsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeployments(String resourceGroupName, String name) { + return new PagedIterable<>(listDeploymentsAsync(resourceGroupName, name)); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeployments(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listDeploymentsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeploymentWithResponseAsync( + String resourceGroupName, String name, String id) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 + .getDeployment( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeploymentWithResponseAsync( + String resourceGroupName, String name, String id, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 + .getDeployment( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeploymentAsync(String resourceGroupName, String name, String id) { + return getDeploymentWithResponseAsync(resourceGroupName, name, id) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentInner getDeployment(String resourceGroupName, String name, String id) { + return getDeploymentAsync(resourceGroupName, name, id).block(); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentWithResponse( + String resourceGroupName, String name, String id, Context context) { + return getDeploymentWithResponseAsync(resourceGroupName, name, id, context).block(); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createDeploymentWithResponseAsync( + String resourceGroupName, String name, String id, DeploymentInner deployment) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 (deployment == null) { + return Mono.error(new IllegalArgumentException("Parameter deployment is required and cannot be null.")); + } else { + deployment.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createDeployment( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + deployment, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createDeploymentWithResponseAsync( + String resourceGroupName, String name, String id, DeploymentInner deployment, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 (deployment == null) { + return Mono.error(new IllegalArgumentException("Parameter deployment is required and cannot be null.")); + } else { + deployment.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createDeployment( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + deployment, + accept, + context); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createDeploymentAsync( + String resourceGroupName, String name, String id, DeploymentInner deployment) { + return createDeploymentWithResponseAsync(resourceGroupName, name, id, deployment) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentInner createDeployment( + String resourceGroupName, String name, String id, DeploymentInner deployment) { + return createDeploymentAsync(resourceGroupName, name, id, deployment).block(); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param deployment Deployment details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createDeploymentWithResponse( + String resourceGroupName, String name, String id, DeploymentInner deployment, Context context) { + return createDeploymentWithResponseAsync(resourceGroupName, name, id, deployment, context).block(); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteDeploymentWithResponseAsync(String resourceGroupName, String name, String id) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 + .deleteDeployment( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteDeploymentWithResponseAsync( + String resourceGroupName, String name, String id, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 + .deleteDeployment( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDeploymentAsync(String resourceGroupName, String name, String id) { + return deleteDeploymentWithResponseAsync(resourceGroupName, name, id) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteDeployment(String resourceGroupName, String name, String id) { + deleteDeploymentAsync(resourceGroupName, name, id).block(); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeploymentWithResponse( + String resourceGroupName, String name, String id, Context context) { + return deleteDeploymentWithResponseAsync(resourceGroupName, name, id, context).block(); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentLogWithResponseAsync( + String resourceGroupName, String name, String id) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 + .listDeploymentLog( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentLogWithResponseAsync( + String resourceGroupName, String name, String id, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 + .listDeploymentLog( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listDeploymentLogAsync(String resourceGroupName, String name, String id) { + return listDeploymentLogWithResponseAsync(resourceGroupName, name, id) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentInner listDeploymentLog(String resourceGroupName, String name, String id) { + return listDeploymentLogAsync(resourceGroupName, name, id).block(); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listDeploymentLogWithResponse( + String resourceGroupName, String name, String id, Context context) { + return listDeploymentLogWithResponseAsync(resourceGroupName, name, id, context).block(); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> discoverBackupWithResponseAsync( + String resourceGroupName, String name, RestoreRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .discoverBackup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> discoverBackupWithResponseAsync( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .discoverBackup( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono discoverBackupAsync( + String resourceGroupName, String name, RestoreRequestInner request) { + return discoverBackupWithResponseAsync(resourceGroupName, name, request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RestoreRequestInner discoverBackup(String resourceGroupName, String name, RestoreRequestInner request) { + return discoverBackupAsync(resourceGroupName, name, request).block(); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response discoverBackupWithResponse( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + return discoverBackupWithResponseAsync(resourceGroupName, name, request, context).block(); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDomainOwnershipIdentifiersSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listDomainOwnershipIdentifiers( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDomainOwnershipIdentifiersSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listDomainOwnershipIdentifiers( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDomainOwnershipIdentifiersAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listDomainOwnershipIdentifiersSinglePageAsync(resourceGroupName, name), + nextLink -> listDomainOwnershipIdentifiersNextSinglePageAsync(nextLink)); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDomainOwnershipIdentifiersAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listDomainOwnershipIdentifiersSinglePageAsync(resourceGroupName, name, context), + nextLink -> listDomainOwnershipIdentifiersNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDomainOwnershipIdentifiers(String resourceGroupName, String name) { + return new PagedIterable<>(listDomainOwnershipIdentifiersAsync(resourceGroupName, name)); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDomainOwnershipIdentifiers( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listDomainOwnershipIdentifiersAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDomainOwnershipIdentifierWithResponseAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required 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 + .getDomainOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDomainOwnershipIdentifierWithResponseAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required 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 + .getDomainOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDomainOwnershipIdentifierAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName) { + return getDomainOwnershipIdentifierWithResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentifierInner getDomainOwnershipIdentifier( + String resourceGroupName, String name, String domainOwnershipIdentifierName) { + return getDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName).block(); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDomainOwnershipIdentifierWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context) { + return getDomainOwnershipIdentifierWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, context) + .block(); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateDomainOwnershipIdentifierWithResponseAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateDomainOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateDomainOwnershipIdentifierWithResponseAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateDomainOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateDomainOwnershipIdentifierAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier) { + return createOrUpdateDomainOwnershipIdentifierWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentifierInner createOrUpdateDomainOwnershipIdentifier( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier) { + return createOrUpdateDomainOwnershipIdentifierAsync( + resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier) + .block(); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateDomainOwnershipIdentifierWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier, + Context context) { + return createOrUpdateDomainOwnershipIdentifierWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, context) + .block(); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteDomainOwnershipIdentifierWithResponseAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required 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 + .deleteDomainOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteDomainOwnershipIdentifierWithResponseAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required 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 + .deleteDomainOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDomainOwnershipIdentifierAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName) { + return deleteDomainOwnershipIdentifierWithResponseAsync(resourceGroupName, name, domainOwnershipIdentifierName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteDomainOwnershipIdentifier( + String resourceGroupName, String name, String domainOwnershipIdentifierName) { + deleteDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName).block(); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDomainOwnershipIdentifierWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context) { + return deleteDomainOwnershipIdentifierWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, context) + .block(); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateDomainOwnershipIdentifierWithResponseAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateDomainOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateDomainOwnershipIdentifierWithResponseAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateDomainOwnershipIdentifier( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDomainOwnershipIdentifierAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier) { + return updateDomainOwnershipIdentifierWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentifierInner updateDomainOwnershipIdentifier( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier) { + return updateDomainOwnershipIdentifierAsync( + resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier) + .block(); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateDomainOwnershipIdentifierWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + IdentifierInner domainOwnershipIdentifier, + Context context) { + return updateDomainOwnershipIdentifierWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, context) + .block(); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMSDeployStatusWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getMSDeployStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMSDeployStatusWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getMSDeployStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMSDeployStatusAsync(String resourceGroupName, String name) { + return getMSDeployStatusWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner getMSDeployStatus(String resourceGroupName, String name) { + return getMSDeployStatusAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMSDeployStatusWithResponse( + String resourceGroupName, String name, Context context) { + return getMSDeployStatusWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createMSDeployOperationWithResponseAsync( + String resourceGroupName, String name, MSDeploy mSDeploy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (mSDeploy == null) { + return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); + } else { + mSDeploy.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createMSDeployOperation( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + mSDeploy, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createMSDeployOperationWithResponseAsync( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (mSDeploy == null) { + return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); + } else { + mSDeploy.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createMSDeployOperation( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + mSDeploy, + accept, + context); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationAsync( + String resourceGroupName, String name, MSDeploy mSDeploy) { + Mono>> mono = + createMSDeployOperationWithResponseAsync(resourceGroupName, name, mSDeploy); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MSDeployStatusInner.class, + MSDeployStatusInner.class, + this.client.getContext()); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationAsync( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createMSDeployOperationWithResponseAsync(resourceGroupName, name, mSDeploy, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class, context); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy) { + return beginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy).getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { + return beginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy, context).getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createMSDeployOperationAsync( + String resourceGroupName, String name, MSDeploy mSDeploy) { + return beginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createMSDeployOperationAsync( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { + return beginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createMSDeployOperation(String resourceGroupName, String name, MSDeploy mSDeploy) { + return createMSDeployOperationAsync(resourceGroupName, name, mSDeploy).block(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { + return createMSDeployOperationAsync(resourceGroupName, name, mSDeploy, context).block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMSDeployLogWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getMSDeployLog( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMSDeployLogWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getMSDeployLog( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMSDeployLogAsync(String resourceGroupName, String name) { + return getMSDeployLogWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployLogInner getMSDeployLog(String resourceGroupName, String name) { + return getMSDeployLogAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMSDeployLogWithResponse( + String resourceGroupName, String name, Context context) { + return getMSDeployLogWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listFunctions( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listFunctions( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listFunctionsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listFunctionsSinglePageAsync(resourceGroupName, name), + nextLink -> listFunctionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listFunctionsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listFunctionsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listFunctionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFunctions(String resourceGroupName, String name) { + return new PagedIterable<>(listFunctionsAsync(resourceGroupName, name)); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listFunctions(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listFunctionsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionsAdminTokenWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getFunctionsAdminToken( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionsAdminTokenWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getFunctionsAdminToken( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFunctionsAdminTokenAsync(String resourceGroupName, String name) { + return getFunctionsAdminTokenWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String getFunctionsAdminToken(String resourceGroupName, String name) { + return getFunctionsAdminTokenAsync(resourceGroupName, name).block(); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFunctionsAdminTokenWithResponse(String resourceGroupName, String name, Context context) { + return getFunctionsAdminTokenWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionWithResponseAsync( + String resourceGroupName, String name, String functionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 + .getFunction( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @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 function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionWithResponseAsync( + String resourceGroupName, String name, String functionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 + .getFunction( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFunctionAsync(String resourceGroupName, String name, String functionName) { + return getFunctionWithResponseAsync(resourceGroupName, name, functionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionEnvelopeInner getFunction(String resourceGroupName, String name, String functionName) { + return getFunctionAsync(resourceGroupName, name, functionName).block(); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @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 function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFunctionWithResponse( + String resourceGroupName, String name, String functionName, Context context) { + return getFunctionWithResponseAsync(resourceGroupName, name, functionName, context).block(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createFunctionWithResponseAsync( + String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 (functionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null.")); + } else { + functionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createFunction( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + functionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createFunctionWithResponseAsync( + String resourceGroupName, + String name, + String functionName, + FunctionEnvelopeInner functionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 (functionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null.")); + } else { + functionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createFunction( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + functionEnvelope, + accept, + context); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FunctionEnvelopeInner> beginCreateFunctionAsync( + String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + Mono>> mono = + createFunctionWithResponseAsync(resourceGroupName, name, functionName, functionEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FunctionEnvelopeInner.class, + FunctionEnvelopeInner.class, + this.client.getContext()); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FunctionEnvelopeInner> beginCreateFunctionAsync( + String resourceGroupName, + String name, + String functionName, + FunctionEnvelopeInner functionEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createFunctionWithResponseAsync(resourceGroupName, name, functionName, functionEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), FunctionEnvelopeInner.class, FunctionEnvelopeInner.class, context); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FunctionEnvelopeInner> beginCreateFunction( + String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + return beginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope).getSyncPoller(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FunctionEnvelopeInner> beginCreateFunction( + String resourceGroupName, + String name, + String functionName, + FunctionEnvelopeInner functionEnvelope, + Context context) { + return beginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope, context) + .getSyncPoller(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createFunctionAsync( + String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + return beginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createFunctionAsync( + String resourceGroupName, + String name, + String functionName, + FunctionEnvelopeInner functionEnvelope, + Context context) { + return beginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionEnvelopeInner createFunction( + String resourceGroupName, String name, String functionName, FunctionEnvelopeInner functionEnvelope) { + return createFunctionAsync(resourceGroupName, name, functionName, functionEnvelope).block(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionEnvelopeInner createFunction( + String resourceGroupName, + String name, + String functionName, + FunctionEnvelopeInner functionEnvelope, + Context context) { + return createFunctionAsync(resourceGroupName, name, functionName, functionEnvelope, context).block(); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteFunctionWithResponseAsync( + String resourceGroupName, String name, String functionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 + .deleteFunction( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteFunctionWithResponseAsync( + String resourceGroupName, String name, String functionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 + .deleteFunction( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteFunctionAsync(String resourceGroupName, String name, String functionName) { + return deleteFunctionWithResponseAsync(resourceGroupName, name, functionName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteFunction(String resourceGroupName, String name, String functionName) { + deleteFunctionAsync(resourceGroupName, name, functionName).block(); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteFunctionWithResponse( + String resourceGroupName, String name, String functionName, Context context) { + return deleteFunctionWithResponseAsync(resourceGroupName, name, functionName, context).block(); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateFunctionSecretWithResponseAsync( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required 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 (key == null) { + return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null.")); + } else { + key.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateFunctionSecret( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + keyName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + key, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateFunctionSecretWithResponseAsync( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required 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 (key == null) { + return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null.")); + } else { + key.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateFunctionSecret( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + keyName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + key, + accept, + context); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateFunctionSecretAsync( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key) { + return createOrUpdateFunctionSecretWithResponseAsync(resourceGroupName, name, functionName, keyName, key) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyInfoInner createOrUpdateFunctionSecret( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key) { + return createOrUpdateFunctionSecretAsync(resourceGroupName, name, functionName, keyName, key).block(); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateFunctionSecretWithResponse( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key, Context context) { + return createOrUpdateFunctionSecretWithResponseAsync( + resourceGroupName, name, functionName, keyName, key, context) + .block(); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteFunctionSecretWithResponseAsync( + String resourceGroupName, String name, String functionName, String keyName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required 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 + .deleteFunctionSecret( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + keyName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteFunctionSecretWithResponseAsync( + String resourceGroupName, String name, String functionName, String keyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required 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 + .deleteFunctionSecret( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + keyName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteFunctionSecretAsync( + String resourceGroupName, String name, String functionName, String keyName) { + return deleteFunctionSecretWithResponseAsync(resourceGroupName, name, functionName, keyName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteFunctionSecret(String resourceGroupName, String name, String functionName, String keyName) { + deleteFunctionSecretAsync(resourceGroupName, name, functionName, keyName).block(); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteFunctionSecretWithResponse( + String resourceGroupName, String name, String functionName, String keyName, Context context) { + return deleteFunctionSecretWithResponseAsync(resourceGroupName, name, functionName, keyName, context).block(); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionKeysWithResponseAsync( + String resourceGroupName, String name, String functionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 + .listFunctionKeys( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionKeysWithResponseAsync( + String resourceGroupName, String name, String functionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 + .listFunctionKeys( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listFunctionKeysAsync( + String resourceGroupName, String name, String functionName) { + return listFunctionKeysWithResponseAsync(resourceGroupName, name, functionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listFunctionKeys(String resourceGroupName, String name, String functionName) { + return listFunctionKeysAsync(resourceGroupName, name, functionName).block(); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listFunctionKeysWithResponse( + String resourceGroupName, String name, String functionName, Context context) { + return listFunctionKeysWithResponseAsync(resourceGroupName, name, functionName, context).block(); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionSecretsWithResponseAsync( + String resourceGroupName, String name, String functionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 + .listFunctionSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionSecretsWithResponseAsync( + String resourceGroupName, String name, String functionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required 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 + .listFunctionSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listFunctionSecretsAsync( + String resourceGroupName, String name, String functionName) { + return listFunctionSecretsWithResponseAsync(resourceGroupName, name, functionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionSecretsInner listFunctionSecrets(String resourceGroupName, String name, String functionName) { + return listFunctionSecretsAsync(resourceGroupName, name, functionName).block(); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listFunctionSecretsWithResponse( + String resourceGroupName, String name, String functionName, Context context) { + return listFunctionSecretsWithResponseAsync(resourceGroupName, name, functionName, context).block(); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostKeysWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHostKeys( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostKeysWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHostKeys( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listHostKeysAsync(String resourceGroupName, String name) { + return listHostKeysWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HostKeysInner listHostKeys(String resourceGroupName, String name) { + return listHostKeysAsync(resourceGroupName, name).block(); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listHostKeysWithResponse(String resourceGroupName, String name, Context context) { + return listHostKeysWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSyncStatusWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSyncStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSyncStatusWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSyncStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSyncStatusAsync(String resourceGroupName, String name) { + return listSyncStatusWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void listSyncStatus(String resourceGroupName, String name) { + listSyncStatusAsync(resourceGroupName, name).block(); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSyncStatusWithResponse(String resourceGroupName, String name, Context context) { + return listSyncStatusWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncFunctionsWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .syncFunctions( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncFunctionsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .syncFunctions( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncFunctionsAsync(String resourceGroupName, String name) { + return syncFunctionsWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void syncFunctions(String resourceGroupName, String name) { + syncFunctionsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response syncFunctionsWithResponse(String resourceGroupName, String name, Context context) { + return syncFunctionsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHostSecretWithResponseAsync( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (keyType == null) { + return Mono.error(new IllegalArgumentException("Parameter keyType is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required 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 (key == null) { + return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null.")); + } else { + key.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateHostSecret( + this.client.getEndpoint(), + resourceGroupName, + name, + keyType, + keyName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + key, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHostSecretWithResponseAsync( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (keyType == null) { + return Mono.error(new IllegalArgumentException("Parameter keyType is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required 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 (key == null) { + return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null.")); + } else { + key.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateHostSecret( + this.client.getEndpoint(), + resourceGroupName, + name, + keyType, + keyName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + key, + accept, + context); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateHostSecretAsync( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key) { + return createOrUpdateHostSecretWithResponseAsync(resourceGroupName, name, keyType, keyName, key) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyInfoInner createOrUpdateHostSecret( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key) { + return createOrUpdateHostSecretAsync(resourceGroupName, name, keyType, keyName, key).block(); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateHostSecretWithResponse( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key, Context context) { + return createOrUpdateHostSecretWithResponseAsync(resourceGroupName, name, keyType, keyName, key, context) + .block(); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHostSecretWithResponseAsync( + String resourceGroupName, String name, String keyType, String keyName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (keyType == null) { + return Mono.error(new IllegalArgumentException("Parameter keyType is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required 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 + .deleteHostSecret( + this.client.getEndpoint(), + resourceGroupName, + name, + keyType, + keyName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHostSecretWithResponseAsync( + String resourceGroupName, String name, String keyType, String keyName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (keyType == null) { + return Mono.error(new IllegalArgumentException("Parameter keyType is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required 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 + .deleteHostSecret( + this.client.getEndpoint(), + resourceGroupName, + name, + keyType, + keyName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteHostSecretAsync(String resourceGroupName, String name, String keyType, String keyName) { + return deleteHostSecretWithResponseAsync(resourceGroupName, name, keyType, keyName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteHostSecret(String resourceGroupName, String name, String keyType, String keyName) { + deleteHostSecretAsync(resourceGroupName, name, keyType, keyName).block(); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteHostSecretWithResponse( + String resourceGroupName, String name, String keyType, String keyName, Context context) { + return deleteHostSecretWithResponseAsync(resourceGroupName, name, keyType, keyName, context).block(); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostnameBindingsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHostnameBindings( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostnameBindingsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHostnameBindings( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHostnameBindingsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listHostnameBindingsSinglePageAsync(resourceGroupName, name), + nextLink -> listHostnameBindingsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHostnameBindingsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listHostnameBindingsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listHostnameBindingsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHostnameBindings(String resourceGroupName, String name) { + return new PagedIterable<>(listHostnameBindingsAsync(resourceGroupName, name)); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHostnameBindings( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listHostnameBindingsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHostnameBindingWithResponseAsync( + String resourceGroupName, String name, String hostname) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 + .getHostnameBinding( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHostnameBindingWithResponseAsync( + String resourceGroupName, String name, String hostname, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 + .getHostnameBinding( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getHostnameBindingAsync(String resourceGroupName, String name, String hostname) { + return getHostnameBindingWithResponseAsync(resourceGroupName, name, hostname) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HostnameBindingInner getHostnameBinding(String resourceGroupName, String name, String hostname) { + return getHostnameBindingAsync(resourceGroupName, name, hostname).block(); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, Context context) { + return getHostnameBindingWithResponseAsync(resourceGroupName, name, hostname, context).block(); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHostnameBindingWithResponseAsync( + String resourceGroupName, String name, String hostname, HostnameBindingInner hostnameBinding) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 (hostnameBinding == null) { + return Mono + .error(new IllegalArgumentException("Parameter hostnameBinding is required and cannot be null.")); + } else { + hostnameBinding.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateHostnameBinding( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + hostnameBinding, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHostnameBindingWithResponseAsync( + String resourceGroupName, String name, String hostname, HostnameBindingInner hostnameBinding, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 (hostnameBinding == null) { + return Mono + .error(new IllegalArgumentException("Parameter hostnameBinding is required and cannot be null.")); + } else { + hostnameBinding.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateHostnameBinding( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + hostnameBinding, + accept, + context); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateHostnameBindingAsync( + String resourceGroupName, String name, String hostname, HostnameBindingInner hostnameBinding) { + return createOrUpdateHostnameBindingWithResponseAsync(resourceGroupName, name, hostname, hostnameBinding) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HostnameBindingInner createOrUpdateHostnameBinding( + String resourceGroupName, String name, String hostname, HostnameBindingInner hostnameBinding) { + return createOrUpdateHostnameBindingAsync(resourceGroupName, name, hostname, hostnameBinding).block(); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, HostnameBindingInner hostnameBinding, Context context) { + return createOrUpdateHostnameBindingWithResponseAsync( + resourceGroupName, name, hostname, hostnameBinding, context) + .block(); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHostnameBindingWithResponseAsync( + String resourceGroupName, String name, String hostname) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 + .deleteHostnameBinding( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHostnameBindingWithResponseAsync( + String resourceGroupName, String name, String hostname, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 + .deleteHostnameBinding( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteHostnameBindingAsync(String resourceGroupName, String name, String hostname) { + return deleteHostnameBindingWithResponseAsync(resourceGroupName, name, hostname) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteHostnameBinding(String resourceGroupName, String name, String hostname) { + deleteHostnameBindingAsync(resourceGroupName, name, hostname).block(); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, Context context) { + return deleteHostnameBindingWithResponseAsync(resourceGroupName, name, hostname, context).block(); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHybridConnectionWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .getHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHybridConnectionWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .getHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getHybridConnectionAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionWithResponseAsync(resourceGroupName, name, namespaceName, relayName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner getHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName) { + return getHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).block(); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return getHybridConnectionWithResponseAsync(resourceGroupName, name, namespaceName, relayName, context).block(); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHybridConnectionWithResponseAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHybridConnectionWithResponseAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateHybridConnectionAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner createOrUpdateHybridConnection( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionAsync( + resourceGroupName, name, namespaceName, relayName, connectionEnvelope) + .block(); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateHybridConnectionWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope, + Context context) { + return createOrUpdateHybridConnectionWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, connectionEnvelope, context) + .block(); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHybridConnectionWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .deleteHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHybridConnectionWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 + .deleteHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteHybridConnectionAsync( + String resourceGroupName, String name, String namespaceName, String relayName) { + return deleteHybridConnectionWithResponseAsync(resourceGroupName, name, namespaceName, relayName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + deleteHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).block(); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return deleteHybridConnectionWithResponseAsync(resourceGroupName, name, namespaceName, relayName, context) + .block(); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateHybridConnectionWithResponseAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateHybridConnectionWithResponseAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateHybridConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateHybridConnectionAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner updateHybridConnection( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope) + .block(); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateHybridConnectionWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + HybridConnectionInner connectionEnvelope, + Context context) { + return updateHybridConnectionWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, connectionEnvelope, context) + .block(); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHybridConnections( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web 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 hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listHybridConnections( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listHybridConnectionsAsync(String resourceGroupName, String name) { + return listHybridConnectionsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner listHybridConnections(String resourceGroupName, String name) { + return listHybridConnectionsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web 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 hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listHybridConnectionsWithResponse( + String resourceGroupName, String name, Context context) { + return listHybridConnectionsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRelayServiceConnectionsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listRelayServiceConnections( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRelayServiceConnectionsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listRelayServiceConnections( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listRelayServiceConnectionsAsync( + String resourceGroupName, String name) { + return listRelayServiceConnectionsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RelayServiceConnectionEntityInner listRelayServiceConnections(String resourceGroupName, String name) { + return listRelayServiceConnectionsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listRelayServiceConnectionsWithResponse( + String resourceGroupName, String name, Context context) { + return listRelayServiceConnectionsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRelayServiceConnectionWithResponseAsync( + String resourceGroupName, String name, String entityName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required 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 + .getRelayServiceConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRelayServiceConnectionWithResponseAsync( + String resourceGroupName, String name, String entityName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required 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 + .getRelayServiceConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getRelayServiceConnectionAsync( + String resourceGroupName, String name, String entityName) { + return getRelayServiceConnectionWithResponseAsync(resourceGroupName, name, entityName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RelayServiceConnectionEntityInner getRelayServiceConnection( + String resourceGroupName, String name, String entityName) { + return getRelayServiceConnectionAsync(resourceGroupName, name, entityName).block(); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRelayServiceConnectionWithResponse( + String resourceGroupName, String name, String entityName, Context context) { + return getRelayServiceConnectionWithResponseAsync(resourceGroupName, name, entityName, context).block(); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateRelayServiceConnectionWithResponseAsync( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateRelayServiceConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateRelayServiceConnectionWithResponseAsync( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateRelayServiceConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateRelayServiceConnectionAsync( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionWithResponseAsync( + resourceGroupName, name, entityName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RelayServiceConnectionEntityInner createOrUpdateRelayServiceConnection( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionAsync(resourceGroupName, name, entityName, connectionEnvelope) + .block(); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateRelayServiceConnectionWithResponse( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + return createOrUpdateRelayServiceConnectionWithResponseAsync( + resourceGroupName, name, entityName, connectionEnvelope, context) + .block(); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteRelayServiceConnectionWithResponseAsync( + String resourceGroupName, String name, String entityName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required 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 + .deleteRelayServiceConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteRelayServiceConnectionWithResponseAsync( + String resourceGroupName, String name, String entityName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required 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 + .deleteRelayServiceConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteRelayServiceConnectionAsync(String resourceGroupName, String name, String entityName) { + return deleteRelayServiceConnectionWithResponseAsync(resourceGroupName, name, entityName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRelayServiceConnection(String resourceGroupName, String name, String entityName) { + deleteRelayServiceConnectionAsync(resourceGroupName, name, entityName).block(); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRelayServiceConnectionWithResponse( + String resourceGroupName, String name, String entityName, Context context) { + return deleteRelayServiceConnectionWithResponseAsync(resourceGroupName, name, entityName, context).block(); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateRelayServiceConnectionWithResponseAsync( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateRelayServiceConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateRelayServiceConnectionWithResponseAsync( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateRelayServiceConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateRelayServiceConnectionAsync( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionWithResponseAsync(resourceGroupName, name, entityName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RelayServiceConnectionEntityInner updateRelayServiceConnection( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionAsync(resourceGroupName, name, entityName, connectionEnvelope).block(); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateRelayServiceConnectionWithResponse( + String resourceGroupName, + String name, + String entityName, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + return updateRelayServiceConnectionWithResponseAsync( + resourceGroupName, name, entityName, connectionEnvelope, context) + .block(); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceIdentifiersSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listInstanceIdentifiers( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceIdentifiersSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listInstanceIdentifiers( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceIdentifiersAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listInstanceIdentifiersSinglePageAsync(resourceGroupName, name), + nextLink -> listInstanceIdentifiersNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceIdentifiersAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listInstanceIdentifiersSinglePageAsync(resourceGroupName, name, context), + nextLink -> listInstanceIdentifiersNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceIdentifiers(String resourceGroupName, String name) { + return new PagedIterable<>(listInstanceIdentifiersAsync(resourceGroupName, name)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceIdentifiers( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listInstanceIdentifiersAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceInfoWithResponseAsync( + String resourceGroupName, String name, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceInfo( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceInfoWithResponseAsync( + String resourceGroupName, String name, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceInfo( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceInfoAsync( + String resourceGroupName, String name, String instanceId) { + return getInstanceInfoWithResponseAsync(resourceGroupName, name, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebSiteInstanceStatusInner getInstanceInfo(String resourceGroupName, String name, String instanceId) { + return getInstanceInfoAsync(resourceGroupName, name, instanceId).block(); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceInfoWithResponse( + String resourceGroupName, String name, String instanceId, Context context) { + return getInstanceInfoWithResponseAsync(resourceGroupName, name, instanceId, context).block(); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceMsDeployStatusWithResponseAsync( + String resourceGroupName, String name, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceMsDeployStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceMsDeployStatusWithResponseAsync( + String resourceGroupName, String name, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceMsDeployStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceMsDeployStatusAsync( + String resourceGroupName, String name, String instanceId) { + return getInstanceMsDeployStatusWithResponseAsync(resourceGroupName, name, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner getInstanceMsDeployStatus(String resourceGroupName, String name, String instanceId) { + return getInstanceMsDeployStatusAsync(resourceGroupName, name, instanceId).block(); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceMsDeployStatusWithResponse( + String resourceGroupName, String name, String instanceId, Context context) { + return getInstanceMsDeployStatusWithResponseAsync(resourceGroupName, name, instanceId, context).block(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createInstanceMSDeployOperationWithResponseAsync( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 (mSDeploy == null) { + return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); + } else { + mSDeploy.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createInstanceMSDeployOperation( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + mSDeploy, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createInstanceMSDeployOperationWithResponseAsync( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 (mSDeploy == null) { + return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); + } else { + mSDeploy.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createInstanceMSDeployOperation( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + mSDeploy, + accept, + context); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MSDeployStatusInner> beginCreateInstanceMSDeployOperationAsync( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { + Mono>> mono = + createInstanceMSDeployOperationWithResponseAsync(resourceGroupName, name, instanceId, mSDeploy); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MSDeployStatusInner.class, + MSDeployStatusInner.class, + this.client.getContext()); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MSDeployStatusInner> beginCreateInstanceMSDeployOperationAsync( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createInstanceMSDeployOperationWithResponseAsync(resourceGroupName, name, instanceId, mSDeploy, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class, context); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { + return beginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy).getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { + return beginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy, context) + .getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createInstanceMSDeployOperationAsync( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { + return beginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createInstanceMSDeployOperationAsync( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { + return beginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { + return createInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy).block(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { + return createInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy, context).block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceMSDeployLogWithResponseAsync( + String resourceGroupName, String name, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceMSDeployLog( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceMSDeployLogWithResponseAsync( + String resourceGroupName, String name, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceMSDeployLog( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceMSDeployLogAsync( + String resourceGroupName, String name, String instanceId) { + return getInstanceMSDeployLogWithResponseAsync(resourceGroupName, name, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployLogInner getInstanceMSDeployLog(String resourceGroupName, String name, String instanceId) { + return getInstanceMSDeployLogAsync(resourceGroupName, name, instanceId).block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceMSDeployLogWithResponse( + String resourceGroupName, String name, String instanceId, Context context) { + return getInstanceMSDeployLogWithResponseAsync(resourceGroupName, name, instanceId, context).block(); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessesSinglePageAsync( + String resourceGroupName, String name, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcesses( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + 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())); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessesSinglePageAsync( + String resourceGroupName, String name, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcesses( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + 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)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessesAsync( + String resourceGroupName, String name, String instanceId) { + return new PagedFlux<>( + () -> listInstanceProcessesSinglePageAsync(resourceGroupName, name, instanceId), + nextLink -> listInstanceProcessesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessesAsync( + String resourceGroupName, String name, String instanceId, Context context) { + return new PagedFlux<>( + () -> listInstanceProcessesSinglePageAsync(resourceGroupName, name, instanceId, context), + nextLink -> listInstanceProcessesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcesses( + String resourceGroupName, String name, String instanceId) { + return new PagedIterable<>(listInstanceProcessesAsync(resourceGroupName, name, instanceId)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcesses( + String resourceGroupName, String name, String instanceId, Context context) { + return new PagedIterable<>(listInstanceProcessesAsync(resourceGroupName, name, instanceId, context)); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceProcessWithResponseAsync( + String resourceGroupName, String name, String processId, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcess( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceProcessWithResponseAsync( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcess( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceProcessAsync( + String resourceGroupName, String name, String processId, String instanceId) { + return getInstanceProcessWithResponseAsync(resourceGroupName, name, processId, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProcessInfoInner getInstanceProcess( + String resourceGroupName, String name, String processId, String instanceId) { + return getInstanceProcessAsync(resourceGroupName, name, processId, instanceId).block(); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceProcessWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return getInstanceProcessWithResponseAsync(resourceGroupName, name, processId, instanceId, context).block(); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteInstanceProcessWithResponseAsync( + String resourceGroupName, String name, String processId, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .deleteInstanceProcess( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteInstanceProcessWithResponseAsync( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .deleteInstanceProcess( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteInstanceProcessAsync( + String resourceGroupName, String name, String processId, String instanceId) { + return deleteInstanceProcessWithResponseAsync(resourceGroupName, name, processId, instanceId) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteInstanceProcess(String resourceGroupName, String name, String processId, String instanceId) { + deleteInstanceProcessAsync(resourceGroupName, name, processId, instanceId).block(); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteInstanceProcessWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return deleteInstanceProcessWithResponseAsync(resourceGroupName, name, processId, instanceId, context).block(); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceProcessDumpWithResponseAsync( + String resourceGroupName, String name, String processId, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessDump( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceProcessDumpWithResponseAsync( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessDump( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux getInstanceProcessDumpAsync( + String resourceGroupName, String name, String processId, String instanceId) { + return getInstanceProcessDumpWithResponseAsync(resourceGroupName, name, processId, instanceId) + .flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream getInstanceProcessDump( + String resourceGroupName, String name, String processId, String instanceId) { + Iterator iterator = + getInstanceProcessDumpAsync(resourceGroupName, name, processId, instanceId) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse getInstanceProcessDumpWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return getInstanceProcessDumpWithResponseAsync(resourceGroupName, name, processId, instanceId, context).block(); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessModulesSinglePageAsync( + String resourceGroupName, String name, String processId, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessModules( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + 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())); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessModulesSinglePageAsync( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessModules( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + 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)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessModulesAsync( + String resourceGroupName, String name, String processId, String instanceId) { + return new PagedFlux<>( + () -> listInstanceProcessModulesSinglePageAsync(resourceGroupName, name, processId, instanceId), + nextLink -> listInstanceProcessModulesNextSinglePageAsync(nextLink)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessModulesAsync( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return new PagedFlux<>( + () -> listInstanceProcessModulesSinglePageAsync(resourceGroupName, name, processId, instanceId, context), + nextLink -> listInstanceProcessModulesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessModules( + String resourceGroupName, String name, String processId, String instanceId) { + return new PagedIterable<>(listInstanceProcessModulesAsync(resourceGroupName, name, processId, instanceId)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessModules( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return new PagedIterable<>( + listInstanceProcessModulesAsync(resourceGroupName, name, processId, instanceId, context)); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceProcessModuleWithResponseAsync( + String resourceGroupName, String name, String processId, String baseAddress, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (baseAddress == null) { + return Mono.error(new IllegalArgumentException("Parameter baseAddress is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessModule( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + baseAddress, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceProcessModuleWithResponseAsync( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String instanceId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (baseAddress == null) { + return Mono.error(new IllegalArgumentException("Parameter baseAddress is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessModule( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + baseAddress, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceProcessModuleAsync( + String resourceGroupName, String name, String processId, String baseAddress, String instanceId) { + return getInstanceProcessModuleWithResponseAsync(resourceGroupName, name, processId, baseAddress, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProcessModuleInfoInner getInstanceProcessModule( + String resourceGroupName, String name, String processId, String baseAddress, String instanceId) { + return getInstanceProcessModuleAsync(resourceGroupName, name, processId, baseAddress, instanceId).block(); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceProcessModuleWithResponse( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String instanceId, + Context context) { + return getInstanceProcessModuleWithResponseAsync( + resourceGroupName, name, processId, baseAddress, instanceId, context) + .block(); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessThreadsSinglePageAsync( + String resourceGroupName, String name, String processId, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessThreads( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + 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())); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessThreadsSinglePageAsync( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessThreads( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + instanceId, + 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)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessThreadsAsync( + String resourceGroupName, String name, String processId, String instanceId) { + return new PagedFlux<>( + () -> listInstanceProcessThreadsSinglePageAsync(resourceGroupName, name, processId, instanceId), + nextLink -> listInstanceProcessThreadsNextSinglePageAsync(nextLink)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessThreadsAsync( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return new PagedFlux<>( + () -> listInstanceProcessThreadsSinglePageAsync(resourceGroupName, name, processId, instanceId, context), + nextLink -> listInstanceProcessThreadsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessThreads( + String resourceGroupName, String name, String processId, String instanceId) { + return new PagedIterable<>(listInstanceProcessThreadsAsync(resourceGroupName, name, processId, instanceId)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessThreads( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return new PagedIterable<>( + listInstanceProcessThreadsAsync(resourceGroupName, name, processId, instanceId, context)); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> isCloneableWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .isCloneable( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> isCloneableWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .isCloneable( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono isCloneableAsync(String resourceGroupName, String name) { + return isCloneableWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteCloneabilityInner isCloneable(String resourceGroupName, String name) { + return isCloneableAsync(resourceGroupName, name).block(); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response isCloneableWithResponse( + String resourceGroupName, String name, Context context) { + return isCloneableWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteBackupsSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSiteBackups( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteBackupsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSiteBackups( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteBackupsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listSiteBackupsSinglePageAsync(resourceGroupName, name), + nextLink -> listSiteBackupsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteBackupsAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listSiteBackupsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listSiteBackupsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteBackups(String resourceGroupName, String name) { + return new PagedIterable<>(listSiteBackupsAsync(resourceGroupName, name)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteBackups(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listSiteBackupsAsync(resourceGroupName, name, context)); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSyncFunctionTriggersWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSyncFunctionTriggers( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSyncFunctionTriggersWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSyncFunctionTriggers( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSyncFunctionTriggersAsync(String resourceGroupName, String name) { + return listSyncFunctionTriggersWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionSecretsInner listSyncFunctionTriggers(String resourceGroupName, String name) { + return listSyncFunctionTriggersAsync(resourceGroupName, name).block(); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSyncFunctionTriggersWithResponse( + String resourceGroupName, String name, Context context) { + return listSyncFunctionTriggersWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> migrateStorageWithResponseAsync( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (subscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter subscriptionName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (migrationOptions == null) { + return Mono + .error(new IllegalArgumentException("Parameter migrationOptions is required and cannot be null.")); + } else { + migrationOptions.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .migrateStorage( + this.client.getEndpoint(), + subscriptionName, + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + migrationOptions, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> migrateStorageWithResponseAsync( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (subscriptionName == null) { + return Mono + .error(new IllegalArgumentException("Parameter subscriptionName is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (migrationOptions == null) { + return Mono + .error(new IllegalArgumentException("Parameter migrationOptions is required and cannot be null.")); + } else { + migrationOptions.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .migrateStorage( + this.client.getEndpoint(), + subscriptionName, + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + migrationOptions, + accept, + context); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StorageMigrationResponseInner> + beginMigrateStorageAsync( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { + Mono>> mono = + migrateStorageWithResponseAsync(subscriptionName, resourceGroupName, name, migrationOptions); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + StorageMigrationResponseInner.class, + StorageMigrationResponseInner.class, + this.client.getContext()); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, StorageMigrationResponseInner> + beginMigrateStorageAsync( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + migrateStorageWithResponseAsync(subscriptionName, resourceGroupName, name, migrationOptions, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + StorageMigrationResponseInner.class, + StorageMigrationResponseInner.class, + context); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StorageMigrationResponseInner> beginMigrateStorage( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { + return beginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions).getSyncPoller(); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, StorageMigrationResponseInner> beginMigrateStorage( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context) { + return beginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions, context) + .getSyncPoller(); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono migrateStorageAsync( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { + return beginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono migrateStorageAsync( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context) { + return beginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StorageMigrationResponseInner migrateStorage( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { + return migrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions).block(); + } + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StorageMigrationResponseInner migrateStorage( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context) { + return migrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions, context).block(); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> migrateMySqlWithResponseAsync( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (migrationRequestEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter migrationRequestEnvelope is required and cannot be null.")); + } else { + migrationRequestEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .migrateMySql( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + migrationRequestEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> migrateMySqlWithResponseAsync( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (migrationRequestEnvelope == null) { + return Mono + .error( + new IllegalArgumentException("Parameter migrationRequestEnvelope is required and cannot be null.")); + } else { + migrationRequestEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .migrateMySql( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + migrationRequestEnvelope, + accept, + context); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationInner> beginMigrateMySqlAsync( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { + Mono>> mono = + migrateMySqlWithResponseAsync(resourceGroupName, name, migrationRequestEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + OperationInner.class, + OperationInner.class, + this.client.getContext()); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationInner> beginMigrateMySqlAsync( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + migrateMySqlWithResponseAsync(resourceGroupName, name, migrationRequestEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), OperationInner.class, OperationInner.class, context); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationInner> beginMigrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { + return beginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope).getSyncPoller(); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationInner> beginMigrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { + return beginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope, context).getSyncPoller(); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono migrateMySqlAsync( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { + return beginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono migrateMySqlAsync( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { + return beginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationInner migrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { + return migrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope).block(); + } + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 operation on a resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationInner migrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { + return migrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope, context).block(); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMigrateMySqlStatusWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getMigrateMySqlStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMigrateMySqlStatusWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getMigrateMySqlStatus( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMigrateMySqlStatusAsync(String resourceGroupName, String name) { + return getMigrateMySqlStatusWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MigrateMySqlStatusInner getMigrateMySqlStatus(String resourceGroupName, String name) { + return getMigrateMySqlStatusAsync(resourceGroupName, name).block(); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMigrateMySqlStatusWithResponse( + String resourceGroupName, String name, Context context) { + return getMigrateMySqlStatusWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSwiftVirtualNetworkConnectionWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getSwiftVirtualNetworkConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSwiftVirtualNetworkConnectionWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getSwiftVirtualNetworkConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSwiftVirtualNetworkConnectionAsync( + String resourceGroupName, String name) { + return getSwiftVirtualNetworkConnectionWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SwiftVirtualNetworkInner getSwiftVirtualNetworkConnection(String resourceGroupName, String name) { + return getSwiftVirtualNetworkConnectionAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSwiftVirtualNetworkConnectionWithResponse( + String resourceGroupName, String name, Context context) { + return getSwiftVirtualNetworkConnectionWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponseAsync( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateSwiftVirtualNetworkConnectionWithCheck( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponseAsync( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateSwiftVirtualNetworkConnectionWithCheck( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateSwiftVirtualNetworkConnectionWithCheckAsync( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + return createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponseAsync( + resourceGroupName, name, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SwiftVirtualNetworkInner createOrUpdateSwiftVirtualNetworkConnectionWithCheck( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + return createOrUpdateSwiftVirtualNetworkConnectionWithCheckAsync(resourceGroupName, name, connectionEnvelope) + .block(); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponse( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context) { + return createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponseAsync( + resourceGroupName, name, connectionEnvelope, context) + .block(); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSwiftVirtualNetworkWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteSwiftVirtualNetwork( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSwiftVirtualNetworkWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteSwiftVirtualNetwork( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSwiftVirtualNetworkAsync(String resourceGroupName, String name) { + return deleteSwiftVirtualNetworkWithResponseAsync(resourceGroupName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSwiftVirtualNetwork(String resourceGroupName, String name) { + deleteSwiftVirtualNetworkAsync(resourceGroupName, name).block(); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSwiftVirtualNetworkWithResponse( + String resourceGroupName, String name, Context context) { + return deleteSwiftVirtualNetworkWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSwiftVirtualNetworkConnectionWithCheckWithResponseAsync( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSwiftVirtualNetworkConnectionWithCheck( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSwiftVirtualNetworkConnectionWithCheckWithResponseAsync( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSwiftVirtualNetworkConnectionWithCheck( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSwiftVirtualNetworkConnectionWithCheckAsync( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + return updateSwiftVirtualNetworkConnectionWithCheckWithResponseAsync( + resourceGroupName, name, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SwiftVirtualNetworkInner updateSwiftVirtualNetworkConnectionWithCheck( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + return updateSwiftVirtualNetworkConnectionWithCheckAsync(resourceGroupName, name, connectionEnvelope).block(); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSwiftVirtualNetworkConnectionWithCheckWithResponse( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context) { + return updateSwiftVirtualNetworkConnectionWithCheckWithResponseAsync( + resourceGroupName, name, connectionEnvelope, context) + .block(); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNetworkFeaturesWithResponseAsync( + String resourceGroupName, String name, String view) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (view == null) { + return Mono.error(new IllegalArgumentException("Parameter view is required 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 + .listNetworkFeatures( + this.client.getEndpoint(), + resourceGroupName, + name, + view, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNetworkFeaturesWithResponseAsync( + String resourceGroupName, String name, String view, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (view == null) { + return Mono.error(new IllegalArgumentException("Parameter view is required 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 + .listNetworkFeatures( + this.client.getEndpoint(), + resourceGroupName, + name, + view, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listNetworkFeaturesAsync(String resourceGroupName, String name, String view) { + return listNetworkFeaturesWithResponseAsync(resourceGroupName, name, view) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFeaturesInner listNetworkFeatures(String resourceGroupName, String name, String view) { + return listNetworkFeaturesAsync(resourceGroupName, name, view).block(); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listNetworkFeaturesWithResponse( + String resourceGroupName, String name, String view, Context context) { + return listNetworkFeaturesWithResponseAsync(resourceGroupName, name, view, context).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTraceOperationWithResponseAsync( + String resourceGroupName, String name, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getNetworkTraceOperation( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTraceOperationWithResponseAsync( + String resourceGroupName, String name, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getNetworkTraceOperation( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getNetworkTraceOperationAsync(String resourceGroupName, String name, String operationId) { + return getNetworkTraceOperationWithResponseAsync(resourceGroupName, name, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object getNetworkTraceOperation(String resourceGroupName, String name, String operationId) { + return getNetworkTraceOperationAsync(resourceGroupName, name, operationId).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getNetworkTraceOperationWithResponse( + String resourceGroupName, String name, String operationId, Context context) { + return getNetworkTraceOperationWithResponseAsync(resourceGroupName, name, operationId, context).block(); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startWebSiteNetworkTraceWithResponseAsync( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .startWebSiteNetworkTrace( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startWebSiteNetworkTraceWithResponseAsync( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .startWebSiteNetworkTrace( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceAsync( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceWithResponseAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return startWebSiteNetworkTraceWithResponseAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String startWebSiteNetworkTrace(String resourceGroupName, String name) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return startWebSiteNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .block(); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startWebSiteNetworkTraceWithResponse( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return startWebSiteNetworkTraceWithResponseAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWebSiteNetworkTraceOperationWithResponseAsync( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .startWebSiteNetworkTraceOperation( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWebSiteNetworkTraceOperationWithResponseAsync( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .startWebSiteNetworkTraceOperation( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginStartWebSiteNetworkTraceOperationAsync( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + Mono>> mono = + startWebSiteNetworkTraceOperationWithResponseAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Object.class, Object.class, this.client.getContext()); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginStartWebSiteNetworkTraceOperationAsync( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + startWebSiteNetworkTraceOperationWithResponseAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Object.class, Object.class, context); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginStartWebSiteNetworkTraceOperation( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginStartWebSiteNetworkTraceOperation( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceOperationAsync( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceOperationAsync(String resourceGroupName, String name) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceOperationAsync( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startWebSiteNetworkTraceOperation( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startWebSiteNetworkTraceOperation(String resourceGroupName, String name) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return startWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startWebSiteNetworkTraceOperation( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return startWebSiteNetworkTraceOperationAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .block(); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWebSiteNetworkTraceWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .stopWebSiteNetworkTrace( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWebSiteNetworkTraceWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .stopWebSiteNetworkTrace( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopWebSiteNetworkTraceAsync(String resourceGroupName, String name) { + return stopWebSiteNetworkTraceWithResponseAsync(resourceGroupName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopWebSiteNetworkTrace(String resourceGroupName, String name) { + stopWebSiteNetworkTraceAsync(resourceGroupName, name).block(); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopWebSiteNetworkTraceWithResponse(String resourceGroupName, String name, Context context) { + return stopWebSiteNetworkTraceWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getNetworkTracesWithResponseAsync( + String resourceGroupName, String name, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getNetworkTraces( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getNetworkTracesWithResponseAsync( + String resourceGroupName, String name, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getNetworkTraces( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTracesAsync( + String resourceGroupName, String name, String operationId) { + return getNetworkTracesWithResponseAsync(resourceGroupName, name, operationId) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List getNetworkTraces(String resourceGroupName, String name, String operationId) { + return getNetworkTracesAsync(resourceGroupName, name, operationId).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> getNetworkTracesWithResponse( + String resourceGroupName, String name, String operationId, Context context) { + return getNetworkTracesWithResponseAsync(resourceGroupName, name, operationId, context).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTraceOperationV2WithResponseAsync( + String resourceGroupName, String name, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getNetworkTraceOperationV2( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTraceOperationV2WithResponseAsync( + String resourceGroupName, String name, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getNetworkTraceOperationV2( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getNetworkTraceOperationV2Async(String resourceGroupName, String name, String operationId) { + return getNetworkTraceOperationV2WithResponseAsync(resourceGroupName, name, operationId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object getNetworkTraceOperationV2(String resourceGroupName, String name, String operationId) { + return getNetworkTraceOperationV2Async(resourceGroupName, name, operationId).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getNetworkTraceOperationV2WithResponse( + String resourceGroupName, String name, String operationId, Context context) { + return getNetworkTraceOperationV2WithResponseAsync(resourceGroupName, name, operationId, context).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getNetworkTracesV2WithResponseAsync( + String resourceGroupName, String name, String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getNetworkTracesV2( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getNetworkTracesV2WithResponseAsync( + String resourceGroupName, String name, String operationId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required 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 + .getNetworkTracesV2( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTracesV2Async( + String resourceGroupName, String name, String operationId) { + return getNetworkTracesV2WithResponseAsync(resourceGroupName, name, operationId) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List getNetworkTracesV2(String resourceGroupName, String name, String operationId) { + return getNetworkTracesV2Async(resourceGroupName, name, operationId).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of 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 array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> getNetworkTracesV2WithResponse( + String resourceGroupName, String name, String operationId, Context context) { + return getNetworkTracesV2WithResponseAsync(resourceGroupName, name, operationId, context).block(); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateNewSitePublishingPasswordWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .generateNewSitePublishingPassword( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateNewSitePublishingPasswordWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .generateNewSitePublishingPassword( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateNewSitePublishingPasswordAsync(String resourceGroupName, String name) { + return generateNewSitePublishingPasswordWithResponseAsync(resourceGroupName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void generateNewSitePublishingPassword(String resourceGroupName, String name) { + generateNewSitePublishingPasswordAsync(resourceGroupName, name).block(); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateNewSitePublishingPasswordWithResponse( + String resourceGroupName, String name, Context context) { + return generateNewSitePublishingPasswordWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPerfMonCountersSinglePageAsync( + String resourceGroupName, String name, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listPerfMonCounters( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPerfMonCountersSinglePageAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listPerfMonCounters( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPerfMonCountersAsync( + String resourceGroupName, String name, String filter) { + return new PagedFlux<>( + () -> listPerfMonCountersSinglePageAsync(resourceGroupName, name, filter), + nextLink -> listPerfMonCountersNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPerfMonCountersAsync(String resourceGroupName, String name) { + final String filter = null; + return new PagedFlux<>( + () -> listPerfMonCountersSinglePageAsync(resourceGroupName, name, filter), + nextLink -> listPerfMonCountersNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPerfMonCountersAsync( + String resourceGroupName, String name, String filter, Context context) { + return new PagedFlux<>( + () -> listPerfMonCountersSinglePageAsync(resourceGroupName, name, filter, context), + nextLink -> listPerfMonCountersNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPerfMonCounters(String resourceGroupName, String name) { + final String filter = null; + return new PagedIterable<>(listPerfMonCountersAsync(resourceGroupName, name, filter)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPerfMonCounters( + String resourceGroupName, String name, String filter, Context context) { + return new PagedIterable<>(listPerfMonCountersAsync(resourceGroupName, name, filter, context)); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSitePhpErrorLogFlagWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getSitePhpErrorLogFlag( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSitePhpErrorLogFlagWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getSitePhpErrorLogFlag( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSitePhpErrorLogFlagAsync(String resourceGroupName, String name) { + return getSitePhpErrorLogFlagWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SitePhpErrorLogFlagInner getSitePhpErrorLogFlag(String resourceGroupName, String name) { + return getSitePhpErrorLogFlagAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSitePhpErrorLogFlagWithResponse( + String resourceGroupName, String name, Context context) { + return getSitePhpErrorLogFlagWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPremierAddOnsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listPremierAddOns( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPremierAddOnsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listPremierAddOns( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPremierAddOnsAsync(String resourceGroupName, String name) { + return listPremierAddOnsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PremierAddOnInner listPremierAddOns(String resourceGroupName, String name) { + return listPremierAddOnsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listPremierAddOnsWithResponse( + String resourceGroupName, String name, Context context) { + return listPremierAddOnsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPremierAddOnWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required 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 + .getPremierAddOn( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPremierAddOnWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required 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 + .getPremierAddOn( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPremierAddOnAsync( + String resourceGroupName, String name, String premierAddOnName) { + return getPremierAddOnWithResponseAsync(resourceGroupName, name, premierAddOnName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PremierAddOnInner getPremierAddOn(String resourceGroupName, String name, String premierAddOnName) { + return getPremierAddOnAsync(resourceGroupName, name, premierAddOnName).block(); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPremierAddOnWithResponse( + String resourceGroupName, String name, String premierAddOnName, Context context) { + return getPremierAddOnWithResponseAsync(resourceGroupName, name, premierAddOnName, context).block(); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addPremierAddOnWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, PremierAddOnInner premierAddOn) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required 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 (premierAddOn == null) { + return Mono.error(new IllegalArgumentException("Parameter premierAddOn is required and cannot be null.")); + } else { + premierAddOn.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .addPremierAddOn( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + premierAddOn, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addPremierAddOnWithResponseAsync( + String resourceGroupName, + String name, + String premierAddOnName, + PremierAddOnInner premierAddOn, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required 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 (premierAddOn == null) { + return Mono.error(new IllegalArgumentException("Parameter premierAddOn is required and cannot be null.")); + } else { + premierAddOn.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .addPremierAddOn( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + premierAddOn, + accept, + context); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addPremierAddOnAsync( + String resourceGroupName, String name, String premierAddOnName, PremierAddOnInner premierAddOn) { + return addPremierAddOnWithResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PremierAddOnInner addPremierAddOn( + String resourceGroupName, String name, String premierAddOnName, PremierAddOnInner premierAddOn) { + return addPremierAddOnAsync(resourceGroupName, name, premierAddOnName, premierAddOn).block(); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response addPremierAddOnWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + PremierAddOnInner premierAddOn, + Context context) { + return addPremierAddOnWithResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn, context) + .block(); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deletePremierAddOnWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required 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 + .deletePremierAddOn( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deletePremierAddOnWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required 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 + .deletePremierAddOn( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePremierAddOnAsync(String resourceGroupName, String name, String premierAddOnName) { + return deletePremierAddOnWithResponseAsync(resourceGroupName, name, premierAddOnName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePremierAddOn(String resourceGroupName, String name, String premierAddOnName) { + deletePremierAddOnAsync(resourceGroupName, name, premierAddOnName).block(); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deletePremierAddOnWithResponse( + String resourceGroupName, String name, String premierAddOnName, Context context) { + return deletePremierAddOnWithResponseAsync(resourceGroupName, name, premierAddOnName, context).block(); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updatePremierAddOnWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, PremierAddOnPatchResource premierAddOn) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required 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 (premierAddOn == null) { + return Mono.error(new IllegalArgumentException("Parameter premierAddOn is required and cannot be null.")); + } else { + premierAddOn.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updatePremierAddOn( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + premierAddOn, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updatePremierAddOnWithResponseAsync( + String resourceGroupName, + String name, + String premierAddOnName, + PremierAddOnPatchResource premierAddOn, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required 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 (premierAddOn == null) { + return Mono.error(new IllegalArgumentException("Parameter premierAddOn is required and cannot be null.")); + } else { + premierAddOn.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updatePremierAddOn( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + premierAddOn, + accept, + context); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updatePremierAddOnAsync( + String resourceGroupName, String name, String premierAddOnName, PremierAddOnPatchResource premierAddOn) { + return updatePremierAddOnWithResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PremierAddOnInner updatePremierAddOn( + String resourceGroupName, String name, String premierAddOnName, PremierAddOnPatchResource premierAddOn) { + return updatePremierAddOnAsync(resourceGroupName, name, premierAddOnName, premierAddOn).block(); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updatePremierAddOnWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + PremierAddOnPatchResource premierAddOn, + Context context) { + return updatePremierAddOnWithResponseAsync(resourceGroupName, name, premierAddOnName, premierAddOn, context) + .block(); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateAccessWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateAccess( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web 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 description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateAccessWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateAccess( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateAccessAsync(String resourceGroupName, String name) { + return getPrivateAccessWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner getPrivateAccess(String resourceGroupName, String name) { + return getPrivateAccessAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web 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 description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateAccessWithResponse( + String resourceGroupName, String name, Context context) { + return getPrivateAccessWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putPrivateAccessVnetWithResponseAsync( + String resourceGroupName, String name, PrivateAccessInner access) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (access == null) { + return Mono.error(new IllegalArgumentException("Parameter access is required and cannot be null.")); + } else { + access.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .putPrivateAccessVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + access, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putPrivateAccessVnetWithResponseAsync( + String resourceGroupName, String name, PrivateAccessInner access, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (access == null) { + return Mono.error(new IllegalArgumentException("Parameter access is required and cannot be null.")); + } else { + access.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .putPrivateAccessVnet( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + access, + accept, + context); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono putPrivateAccessVnetAsync( + String resourceGroupName, String name, PrivateAccessInner access) { + return putPrivateAccessVnetWithResponseAsync(resourceGroupName, name, access) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner putPrivateAccessVnet(String resourceGroupName, String name, PrivateAccessInner access) { + return putPrivateAccessVnetAsync(resourceGroupName, name, access).block(); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putPrivateAccessVnetWithResponse( + String resourceGroupName, String name, PrivateAccessInner access, Context context) { + return putPrivateAccessVnetWithResponseAsync(resourceGroupName, name, access, context).block(); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateEndpointConnectionList( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSinglePageAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateEndpointConnectionList( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getPrivateEndpointConnectionListAsync( + String resourceGroupName, String name) { + return new PagedFlux<>( + () -> getPrivateEndpointConnectionListSinglePageAsync(resourceGroupName, name), + nextLink -> getPrivateEndpointConnectionListNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getPrivateEndpointConnectionListAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> getPrivateEndpointConnectionListSinglePageAsync(resourceGroupName, name, context), + nextLink -> getPrivateEndpointConnectionListNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name) { + return new PagedIterable<>(getPrivateEndpointConnectionListAsync(resourceGroupName, name)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(getPrivateEndpointConnectionListAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .getPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .getPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return getPrivateEndpointConnectionWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return getPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).block(); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return getPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .block(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveOrRejectPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 (privateEndpointWrapper == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); + } else { + privateEndpointWrapper.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .approveOrRejectPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + privateEndpointWrapper, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveOrRejectPrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 (privateEndpointWrapper == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); + } else { + privateEndpointWrapper.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .approveOrRejectPrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + privateEndpointWrapper, + accept, + context); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + Mono>> mono = + approveOrRejectPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + RemotePrivateEndpointConnectionArmResourceInner.class, + RemotePrivateEndpointConnectionArmResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + approveOrRejectPrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + RemotePrivateEndpointConnectionArmResourceInner.class, + RemotePrivateEndpointConnectionArmResourceInner.class, + context); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveOrRejectPrivateEndpointConnectionAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return approveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper) + .block(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return approveOrRejectPrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context) + .block(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .deletePrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePrivateEndpointConnectionWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required 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 + .deletePrivateEndpointConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginDeletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + Mono>> mono = + deletePrivateEndpointConnectionWithResponseAsync(resourceGroupName, name, privateEndpointConnectionName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Object.class, Object.class, this.client.getContext()); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginDeletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deletePrivateEndpointConnectionWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Object.class, Object.class, context); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginDeletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return beginDeletePrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return beginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePrivateEndpointConnectionAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return beginDeletePrivateEndpointConnectionAsync( + resourceGroupName, name, privateEndpointConnectionName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return deletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).block(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return deletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, context) + .block(); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourcesWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateLinkResources( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourcesWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getPrivateLinkResources( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateLinkResourcesAsync(String resourceGroupName, String name) { + return getPrivateLinkResourcesWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourcesWrapperInner getPrivateLinkResources(String resourceGroupName, String name) { + return getPrivateLinkResourcesAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context) { + return getPrivateLinkResourcesWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessesSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listProcesses( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessesSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listProcesses( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessesAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listProcessesSinglePageAsync(resourceGroupName, name), + nextLink -> listProcessesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessesAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listProcessesSinglePageAsync(resourceGroupName, name, context), + nextLink -> listProcessesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcesses(String resourceGroupName, String name) { + return new PagedIterable<>(listProcessesAsync(resourceGroupName, name)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcesses(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listProcessesAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getProcessWithResponseAsync( + String resourceGroupName, String name, String processId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .getProcess( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getProcessWithResponseAsync( + String resourceGroupName, String name, String processId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .getProcess( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getProcessAsync(String resourceGroupName, String name, String processId) { + return getProcessWithResponseAsync(resourceGroupName, name, processId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProcessInfoInner getProcess(String resourceGroupName, String name, String processId) { + return getProcessAsync(resourceGroupName, name, processId).block(); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getProcessWithResponse( + String resourceGroupName, String name, String processId, Context context) { + return getProcessWithResponseAsync(resourceGroupName, name, processId, context).block(); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteProcessWithResponseAsync( + String resourceGroupName, String name, String processId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .deleteProcess( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteProcessWithResponseAsync( + String resourceGroupName, String name, String processId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .deleteProcess( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteProcessAsync(String resourceGroupName, String name, String processId) { + return deleteProcessWithResponseAsync(resourceGroupName, name, processId) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteProcess(String resourceGroupName, String name, String processId) { + deleteProcessAsync(resourceGroupName, name, processId).block(); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteProcessWithResponse( + String resourceGroupName, String name, String processId, Context context) { + return deleteProcessWithResponseAsync(resourceGroupName, name, processId, context).block(); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getProcessDumpWithResponseAsync( + String resourceGroupName, String name, String processId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .getProcessDump( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getProcessDumpWithResponseAsync( + String resourceGroupName, String name, String processId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .getProcessDump( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux getProcessDumpAsync(String resourceGroupName, String name, String processId) { + return getProcessDumpWithResponseAsync(resourceGroupName, name, processId) + .flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream getProcessDump(String resourceGroupName, String name, String processId) { + Iterator iterator = + getProcessDumpAsync(resourceGroupName, name, processId) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse getProcessDumpWithResponse( + String resourceGroupName, String name, String processId, Context context) { + return getProcessDumpWithResponseAsync(resourceGroupName, name, processId, context).block(); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessModulesSinglePageAsync( + String resourceGroupName, String name, String processId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .listProcessModules( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + 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())); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessModulesSinglePageAsync( + String resourceGroupName, String name, String processId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .listProcessModules( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + 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)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessModulesAsync( + String resourceGroupName, String name, String processId) { + return new PagedFlux<>( + () -> listProcessModulesSinglePageAsync(resourceGroupName, name, processId), + nextLink -> listProcessModulesNextSinglePageAsync(nextLink)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessModulesAsync( + String resourceGroupName, String name, String processId, Context context) { + return new PagedFlux<>( + () -> listProcessModulesSinglePageAsync(resourceGroupName, name, processId, context), + nextLink -> listProcessModulesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessModules( + String resourceGroupName, String name, String processId) { + return new PagedIterable<>(listProcessModulesAsync(resourceGroupName, name, processId)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessModules( + String resourceGroupName, String name, String processId, Context context) { + return new PagedIterable<>(listProcessModulesAsync(resourceGroupName, name, processId, context)); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getProcessModuleWithResponseAsync( + String resourceGroupName, String name, String processId, String baseAddress) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (baseAddress == null) { + return Mono.error(new IllegalArgumentException("Parameter baseAddress is required 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 + .getProcessModule( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + baseAddress, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getProcessModuleWithResponseAsync( + String resourceGroupName, String name, String processId, String baseAddress, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (baseAddress == null) { + return Mono.error(new IllegalArgumentException("Parameter baseAddress is required 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 + .getProcessModule( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + baseAddress, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getProcessModuleAsync( + String resourceGroupName, String name, String processId, String baseAddress) { + return getProcessModuleWithResponseAsync(resourceGroupName, name, processId, baseAddress) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProcessModuleInfoInner getProcessModule( + String resourceGroupName, String name, String processId, String baseAddress) { + return getProcessModuleAsync(resourceGroupName, name, processId, baseAddress).block(); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getProcessModuleWithResponse( + String resourceGroupName, String name, String processId, String baseAddress, Context context) { + return getProcessModuleWithResponseAsync(resourceGroupName, name, processId, baseAddress, context).block(); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessThreadsSinglePageAsync( + String resourceGroupName, String name, String processId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .listProcessThreads( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + 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())); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessThreadsSinglePageAsync( + String resourceGroupName, String name, String processId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required 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 + .listProcessThreads( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + 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)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessThreadsAsync( + String resourceGroupName, String name, String processId) { + return new PagedFlux<>( + () -> listProcessThreadsSinglePageAsync(resourceGroupName, name, processId), + nextLink -> listProcessThreadsNextSinglePageAsync(nextLink)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessThreadsAsync( + String resourceGroupName, String name, String processId, Context context) { + return new PagedFlux<>( + () -> listProcessThreadsSinglePageAsync(resourceGroupName, name, processId, context), + nextLink -> listProcessThreadsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessThreads( + String resourceGroupName, String name, String processId) { + return new PagedIterable<>(listProcessThreadsAsync(resourceGroupName, name, processId)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessThreads( + String resourceGroupName, String name, String processId, Context context) { + return new PagedIterable<>(listProcessThreadsAsync(resourceGroupName, name, processId, context)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicCertificatesSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listPublicCertificates( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicCertificatesSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listPublicCertificates( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPublicCertificatesAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listPublicCertificatesSinglePageAsync(resourceGroupName, name), + nextLink -> listPublicCertificatesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPublicCertificatesAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listPublicCertificatesSinglePageAsync(resourceGroupName, name, context), + nextLink -> listPublicCertificatesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPublicCertificates(String resourceGroupName, String name) { + return new PagedIterable<>(listPublicCertificatesAsync(resourceGroupName, name)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPublicCertificates( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listPublicCertificatesAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPublicCertificateWithResponseAsync( + String resourceGroupName, String name, String publicCertificateName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 + .getPublicCertificate( + this.client.getEndpoint(), + resourceGroupName, + name, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPublicCertificateWithResponseAsync( + String resourceGroupName, String name, String publicCertificateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 + .getPublicCertificate( + this.client.getEndpoint(), + resourceGroupName, + name, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPublicCertificateAsync( + String resourceGroupName, String name, String publicCertificateName) { + return getPublicCertificateWithResponseAsync(resourceGroupName, name, publicCertificateName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicCertificateInner getPublicCertificate( + String resourceGroupName, String name, String publicCertificateName) { + return getPublicCertificateAsync(resourceGroupName, name, publicCertificateName).block(); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPublicCertificateWithResponse( + String resourceGroupName, String name, String publicCertificateName, Context context) { + return getPublicCertificateWithResponseAsync(resourceGroupName, name, publicCertificateName, context).block(); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdatePublicCertificateWithResponseAsync( + String resourceGroupName, String name, String publicCertificateName, PublicCertificateInner publicCertificate) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 (publicCertificate == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificate is required and cannot be null.")); + } else { + publicCertificate.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdatePublicCertificate( + this.client.getEndpoint(), + resourceGroupName, + name, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + publicCertificate, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdatePublicCertificateWithResponseAsync( + String resourceGroupName, + String name, + String publicCertificateName, + PublicCertificateInner publicCertificate, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 (publicCertificate == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificate is required and cannot be null.")); + } else { + publicCertificate.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdatePublicCertificate( + this.client.getEndpoint(), + resourceGroupName, + name, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + publicCertificate, + accept, + context); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdatePublicCertificateAsync( + String resourceGroupName, String name, String publicCertificateName, PublicCertificateInner publicCertificate) { + return createOrUpdatePublicCertificateWithResponseAsync( + resourceGroupName, name, publicCertificateName, publicCertificate) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicCertificateInner createOrUpdatePublicCertificate( + String resourceGroupName, String name, String publicCertificateName, PublicCertificateInner publicCertificate) { + return createOrUpdatePublicCertificateAsync(resourceGroupName, name, publicCertificateName, publicCertificate) + .block(); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdatePublicCertificateWithResponse( + String resourceGroupName, + String name, + String publicCertificateName, + PublicCertificateInner publicCertificate, + Context context) { + return createOrUpdatePublicCertificateWithResponseAsync( + resourceGroupName, name, publicCertificateName, publicCertificate, context) + .block(); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deletePublicCertificateWithResponseAsync( + String resourceGroupName, String name, String publicCertificateName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 + .deletePublicCertificate( + this.client.getEndpoint(), + resourceGroupName, + name, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deletePublicCertificateWithResponseAsync( + String resourceGroupName, String name, String publicCertificateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 + .deletePublicCertificate( + this.client.getEndpoint(), + resourceGroupName, + name, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePublicCertificateAsync( + String resourceGroupName, String name, String publicCertificateName) { + return deletePublicCertificateWithResponseAsync(resourceGroupName, name, publicCertificateName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePublicCertificate(String resourceGroupName, String name, String publicCertificateName) { + deletePublicCertificateAsync(resourceGroupName, name, publicCertificateName).block(); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deletePublicCertificateWithResponse( + String resourceGroupName, String name, String publicCertificateName, Context context) { + return deletePublicCertificateWithResponseAsync(resourceGroupName, name, publicCertificateName, context) + .block(); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPublishingProfileXmlWithSecretsWithResponseAsync( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (publishingProfileOptions == null) { + return Mono + .error( + new IllegalArgumentException("Parameter publishingProfileOptions is required and cannot be null.")); + } else { + publishingProfileOptions.validate(); + } + final String accept = "application/xml"; + return FluxUtil + .withContext( + context -> + service + .listPublishingProfileXmlWithSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + publishingProfileOptions, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPublishingProfileXmlWithSecretsWithResponseAsync( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (publishingProfileOptions == null) { + return Mono + .error( + new IllegalArgumentException("Parameter publishingProfileOptions is required and cannot be null.")); + } else { + publishingProfileOptions.validate(); + } + final String accept = "application/xml"; + context = this.client.mergeContext(context); + return service + .listPublishingProfileXmlWithSecrets( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + publishingProfileOptions, + accept, + context); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux listPublishingProfileXmlWithSecretsAsync( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions) { + return listPublishingProfileXmlWithSecretsWithResponseAsync(resourceGroupName, name, publishingProfileOptions) + .flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream listPublishingProfileXmlWithSecrets( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions) { + Iterator iterator = + listPublishingProfileXmlWithSecretsAsync(resourceGroupName, name, publishingProfileOptions) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse listPublishingProfileXmlWithSecretsWithResponse( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions, Context context) { + return listPublishingProfileXmlWithSecretsWithResponseAsync( + resourceGroupName, name, publishingProfileOptions, context) + .block(); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetProductionSlotConfigWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .resetProductionSlotConfig( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetProductionSlotConfigWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .resetProductionSlotConfig( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetProductionSlotConfigAsync(String resourceGroupName, String name) { + return resetProductionSlotConfigWithResponseAsync(resourceGroupName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void resetProductionSlotConfig(String resourceGroupName, String name) { + resetProductionSlotConfigAsync(resourceGroupName, name).block(); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetProductionSlotConfigWithResponse( + String resourceGroupName, String name, Context context) { + return resetProductionSlotConfigWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> restartWithResponseAsync( + String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .restart( + this.client.getEndpoint(), + resourceGroupName, + name, + softRestart, + synchronous, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> restartWithResponseAsync( + String resourceGroupName, String name, Boolean softRestart, Boolean synchronous, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .restart( + this.client.getEndpoint(), + resourceGroupName, + name, + softRestart, + synchronous, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartAsync(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { + return restartWithResponseAsync(resourceGroupName, name, softRestart, synchronous) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartAsync(String resourceGroupName, String name) { + final Boolean softRestart = null; + final Boolean synchronous = null; + return restartWithResponseAsync(resourceGroupName, name, softRestart, synchronous) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restart(String resourceGroupName, String name) { + final Boolean softRestart = null; + final Boolean synchronous = null; + restartAsync(resourceGroupName, name, softRestart, synchronous).block(); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response restartWithResponse( + String resourceGroupName, String name, Boolean softRestart, Boolean synchronous, Context context) { + return restartWithResponseAsync(resourceGroupName, name, softRestart, synchronous, context).block(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreFromBackupBlobWithResponseAsync( + String resourceGroupName, String name, RestoreRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restoreFromBackupBlob( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreFromBackupBlobWithResponseAsync( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restoreFromBackupBlob( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreFromBackupBlobAsync( + String resourceGroupName, String name, RestoreRequestInner request) { + Mono>> mono = + restoreFromBackupBlobWithResponseAsync(resourceGroupName, name, request); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreFromBackupBlobAsync( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreFromBackupBlobWithResponseAsync(resourceGroupName, name, request, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreFromBackupBlob( + String resourceGroupName, String name, RestoreRequestInner request) { + return beginRestoreFromBackupBlobAsync(resourceGroupName, name, request).getSyncPoller(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreFromBackupBlob( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + return beginRestoreFromBackupBlobAsync(resourceGroupName, name, request, context).getSyncPoller(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreFromBackupBlobAsync(String resourceGroupName, String name, RestoreRequestInner request) { + return beginRestoreFromBackupBlobAsync(resourceGroupName, name, request) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreFromBackupBlobAsync( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + return beginRestoreFromBackupBlobAsync(resourceGroupName, name, request, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request) { + restoreFromBackupBlobAsync(resourceGroupName, name, request).block(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreFromBackupBlob( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + restoreFromBackupBlobAsync(resourceGroupName, name, request, context).block(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreFromDeletedAppWithResponseAsync( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restoreFromDeletedApp( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreFromDeletedAppWithResponseAsync( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restoreFromDeletedApp( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + accept, + context); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreFromDeletedAppAsync( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + Mono>> mono = + restoreFromDeletedAppWithResponseAsync(resourceGroupName, name, restoreRequest); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreFromDeletedAppAsync( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreFromDeletedAppWithResponseAsync(resourceGroupName, name, restoreRequest, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + return beginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest).getSyncPoller(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + return beginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest, context).getSyncPoller(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreFromDeletedAppAsync( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + return beginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreFromDeletedAppAsync( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + return beginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restoreFromDeletedApp(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + restoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest).block(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + restoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest, context).block(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreSnapshotWithResponseAsync( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restoreSnapshot( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreSnapshotWithResponseAsync( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restoreSnapshot( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + accept, + context); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreSnapshotAsync( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + Mono>> mono = + restoreSnapshotWithResponseAsync(resourceGroupName, name, restoreRequest); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreSnapshotAsync( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreSnapshotWithResponseAsync(resourceGroupName, name, restoreRequest, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreSnapshot( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + return beginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest).getSyncPoller(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreSnapshot( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { + return beginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest, context).getSyncPoller(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreSnapshotAsync( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + return beginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreSnapshotAsync( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { + return beginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restoreSnapshot(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + restoreSnapshotAsync(resourceGroupName, name, restoreRequest).block(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restoreSnapshot( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { + restoreSnapshotAsync(resourceGroupName, name, restoreRequest, context).block(); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteExtensionsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSiteExtensions( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteExtensionsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSiteExtensions( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteExtensionsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listSiteExtensionsSinglePageAsync(resourceGroupName, name), + nextLink -> listSiteExtensionsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteExtensionsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listSiteExtensionsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listSiteExtensionsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteExtensions(String resourceGroupName, String name) { + return new PagedIterable<>(listSiteExtensionsAsync(resourceGroupName, name)); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteExtensions( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listSiteExtensionsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteExtensionWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required 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 + .getSiteExtension( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteExtensionWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required 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 + .getSiteExtension( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteExtensionAsync( + String resourceGroupName, String name, String siteExtensionId) { + return getSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteExtensionInfoInner getSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + return getSiteExtensionAsync(resourceGroupName, name, siteExtensionId).block(); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteExtensionWithResponse( + String resourceGroupName, String name, String siteExtensionId, Context context) { + return getSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId, context).block(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> installSiteExtensionWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required 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 + .installSiteExtension( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> installSiteExtensionWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required 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 + .installSiteExtension( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionAsync( + String resourceGroupName, String name, String siteExtensionId) { + Mono>> mono = + installSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SiteExtensionInfoInner.class, + SiteExtensionInfoInner.class, + this.client.getContext()); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionAsync( + String resourceGroupName, String name, String siteExtensionId, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + installSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SiteExtensionInfoInner.class, + SiteExtensionInfoInner.class, + context); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtension( + String resourceGroupName, String name, String siteExtensionId) { + return beginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId).getSyncPoller(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtension( + String resourceGroupName, String name, String siteExtensionId, Context context) { + return beginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId, context).getSyncPoller(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono installSiteExtensionAsync( + String resourceGroupName, String name, String siteExtensionId) { + return beginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono installSiteExtensionAsync( + String resourceGroupName, String name, String siteExtensionId, Context context) { + return beginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteExtensionInfoInner installSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + return installSiteExtensionAsync(resourceGroupName, name, siteExtensionId).block(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteExtensionInfoInner installSiteExtension( + String resourceGroupName, String name, String siteExtensionId, Context context) { + return installSiteExtensionAsync(resourceGroupName, name, siteExtensionId, context).block(); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSiteExtensionWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required 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 + .deleteSiteExtension( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSiteExtensionWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required 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 + .deleteSiteExtension( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSiteExtensionAsync(String resourceGroupName, String name, String siteExtensionId) { + return deleteSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + deleteSiteExtensionAsync(resourceGroupName, name, siteExtensionId).block(); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSiteExtensionWithResponse( + String resourceGroupName, String name, String siteExtensionId, Context context) { + return deleteSiteExtensionWithResponseAsync(resourceGroupName, name, siteExtensionId, context).block(); + } + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotsSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSlots( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSlots( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSlotsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listSlotsSinglePageAsync(resourceGroupName, name), + nextLink -> listSlotsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSlotsAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listSlotsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listSlotsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSlots(String resourceGroupName, String name) { + return new PagedIterable<>(listSlotsAsync(resourceGroupName, name)); + } + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSlots(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listSlotsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSlotWithResponseAsync(String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSlotAsync(String resourceGroupName, String name, String slot) { + return getSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner getSlot(String resourceGroupName, String name, String slot) { + return getSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); + } else { + siteEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); + } else { + siteEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteEnvelope, + accept, + context); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteInner> beginCreateOrUpdateSlotAsync( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + Mono>> mono = + createOrUpdateSlotWithResponseAsync(resourceGroupName, name, slot, siteEnvelope); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class, this.client.getContext()); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteInner> beginCreateOrUpdateSlotAsync( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateSlotWithResponseAsync(resourceGroupName, name, slot, siteEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), SiteInner.class, SiteInner.class, context); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteInner> beginCreateOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return beginCreateOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope).getSyncPoller(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteInner> beginCreateOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { + return beginCreateOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope, context).getSyncPoller(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateSlotAsync( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return beginCreateOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateSlotAsync( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { + return beginCreateOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner createOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + return createOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope).block(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner createOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { + return createOrUpdateSlotAsync(resourceGroupName, name, slot, siteEnvelope, context).block(); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Boolean deleteMetrics, Boolean deleteEmptyServerFarm) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + deleteMetrics, + deleteEmptyServerFarm, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + Boolean deleteMetrics, + Boolean deleteEmptyServerFarm, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + deleteMetrics, + deleteEmptyServerFarm, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSlotAsync( + String resourceGroupName, String name, String slot, Boolean deleteMetrics, Boolean deleteEmptyServerFarm) { + return deleteSlotWithResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSlotAsync(String resourceGroupName, String name, String slot) { + final Boolean deleteMetrics = null; + final Boolean deleteEmptyServerFarm = null; + return deleteSlotWithResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSlot(String resourceGroupName, String name, String slot) { + final Boolean deleteMetrics = null; + final Boolean deleteEmptyServerFarm = null; + deleteSlotAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm).block(); + } + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSlotWithResponse( + String resourceGroupName, + String name, + String slot, + Boolean deleteMetrics, + Boolean deleteEmptyServerFarm, + Context context) { + return deleteSlotWithResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, context) + .block(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); + } else { + siteEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter siteEnvelope is required and cannot be null.")); + } else { + siteEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteEnvelope, + accept, + context); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSlotAsync( + String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope) { + return updateSlotWithResponseAsync(resourceGroupName, name, slot, siteEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteInner updateSlot( + String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope) { + return updateSlotAsync(resourceGroupName, name, slot, siteEnvelope).block(); + } + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 web app, a mobile app backend, or an API app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSlotWithResponse( + String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, Context context) { + return updateSlotWithResponseAsync(resourceGroupName, name, slot, siteEnvelope, context).block(); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostname 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. + * @return custom domain analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> analyzeCustomHostnameSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String hostname) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .analyzeCustomHostnameSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostname 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> analyzeCustomHostnameSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String hostname, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .analyzeCustomHostnameSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostname 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. + * @return custom domain analysis. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono analyzeCustomHostnameSlotAsync( + String resourceGroupName, String name, String slot, String hostname) { + return analyzeCustomHostnameSlotWithResponseAsync(resourceGroupName, name, slot, hostname) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono analyzeCustomHostnameSlotAsync( + String resourceGroupName, String name, String slot) { + final String hostname = null; + return analyzeCustomHostnameSlotWithResponseAsync(resourceGroupName, name, slot, hostname) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CustomHostnameAnalysisResultInner analyzeCustomHostnameSlot( + String resourceGroupName, String name, String slot) { + final String hostname = null; + return analyzeCustomHostnameSlotAsync(resourceGroupName, name, slot, hostname).block(); + } + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostname 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response analyzeCustomHostnameSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context) { + return analyzeCustomHostnameSlotWithResponseAsync(resourceGroupName, name, slot, hostname, context).block(); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> applySlotConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .applySlotConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> applySlotConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .applySlotConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono applySlotConfigurationSlotAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + return applySlotConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 applySlotConfigurationSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + applySlotConfigurationSlotAsync(resourceGroupName, name, slot, slotSwapEntity).block(); + } + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response applySlotConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + return applySlotConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity, context) + .block(); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> backupSlotWithResponseAsync( + String resourceGroupName, String name, String slot, BackupRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .backupSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> backupSlotWithResponseAsync( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .backupSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono backupSlotAsync( + String resourceGroupName, String name, String slot, BackupRequestInner request) { + return backupSlotWithResponseAsync(resourceGroupName, name, slot, request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupItemInner backupSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { + return backupSlotAsync(resourceGroupName, name, slot, request).block(); + } + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response backupSlotWithResponse( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context) { + return backupSlotWithResponseAsync(resourceGroupName, name, slot, request, context).block(); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listBackupsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listBackupsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBackupsSlotAsync(String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listBackupsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listBackupsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBackupsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listBackupsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listBackupsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBackupsSlot(String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listBackupsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBackupsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listBackupsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBackupStatusSlotWithResponseAsync( + String resourceGroupName, String name, String backupId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getBackupStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBackupStatusSlotWithResponseAsync( + String resourceGroupName, String name, String backupId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getBackupStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBackupStatusSlotAsync( + String resourceGroupName, String name, String backupId, String slot) { + return getBackupStatusSlotWithResponseAsync(resourceGroupName, name, backupId, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupItemInner getBackupStatusSlot(String resourceGroupName, String name, String backupId, String slot) { + return getBackupStatusSlotAsync(resourceGroupName, name, backupId, slot).block(); + } + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBackupStatusSlotWithResponse( + String resourceGroupName, String name, String backupId, String slot, Context context) { + return getBackupStatusSlotWithResponseAsync(resourceGroupName, name, backupId, slot, context).block(); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBackupSlotWithResponseAsync( + String resourceGroupName, String name, String backupId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteBackupSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBackupSlotWithResponseAsync( + String resourceGroupName, String name, String backupId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteBackupSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteBackupSlotAsync(String resourceGroupName, String name, String backupId, String slot) { + return deleteBackupSlotWithResponseAsync(resourceGroupName, name, backupId, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot) { + deleteBackupSlotAsync(resourceGroupName, name, backupId, slot).block(); + } + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteBackupSlotWithResponse( + String resourceGroupName, String name, String backupId, String slot, Context context) { + return deleteBackupSlotWithResponseAsync(resourceGroupName, name, backupId, slot, context).block(); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupStatusSecretsSlotWithResponseAsync( + String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listBackupStatusSecretsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupStatusSecretsSlotWithResponseAsync( + String resourceGroupName, + String name, + String backupId, + String slot, + BackupRequestInner request, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listBackupStatusSecretsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listBackupStatusSecretsSlotAsync( + String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + return listBackupStatusSecretsSlotWithResponseAsync(resourceGroupName, name, backupId, slot, request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupItemInner listBackupStatusSecretsSlot( + String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + return listBackupStatusSecretsSlotAsync(resourceGroupName, name, backupId, slot, request).block(); + } + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup 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 backup description. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listBackupStatusSecretsSlotWithResponse( + String resourceGroupName, + String name, + String backupId, + String slot, + BackupRequestInner request, + Context context) { + return listBackupStatusSecretsSlotWithResponseAsync(resourceGroupName, name, backupId, slot, request, context) + .block(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreSlotWithResponseAsync( + String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restoreSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreSlotWithResponseAsync( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (backupId == null) { + return Mono.error(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restoreSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + backupId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreSlotAsync( + String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + Mono>> mono = + restoreSlotWithResponseAsync(resourceGroupName, name, backupId, slot, request); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreSlotAsync( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreSlotWithResponseAsync(resourceGroupName, name, backupId, slot, request, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreSlot( + String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return beginRestoreSlotAsync(resourceGroupName, name, backupId, slot, request).getSyncPoller(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreSlot( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context) { + return beginRestoreSlotAsync(resourceGroupName, name, backupId, slot, request, context).getSyncPoller(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreSlotAsync( + String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + return beginRestoreSlotAsync(resourceGroupName, name, backupId, slot, request) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreSlotAsync( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context) { + return beginRestoreSlotAsync(resourceGroupName, name, backupId, slot, request, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreSlot( + String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + restoreSlotAsync(resourceGroupName, name, backupId, slot, request).block(); + } + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreSlot( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context) { + restoreSlotAsync(resourceGroupName, name, backupId, slot, request, context).block(); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBasicPublishingCredentialsPoliciesSlotSinglePageAsync(String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listBasicPublishingCredentialsPoliciesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBasicPublishingCredentialsPoliciesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listBasicPublishingCredentialsPoliciesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBasicPublishingCredentialsPoliciesSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listBasicPublishingCredentialsPoliciesSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listBasicPublishingCredentialsPoliciesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listBasicPublishingCredentialsPoliciesSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listBasicPublishingCredentialsPoliciesSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listBasicPublishingCredentialsPoliciesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBasicPublishingCredentialsPoliciesSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listBasicPublishingCredentialsPoliciesSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listBasicPublishingCredentialsPoliciesSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>( + listBasicPublishingCredentialsPoliciesSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFtpAllowedSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getFtpAllowedSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFtpAllowedSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getFtpAllowedSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFtpAllowedSlotAsync( + String resourceGroupName, String name, String slot) { + return getFtpAllowedSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CsmPublishingCredentialsPoliciesEntityInner getFtpAllowedSlot( + String resourceGroupName, String name, String slot) { + return getFtpAllowedSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFtpAllowedSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getFtpAllowedSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateFtpAllowedSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (csmPublishingAccessPoliciesEntity == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter csmPublishingAccessPoliciesEntity is required and cannot be null.")); + } else { + csmPublishingAccessPoliciesEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateFtpAllowedSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + csmPublishingAccessPoliciesEntity, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateFtpAllowedSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (csmPublishingAccessPoliciesEntity == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter csmPublishingAccessPoliciesEntity is required and cannot be null.")); + } else { + csmPublishingAccessPoliciesEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateFtpAllowedSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + csmPublishingAccessPoliciesEntity, + accept, + context); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateFtpAllowedSlotAsync( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateFtpAllowedSlotWithResponseAsync(resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CsmPublishingCredentialsPoliciesEntityInner updateFtpAllowedSlot( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateFtpAllowedSlotAsync(resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity).block(); + } + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateFtpAllowedSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + return updateFtpAllowedSlotWithResponseAsync( + resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, context) + .block(); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getScmAllowedSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getScmAllowedSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getScmAllowedSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getScmAllowedSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getScmAllowedSlotAsync( + String resourceGroupName, String name, String slot) { + return getScmAllowedSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CsmPublishingCredentialsPoliciesEntityInner getScmAllowedSlot( + String resourceGroupName, String name, String slot) { + return getScmAllowedSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot 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 publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getScmAllowedSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getScmAllowedSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateScmAllowedSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (csmPublishingAccessPoliciesEntity == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter csmPublishingAccessPoliciesEntity is required and cannot be null.")); + } else { + csmPublishingAccessPoliciesEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateScmAllowedSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + csmPublishingAccessPoliciesEntity, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateScmAllowedSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (csmPublishingAccessPoliciesEntity == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter csmPublishingAccessPoliciesEntity is required and cannot be null.")); + } else { + csmPublishingAccessPoliciesEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateScmAllowedSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + csmPublishingAccessPoliciesEntity, + accept, + context); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateScmAllowedSlotAsync( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateScmAllowedSlotWithResponseAsync(resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CsmPublishingCredentialsPoliciesEntityInner updateScmAllowedSlot( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + return updateScmAllowedSlotAsync(resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity).block(); + } + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateScmAllowedSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + return updateScmAllowedSlotWithResponseAsync( + resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, context) + .block(); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 site configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listConfigurationsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 site configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listConfigurationsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listConfigurationsSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listConfigurationsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listConfigurationsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listConfigurationsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listConfigurationsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listConfigurationsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurationsSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listConfigurationsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 site configurations. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurationsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listConfigurationsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateApplicationSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateApplicationSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateApplicationSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (appSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettings is required and cannot be null.")); + } else { + appSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateApplicationSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + appSettings, + accept, + context); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateApplicationSettingsSlotAsync( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + return updateApplicationSettingsSlotWithResponseAsync(resourceGroupName, name, slot, appSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner updateApplicationSettingsSlot( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + return updateApplicationSettingsSlotAsync(resourceGroupName, name, slot, appSettings).block(); + } + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the 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 string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateApplicationSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings, Context context) { + return updateApplicationSettingsSlotWithResponseAsync(resourceGroupName, name, slot, appSettings, context) + .block(); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listApplicationSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listApplicationSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listApplicationSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listApplicationSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listApplicationSettingsSlotAsync( + String resourceGroupName, String name, String slot) { + return listApplicationSettingsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listApplicationSettingsSlot(String resourceGroupName, String name, String slot) { + return listApplicationSettingsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listApplicationSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listApplicationSettingsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAuthSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteAuthSettings == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteAuthSettings is required and cannot be null.")); + } else { + siteAuthSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAuthSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteAuthSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web 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 configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAuthSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteAuthSettings == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteAuthSettings is required and cannot be null.")); + } else { + siteAuthSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAuthSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteAuthSettings, + accept, + context); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAuthSettingsSlotAsync( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsSlotWithResponseAsync(resourceGroupName, name, slot, siteAuthSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsInner updateAuthSettingsSlot( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + return updateAuthSettingsSlotAsync(resourceGroupName, name, slot, siteAuthSettings).block(); + } + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web 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 configuration settings for the Azure App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAuthSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings, Context context) { + return updateAuthSettingsSlotWithResponseAsync(resourceGroupName, name, slot, siteAuthSettings, context) + .block(); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getAuthSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getAuthSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAuthSettingsSlotAsync(String resourceGroupName, String name, String slot) { + return getAuthSettingsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsInner getAuthSettingsSlot(String resourceGroupName, String name, String slot) { + return getAuthSettingsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAuthSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getAuthSettingsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAuthSettingsV2SlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteAuthSettingsV2Inner siteAuthSettingsV2) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteAuthSettingsV2 == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteAuthSettingsV2 is required and cannot be null.")); + } else { + siteAuthSettingsV2.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAuthSettingsV2Slot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteAuthSettingsV2, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web 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 configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAuthSettingsV2SlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + SiteAuthSettingsV2Inner siteAuthSettingsV2, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteAuthSettingsV2 == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteAuthSettingsV2 is required and cannot be null.")); + } else { + siteAuthSettingsV2.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAuthSettingsV2Slot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteAuthSettingsV2, + accept, + context); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAuthSettingsV2SlotAsync( + String resourceGroupName, String name, String slot, SiteAuthSettingsV2Inner siteAuthSettingsV2) { + return updateAuthSettingsV2SlotWithResponseAsync(resourceGroupName, name, slot, siteAuthSettingsV2) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsV2Inner updateAuthSettingsV2Slot( + String resourceGroupName, String name, String slot, SiteAuthSettingsV2Inner siteAuthSettingsV2) { + return updateAuthSettingsV2SlotAsync(resourceGroupName, name, slot, siteAuthSettingsV2).block(); + } + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web 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 configuration settings for the Azure App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAuthSettingsV2SlotWithResponse( + String resourceGroupName, + String name, + String slot, + SiteAuthSettingsV2Inner siteAuthSettingsV2, + Context context) { + return updateAuthSettingsV2SlotWithResponseAsync(resourceGroupName, name, slot, siteAuthSettingsV2, context) + .block(); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsV2SlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getAuthSettingsV2Slot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthSettingsV2SlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getAuthSettingsV2Slot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAuthSettingsV2SlotAsync( + String resourceGroupName, String name, String slot) { + return getAuthSettingsV2SlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteAuthSettingsV2Inner getAuthSettingsV2Slot(String resourceGroupName, String name, String slot) { + return getAuthSettingsV2SlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 App Service Authentication / Authorization V2 feature. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAuthSettingsV2SlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getAuthSettingsV2SlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAzureStorageAccountsSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (azureStorageAccounts == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureStorageAccounts is required and cannot be null.")); + } else { + azureStorageAccounts.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateAzureStorageAccountsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + azureStorageAccounts, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the 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 azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateAzureStorageAccountsSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (azureStorageAccounts == null) { + return Mono + .error(new IllegalArgumentException("Parameter azureStorageAccounts is required and cannot be null.")); + } else { + azureStorageAccounts.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateAzureStorageAccountsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + azureStorageAccounts, + accept, + context); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAzureStorageAccountsSlotAsync( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + return updateAzureStorageAccountsSlotWithResponseAsync(resourceGroupName, name, slot, azureStorageAccounts) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureStoragePropertyDictionaryResourceInner updateAzureStorageAccountsSlot( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + return updateAzureStorageAccountsSlotAsync(resourceGroupName, name, slot, azureStorageAccounts).block(); + } + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the 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 azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateAzureStorageAccountsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context) { + return updateAzureStorageAccountsSlotWithResponseAsync( + resourceGroupName, name, slot, azureStorageAccounts, context) + .block(); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAzureStorageAccountsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listAzureStorageAccountsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listAzureStorageAccountsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listAzureStorageAccountsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAzureStorageAccountsSlotAsync( + String resourceGroupName, String name, String slot) { + return listAzureStorageAccountsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AzureStoragePropertyDictionaryResourceInner listAzureStorageAccountsSlot( + String resourceGroupName, String name, String slot) { + return listAzureStorageAccountsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listAzureStorageAccountsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listAzureStorageAccountsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateBackupConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, BackupRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateBackupConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateBackupConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateBackupConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateBackupConfigurationSlotAsync( + String resourceGroupName, String name, String slot, BackupRequestInner request) { + return updateBackupConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupRequestInner updateBackupConfigurationSlot( + String resourceGroupName, String name, String slot, BackupRequestInner request) { + return updateBackupConfigurationSlotAsync(resourceGroupName, name, slot, request).block(); + } + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context) { + return updateBackupConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, request, context).block(); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBackupConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteBackupConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteBackupConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteBackupConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteBackupConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return deleteBackupConfigurationSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteBackupConfigurationSlot(String resourceGroupName, String name, String slot) { + deleteBackupConfigurationSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return deleteBackupConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBackupConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getBackupConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getBackupConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getBackupConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getBackupConfigurationSlotAsync( + String resourceGroupName, String name, String slot) { + return getBackupConfigurationSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BackupRequestInner getBackupConfigurationSlot(String resourceGroupName, String name, String slot) { + return getBackupConfigurationSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getBackupConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingsKeyVaultReferencesSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getAppSettingsKeyVaultReferencesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingsKeyVaultReferencesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getAppSettingsKeyVaultReferencesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAppSettingsKeyVaultReferencesSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> getAppSettingsKeyVaultReferencesSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> getAppSettingsKeyVaultReferencesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAppSettingsKeyVaultReferencesSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> getAppSettingsKeyVaultReferencesSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> getAppSettingsKeyVaultReferencesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getAppSettingsKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(getAppSettingsKeyVaultReferencesSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getAppSettingsKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(getAppSettingsKeyVaultReferencesSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingKeyVaultReferenceSlotWithResponseAsync( + String resourceGroupName, String name, String appSettingKey, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (appSettingKey == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettingKey is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getAppSettingKeyVaultReferenceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + appSettingKey, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingKeyVaultReferenceSlotWithResponseAsync( + String resourceGroupName, String name, String appSettingKey, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (appSettingKey == null) { + return Mono.error(new IllegalArgumentException("Parameter appSettingKey is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getAppSettingKeyVaultReferenceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + appSettingKey, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAppSettingKeyVaultReferenceSlotAsync( + String resourceGroupName, String name, String appSettingKey, String slot) { + return getAppSettingKeyVaultReferenceSlotWithResponseAsync(resourceGroupName, name, appSettingKey, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiKVReferenceInner getAppSettingKeyVaultReferenceSlot( + String resourceGroupName, String name, String appSettingKey, String slot) { + return getAppSettingKeyVaultReferenceSlotAsync(resourceGroupName, name, appSettingKey, slot).block(); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAppSettingKeyVaultReferenceSlotWithResponse( + String resourceGroupName, String name, String appSettingKey, String slot, Context context) { + return getAppSettingKeyVaultReferenceSlotWithResponseAsync( + resourceGroupName, name, appSettingKey, slot, context) + .block(); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferencesSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteConnectionStringKeyVaultReferencesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferencesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteConnectionStringKeyVaultReferencesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getSiteConnectionStringKeyVaultReferencesSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> getSiteConnectionStringKeyVaultReferencesSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> getSiteConnectionStringKeyVaultReferencesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getSiteConnectionStringKeyVaultReferencesSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> getSiteConnectionStringKeyVaultReferencesSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> getSiteConnectionStringKeyVaultReferencesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSiteConnectionStringKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(getSiteConnectionStringKeyVaultReferencesSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getSiteConnectionStringKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>( + getSiteConnectionStringKeyVaultReferencesSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferenceSlotWithResponseAsync( + String resourceGroupName, String name, String connectionStringKey, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (connectionStringKey == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionStringKey is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteConnectionStringKeyVaultReferenceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + connectionStringKey, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferenceSlotWithResponseAsync( + String resourceGroupName, String name, String connectionStringKey, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (connectionStringKey == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionStringKey is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteConnectionStringKeyVaultReferenceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + connectionStringKey, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteConnectionStringKeyVaultReferenceSlotAsync( + String resourceGroupName, String name, String connectionStringKey, String slot) { + return getSiteConnectionStringKeyVaultReferenceSlotWithResponseAsync( + resourceGroupName, name, connectionStringKey, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ApiKVReferenceInner getSiteConnectionStringKeyVaultReferenceSlot( + String resourceGroupName, String name, String connectionStringKey, String slot) { + return getSiteConnectionStringKeyVaultReferenceSlotAsync(resourceGroupName, name, connectionStringKey, slot) + .block(); + } + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot 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 description of site key vault references. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteConnectionStringKeyVaultReferenceSlotWithResponse( + String resourceGroupName, String name, String connectionStringKey, String slot, Context context) { + return getSiteConnectionStringKeyVaultReferenceSlotWithResponseAsync( + resourceGroupName, name, connectionStringKey, slot, context) + .block(); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateConnectionStringsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionStrings == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionStrings is required and cannot be null.")); + } else { + connectionStrings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateConnectionStringsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionStrings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateConnectionStringsSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + ConnectionStringDictionaryInner connectionStrings, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionStrings == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionStrings is required and cannot be null.")); + } else { + connectionStrings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateConnectionStringsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionStrings, + accept, + context); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateConnectionStringsSlotAsync( + String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsSlotWithResponseAsync(resourceGroupName, name, slot, connectionStrings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectionStringDictionaryInner updateConnectionStringsSlot( + String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + return updateConnectionStringsSlotAsync(resourceGroupName, name, slot, connectionStrings).block(); + } + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateConnectionStringsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + ConnectionStringDictionaryInner connectionStrings, + Context context) { + return updateConnectionStringsSlotWithResponseAsync(resourceGroupName, name, slot, connectionStrings, context) + .block(); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConnectionStringsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listConnectionStringsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConnectionStringsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listConnectionStringsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listConnectionStringsSlotAsync( + String resourceGroupName, String name, String slot) { + return listConnectionStringsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectionStringDictionaryInner listConnectionStringsSlot( + String resourceGroupName, String name, String slot) { + return listConnectionStringsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listConnectionStringsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listConnectionStringsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDiagnosticLogsConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getDiagnosticLogsConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDiagnosticLogsConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getDiagnosticLogsConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDiagnosticLogsConfigurationSlotAsync( + String resourceGroupName, String name, String slot) { + return getDiagnosticLogsConfigurationSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteLogsConfigInner getDiagnosticLogsConfigurationSlot(String resourceGroupName, String name, String slot) { + return getDiagnosticLogsConfigurationSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDiagnosticLogsConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getDiagnosticLogsConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateDiagnosticLogsConfigSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteLogsConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteLogsConfig is required and cannot be null.")); + } else { + siteLogsConfig.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateDiagnosticLogsConfigSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteLogsConfig, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateDiagnosticLogsConfigSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteLogsConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteLogsConfig is required and cannot be null.")); + } else { + siteLogsConfig.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateDiagnosticLogsConfigSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteLogsConfig, + accept, + context); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDiagnosticLogsConfigSlotAsync( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigSlotWithResponseAsync(resourceGroupName, name, slot, siteLogsConfig) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteLogsConfigInner updateDiagnosticLogsConfigSlot( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + return updateDiagnosticLogsConfigSlotAsync(resourceGroupName, name, slot, siteLogsConfig).block(); + } + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 of App Service site logs. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateDiagnosticLogsConfigSlotWithResponse( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig, Context context) { + return updateDiagnosticLogsConfigSlotWithResponseAsync(resourceGroupName, name, slot, siteLogsConfig, context) + .block(); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateMetadataSlotWithResponseAsync( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (metadata == null) { + return Mono.error(new IllegalArgumentException("Parameter metadata is required and cannot be null.")); + } else { + metadata.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateMetadataSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + metadata, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateMetadataSlotWithResponseAsync( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (metadata == null) { + return Mono.error(new IllegalArgumentException("Parameter metadata is required and cannot be null.")); + } else { + metadata.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateMetadataSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + metadata, + accept, + context); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateMetadataSlotAsync( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + return updateMetadataSlotWithResponseAsync(resourceGroupName, name, slot, metadata) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner updateMetadataSlot( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + return updateMetadataSlotAsync(resourceGroupName, name, slot, metadata).block(); + } + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateMetadataSlotWithResponse( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata, Context context) { + return updateMetadataSlotWithResponseAsync(resourceGroupName, name, slot, metadata, context).block(); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMetadataSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listMetadataSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listMetadataSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listMetadataSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listMetadataSlotAsync(String resourceGroupName, String name, String slot) { + return listMetadataSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listMetadataSlot(String resourceGroupName, String name, String slot) { + return listMetadataSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listMetadataSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listMetadataSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listPublishingCredentialsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listPublishingCredentialsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listPublishingCredentialsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listPublishingCredentialsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UserInner> beginListPublishingCredentialsSlotAsync( + String resourceGroupName, String name, String slot) { + Mono>> mono = + listPublishingCredentialsSlotWithResponseAsync(resourceGroupName, name, slot); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class, this.client.getContext()); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, UserInner> beginListPublishingCredentialsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + listPublishingCredentialsSlotWithResponseAsync(resourceGroupName, name, slot, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), UserInner.class, UserInner.class, context); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UserInner> beginListPublishingCredentialsSlot( + String resourceGroupName, String name, String slot) { + return beginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot).getSyncPoller(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, UserInner> beginListPublishingCredentialsSlot( + String resourceGroupName, String name, String slot, Context context) { + return beginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot, context).getSyncPoller(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPublishingCredentialsSlotAsync(String resourceGroupName, String name, String slot) { + return beginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPublishingCredentialsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return beginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserInner listPublishingCredentialsSlot(String resourceGroupName, String name, String slot) { + return listPublishingCredentialsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public UserInner listPublishingCredentialsSlot( + String resourceGroupName, String name, String slot, Context context) { + return listPublishingCredentialsSlotAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSitePushSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (pushSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter pushSettings is required and cannot be null.")); + } else { + pushSettings.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSitePushSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + pushSettings, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web 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 push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSitePushSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (pushSettings == null) { + return Mono.error(new IllegalArgumentException("Parameter pushSettings is required and cannot be null.")); + } else { + pushSettings.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSitePushSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + pushSettings, + accept, + context); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSitePushSettingsSlotAsync( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + return updateSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, pushSettings) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PushSettingsInner updateSitePushSettingsSlot( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + return updateSitePushSettingsSlotAsync(resourceGroupName, name, slot, pushSettings).block(); + } + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web 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 push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSitePushSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { + return updateSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, pushSettings, context) + .block(); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSitePushSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSitePushSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSitePushSettingsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSitePushSettingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSitePushSettingsSlotAsync(String resourceGroupName, String name, String slot) { + return listSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PushSettingsInner listSitePushSettingsSlot(String resourceGroupName, String name, String slot) { + return listSitePushSettingsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSitePushSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listSitePushSettingsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getConfigurationSlotAsync( + String resourceGroupName, String name, String slot) { + return getConfigurationSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner getConfigurationSlot(String resourceGroupName, String name, String slot) { + return getConfigurationSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + accept, + context); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateConfigurationSlotAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return createOrUpdateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner createOrUpdateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return createOrUpdateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig).block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + return createOrUpdateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig, context) + .block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteConfig == null) { + return Mono.error(new IllegalArgumentException("Parameter siteConfig is required and cannot be null.")); + } else { + siteConfig.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteConfig, + accept, + context); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateConfigurationSlotAsync( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return updateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner updateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + return updateConfigurationSlotAsync(resourceGroupName, name, slot, siteConfig).block(); + } + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + return updateConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, siteConfig, context).block(); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationSnapshotInfoSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listConfigurationSnapshotInfoSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationSnapshotInfoSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listConfigurationSnapshotInfoSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listConfigurationSnapshotInfoSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listConfigurationSnapshotInfoSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listConfigurationSnapshotInfoSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listConfigurationSnapshotInfoSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listConfigurationSnapshotInfoSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurationSnapshotInfoSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listConfigurationSnapshotInfoSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listConfigurationSnapshotInfoSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listConfigurationSnapshotInfoSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getConfigurationSnapshotSlotWithResponseAsync( + String resourceGroupName, String name, String snapshotId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (snapshotId == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getConfigurationSnapshotSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + snapshotId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getConfigurationSnapshotSlotWithResponseAsync( + String resourceGroupName, String name, String snapshotId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (snapshotId == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getConfigurationSnapshotSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + snapshotId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getConfigurationSnapshotSlotAsync( + String resourceGroupName, String name, String snapshotId, String slot) { + return getConfigurationSnapshotSlotWithResponseAsync(resourceGroupName, name, snapshotId, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteConfigResourceInner getConfigurationSnapshotSlot( + String resourceGroupName, String name, String snapshotId, String slot) { + return getConfigurationSnapshotSlotAsync(resourceGroupName, name, snapshotId, slot).block(); + } + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getConfigurationSnapshotSlotWithResponse( + String resourceGroupName, String name, String snapshotId, String slot, Context context) { + return getConfigurationSnapshotSlotWithResponseAsync(resourceGroupName, name, snapshotId, slot, context) + .block(); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> recoverSiteConfigurationSnapshotSlotWithResponseAsync( + String resourceGroupName, String name, String snapshotId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (snapshotId == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .recoverSiteConfigurationSnapshotSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + snapshotId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> recoverSiteConfigurationSnapshotSlotWithResponseAsync( + String resourceGroupName, String name, String snapshotId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (snapshotId == null) { + return Mono.error(new IllegalArgumentException("Parameter snapshotId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .recoverSiteConfigurationSnapshotSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + snapshotId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono recoverSiteConfigurationSnapshotSlotAsync( + String resourceGroupName, String name, String snapshotId, String slot) { + return recoverSiteConfigurationSnapshotSlotWithResponseAsync(resourceGroupName, name, snapshotId, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 recoverSiteConfigurationSnapshotSlot( + String resourceGroupName, String name, String snapshotId, String slot) { + recoverSiteConfigurationSnapshotSlotAsync(resourceGroupName, name, snapshotId, slot).block(); + } + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response recoverSiteConfigurationSnapshotSlotWithResponse( + String resourceGroupName, String name, String snapshotId, String slot, Context context) { + return recoverSiteConfigurationSnapshotSlotWithResponseAsync(resourceGroupName, name, snapshotId, slot, context) + .block(); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWebSiteContainerLogsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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/octet-stream"; + return FluxUtil + .withContext( + context -> + service + .getWebSiteContainerLogsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWebSiteContainerLogsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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/octet-stream"; + context = this.client.mergeContext(context); + return service + .getWebSiteContainerLogsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux getWebSiteContainerLogsSlotAsync(String resourceGroupName, String name, String slot) { + return getWebSiteContainerLogsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream getWebSiteContainerLogsSlot(String resourceGroupName, String name, String slot) { + Iterator iterator = + getWebSiteContainerLogsSlotAsync(resourceGroupName, name, slot) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse getWebSiteContainerLogsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getWebSiteContainerLogsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getContainerLogsZipSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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/zip"; + return FluxUtil + .withContext( + context -> + service + .getContainerLogsZipSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getContainerLogsZipSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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/zip"; + context = this.client.mergeContext(context); + return service + .getContainerLogsZipSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux getContainerLogsZipSlotAsync(String resourceGroupName, String name, String slot) { + return getContainerLogsZipSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream getContainerLogsZipSlot(String resourceGroupName, String name, String slot) { + Iterator iterator = + getContainerLogsZipSlotAsync(resourceGroupName, name, slot) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse getContainerLogsZipSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getContainerLogsZipSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listContinuousWebJobsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listContinuousWebJobsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listContinuousWebJobsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listContinuousWebJobsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listContinuousWebJobsSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listContinuousWebJobsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listContinuousWebJobsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listContinuousWebJobsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listContinuousWebJobsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listContinuousWebJobsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listContinuousWebJobsSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listContinuousWebJobsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listContinuousWebJobsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listContinuousWebJobsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getContinuousWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getContinuousWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getContinuousWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getContinuousWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getContinuousWebJobSlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return getContinuousWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContinuousWebJobInner getContinuousWebJobSlot( + String resourceGroupName, String name, String webJobName, String slot) { + return getContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).block(); + } + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 continuous Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return getContinuousWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot, context).block(); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteContinuousWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteContinuousWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteContinuousWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteContinuousWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteContinuousWebJobSlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return deleteContinuousWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + deleteContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).block(); + } + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return deleteContinuousWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot, context).block(); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startContinuousWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startContinuousWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startContinuousWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startContinuousWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startContinuousWebJobSlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return startContinuousWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void startContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + startContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).block(); + } + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return startContinuousWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot, context).block(); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopContinuousWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .stopContinuousWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopContinuousWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .stopContinuousWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopContinuousWebJobSlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return stopContinuousWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + stopContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).block(); + } + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return stopContinuousWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot, context).block(); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app deployments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listDeploymentsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app deployments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listDeploymentsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeploymentsSlotAsync(String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listDeploymentsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDeploymentsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listDeploymentsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeploymentsSlot(String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listDeploymentsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app deployments. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDeploymentsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listDeploymentsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeploymentSlotWithResponseAsync( + String resourceGroupName, String name, String id, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getDeploymentSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDeploymentSlotWithResponseAsync( + String resourceGroupName, String name, String id, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getDeploymentSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDeploymentSlotAsync( + String resourceGroupName, String name, String id, String slot) { + return getDeploymentSlotWithResponseAsync(resourceGroupName, name, id, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentInner getDeploymentSlot(String resourceGroupName, String name, String id, String slot) { + return getDeploymentSlotAsync(resourceGroupName, name, id, slot).block(); + } + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context) { + return getDeploymentSlotWithResponseAsync(resourceGroupName, name, id, slot, context).block(); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createDeploymentSlotWithResponseAsync( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (deployment == null) { + return Mono.error(new IllegalArgumentException("Parameter deployment is required and cannot be null.")); + } else { + deployment.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createDeploymentSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + deployment, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createDeploymentSlotWithResponseAsync( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (deployment == null) { + return Mono.error(new IllegalArgumentException("Parameter deployment is required and cannot be null.")); + } else { + deployment.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createDeploymentSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + deployment, + accept, + context); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createDeploymentSlotAsync( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { + return createDeploymentSlotWithResponseAsync(resourceGroupName, name, id, slot, deployment) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentInner createDeploymentSlot( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { + return createDeploymentSlotAsync(resourceGroupName, name, id, slot, deployment).block(); + } + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment, Context context) { + return createDeploymentSlotWithResponseAsync(resourceGroupName, name, id, slot, deployment, context).block(); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteDeploymentSlotWithResponseAsync( + String resourceGroupName, String name, String id, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteDeploymentSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteDeploymentSlotWithResponseAsync( + String resourceGroupName, String name, String id, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteDeploymentSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot) { + return deleteDeploymentSlotWithResponseAsync(resourceGroupName, name, id, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) { + deleteDeploymentSlotAsync(resourceGroupName, name, id, slot).block(); + } + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context) { + return deleteDeploymentSlotWithResponseAsync(resourceGroupName, name, id, slot, context).block(); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentLogSlotWithResponseAsync( + String resourceGroupName, String name, String id, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listDeploymentLogSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentLogSlotWithResponseAsync( + String resourceGroupName, String name, String id, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listDeploymentLogSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listDeploymentLogSlotAsync( + String resourceGroupName, String name, String id, String slot) { + return listDeploymentLogSlotWithResponseAsync(resourceGroupName, name, id, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DeploymentInner listDeploymentLogSlot(String resourceGroupName, String name, String id, String slot) { + return listDeploymentLogSlotAsync(resourceGroupName, name, id, slot).block(); + } + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listDeploymentLogSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context) { + return listDeploymentLogSlotWithResponseAsync(resourceGroupName, name, id, slot, context).block(); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> discoverBackupSlotWithResponseAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .discoverBackupSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> discoverBackupSlotWithResponseAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .discoverBackupSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono discoverBackupSlotAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return discoverBackupSlotWithResponseAsync(resourceGroupName, name, slot, request) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RestoreRequestInner discoverBackupSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return discoverBackupSlotAsync(resourceGroupName, name, slot, request).block(); + } + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response discoverBackupSlotWithResponse( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + return discoverBackupSlotWithResponseAsync(resourceGroupName, name, slot, request, context).block(); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDomainOwnershipIdentifiersSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listDomainOwnershipIdentifiersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDomainOwnershipIdentifiersSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listDomainOwnershipIdentifiersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDomainOwnershipIdentifiersSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listDomainOwnershipIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDomainOwnershipIdentifiersSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listDomainOwnershipIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listDomainOwnershipIdentifiersSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDomainOwnershipIdentifiersSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listDomainOwnershipIdentifiersSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 identifiers. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDomainOwnershipIdentifiersSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listDomainOwnershipIdentifiersSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDomainOwnershipIdentifierSlotWithResponseAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getDomainOwnershipIdentifierSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDomainOwnershipIdentifierSlotWithResponseAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getDomainOwnershipIdentifierSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDomainOwnershipIdentifierSlotAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + return getDomainOwnershipIdentifierSlotWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentifierInner getDomainOwnershipIdentifierSlot( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + return getDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot) + .block(); + } + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context) { + return getDomainOwnershipIdentifierSlotWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot, context) + .block(); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateDomainOwnershipIdentifierSlotWithResponseAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateDomainOwnershipIdentifierSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateDomainOwnershipIdentifierSlotWithResponseAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateDomainOwnershipIdentifierSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateDomainOwnershipIdentifierSlotAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier) { + return createOrUpdateDomainOwnershipIdentifierSlotWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentifierInner createOrUpdateDomainOwnershipIdentifierSlot( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier) { + return createOrUpdateDomainOwnershipIdentifierSlotAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier) + .block(); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context) { + return createOrUpdateDomainOwnershipIdentifierSlotWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, context) + .block(); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteDomainOwnershipIdentifierSlotWithResponseAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteDomainOwnershipIdentifierSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteDomainOwnershipIdentifierSlotWithResponseAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteDomainOwnershipIdentifierSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteDomainOwnershipIdentifierSlotAsync( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + return deleteDomainOwnershipIdentifierSlotWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteDomainOwnershipIdentifierSlot( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + deleteDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot).block(); + } + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context) { + return deleteDomainOwnershipIdentifierSlotWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot, context) + .block(); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateDomainOwnershipIdentifierSlotWithResponseAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateDomainOwnershipIdentifierSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateDomainOwnershipIdentifierSlotWithResponseAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (domainOwnershipIdentifierName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifierName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (domainOwnershipIdentifier == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter domainOwnershipIdentifier is required and cannot be null.")); + } else { + domainOwnershipIdentifier.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateDomainOwnershipIdentifierSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + domainOwnershipIdentifierName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + domainOwnershipIdentifier, + accept, + context); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateDomainOwnershipIdentifierSlotAsync( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier) { + return updateDomainOwnershipIdentifierSlotWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public IdentifierInner updateDomainOwnershipIdentifierSlot( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier) { + return updateDomainOwnershipIdentifierSlotAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier) + .block(); + } + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 domain specific resource identifier. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context) { + return updateDomainOwnershipIdentifierSlotWithResponseAsync( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, context) + .block(); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMSDeployStatusSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getMSDeployStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMSDeployStatusSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getMSDeployStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMSDeployStatusSlotAsync(String resourceGroupName, String name, String slot) { + return getMSDeployStatusSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner getMSDeployStatusSlot(String resourceGroupName, String name, String slot) { + return getMSDeployStatusSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMSDeployStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getMSDeployStatusSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createMSDeployOperationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (mSDeploy == null) { + return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); + } else { + mSDeploy.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createMSDeployOperationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + mSDeploy, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createMSDeployOperationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (mSDeploy == null) { + return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); + } else { + mSDeploy.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createMSDeployOperationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + mSDeploy, + accept, + context); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { + Mono>> mono = + createMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, mSDeploy); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MSDeployStatusInner.class, + MSDeployStatusInner.class, + this.client.getContext()); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MSDeployStatusInner> beginCreateMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, mSDeploy, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class, context); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { + return beginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy).getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MSDeployStatusInner> beginCreateMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { + return beginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy, context).getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { + return beginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { + return beginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { + return createMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy).block(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { + return createMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy, context).block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMSDeployLogSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getMSDeployLogSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMSDeployLogSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getMSDeployLogSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMSDeployLogSlotAsync(String resourceGroupName, String name, String slot) { + return getMSDeployLogSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployLogInner getMSDeployLogSlot(String resourceGroupName, String name, String slot) { + return getMSDeployLogSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMSDeployLogSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getMSDeployLogSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceFunctionsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listInstanceFunctionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceFunctionsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listInstanceFunctionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceFunctionsSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listInstanceFunctionsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listInstanceFunctionsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceFunctionsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listInstanceFunctionsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listInstanceFunctionsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceFunctionsSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listInstanceFunctionsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceFunctionsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listInstanceFunctionsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionsAdminTokenSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getFunctionsAdminTokenSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getFunctionsAdminTokenSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getFunctionsAdminTokenSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getFunctionsAdminTokenSlotAsync(String resourceGroupName, String name, String slot) { + return getFunctionsAdminTokenSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String getFunctionsAdminTokenSlot(String resourceGroupName, String name, String slot) { + return getFunctionsAdminTokenSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getFunctionsAdminTokenSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getFunctionsAdminTokenSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceFunctionSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getInstanceFunctionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @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 function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceFunctionSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getInstanceFunctionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceFunctionSlotAsync( + String resourceGroupName, String name, String functionName, String slot) { + return getInstanceFunctionSlotWithResponseAsync(resourceGroupName, name, functionName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionEnvelopeInner getInstanceFunctionSlot( + String resourceGroupName, String name, String functionName, String slot) { + return getInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot).block(); + } + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @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 function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceFunctionSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context) { + return getInstanceFunctionSlotWithResponseAsync(resourceGroupName, name, functionName, slot, context).block(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createInstanceFunctionSlotWithResponseAsync( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (functionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null.")); + } else { + functionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createInstanceFunctionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + functionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createInstanceFunctionSlotWithResponseAsync( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (functionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionEnvelope is required and cannot be null.")); + } else { + functionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createInstanceFunctionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + functionEnvelope, + accept, + context); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FunctionEnvelopeInner> beginCreateInstanceFunctionSlotAsync( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope) { + Mono>> mono = + createInstanceFunctionSlotWithResponseAsync(resourceGroupName, name, functionName, slot, functionEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + FunctionEnvelopeInner.class, + FunctionEnvelopeInner.class, + this.client.getContext()); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, FunctionEnvelopeInner> beginCreateInstanceFunctionSlotAsync( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createInstanceFunctionSlotWithResponseAsync( + resourceGroupName, name, functionName, slot, functionEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), FunctionEnvelopeInner.class, FunctionEnvelopeInner.class, context); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FunctionEnvelopeInner> beginCreateInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope) { + return beginCreateInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope) + .getSyncPoller(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, FunctionEnvelopeInner> beginCreateInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context) { + return beginCreateInstanceFunctionSlotAsync( + resourceGroupName, name, functionName, slot, functionEnvelope, context) + .getSyncPoller(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createInstanceFunctionSlotAsync( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope) { + return beginCreateInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createInstanceFunctionSlotAsync( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context) { + return beginCreateInstanceFunctionSlotAsync( + resourceGroupName, name, functionName, slot, functionEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionEnvelopeInner createInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope) { + return createInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope).block(); + } + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionEnvelopeInner createInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context) { + return createInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope, context) + .block(); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteInstanceFunctionSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteInstanceFunctionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteInstanceFunctionSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteInstanceFunctionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteInstanceFunctionSlotAsync( + String resourceGroupName, String name, String functionName, String slot) { + return deleteInstanceFunctionSlotWithResponseAsync(resourceGroupName, name, functionName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot) { + deleteInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot).block(); + } + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteInstanceFunctionSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context) { + return deleteInstanceFunctionSlotWithResponseAsync(resourceGroupName, name, functionName, slot, context) + .block(); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateFunctionSecretSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (key == null) { + return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null.")); + } else { + key.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateFunctionSecretSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + keyName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + key, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateFunctionSecretSlotWithResponseAsync( + String resourceGroupName, + String name, + String functionName, + String keyName, + String slot, + KeyInfoInner key, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (key == null) { + return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null.")); + } else { + key.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateFunctionSecretSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + keyName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + key, + accept, + context); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateFunctionSecretSlotAsync( + String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key) { + return createOrUpdateFunctionSecretSlotWithResponseAsync( + resourceGroupName, name, functionName, keyName, slot, key) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyInfoInner createOrUpdateFunctionSecretSlot( + String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key) { + return createOrUpdateFunctionSecretSlotAsync(resourceGroupName, name, functionName, keyName, slot, key).block(); + } + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateFunctionSecretSlotWithResponse( + String resourceGroupName, + String name, + String functionName, + String keyName, + String slot, + KeyInfoInner key, + Context context) { + return createOrUpdateFunctionSecretSlotWithResponseAsync( + resourceGroupName, name, functionName, keyName, slot, key, context) + .block(); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteFunctionSecretSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String keyName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteFunctionSecretSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + keyName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteFunctionSecretSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String keyName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteFunctionSecretSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + keyName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteFunctionSecretSlotAsync( + String resourceGroupName, String name, String functionName, String keyName, String slot) { + return deleteFunctionSecretSlotWithResponseAsync(resourceGroupName, name, functionName, keyName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteFunctionSecretSlot( + String resourceGroupName, String name, String functionName, String keyName, String slot) { + deleteFunctionSecretSlotAsync(resourceGroupName, name, functionName, keyName, slot).block(); + } + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteFunctionSecretSlotWithResponse( + String resourceGroupName, String name, String functionName, String keyName, String slot, Context context) { + return deleteFunctionSecretSlotWithResponseAsync(resourceGroupName, name, functionName, keyName, slot, context) + .block(); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionKeysSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listFunctionKeysSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionKeysSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listFunctionKeysSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listFunctionKeysSlotAsync( + String resourceGroupName, String name, String functionName, String slot) { + return listFunctionKeysSlotWithResponseAsync(resourceGroupName, name, functionName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StringDictionaryInner listFunctionKeysSlot( + String resourceGroupName, String name, String functionName, String slot) { + return listFunctionKeysSlotAsync(resourceGroupName, name, functionName, slot).block(); + } + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listFunctionKeysSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context) { + return listFunctionKeysSlotWithResponseAsync(resourceGroupName, name, functionName, slot, context).block(); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionSecretsSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listFunctionSecretsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionSecretsSlotWithResponseAsync( + String resourceGroupName, String name, String functionName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (functionName == null) { + return Mono.error(new IllegalArgumentException("Parameter functionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listFunctionSecretsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + functionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listFunctionSecretsSlotAsync( + String resourceGroupName, String name, String functionName, String slot) { + return listFunctionSecretsSlotWithResponseAsync(resourceGroupName, name, functionName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionSecretsInner listFunctionSecretsSlot( + String resourceGroupName, String name, String functionName, String slot) { + return listFunctionSecretsSlotAsync(resourceGroupName, name, functionName, slot).block(); + } + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listFunctionSecretsSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context) { + return listFunctionSecretsSlotWithResponseAsync(resourceGroupName, name, functionName, slot, context).block(); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostKeysSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listHostKeysSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostKeysSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listHostKeysSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listHostKeysSlotAsync(String resourceGroupName, String name, String slot) { + return listHostKeysSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HostKeysInner listHostKeysSlot(String resourceGroupName, String name, String slot) { + return listHostKeysSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listHostKeysSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listHostKeysSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSyncStatusSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSyncStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSyncStatusSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSyncStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSyncStatusSlotAsync(String resourceGroupName, String name, String slot) { + return listSyncStatusSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 listSyncStatusSlot(String resourceGroupName, String name, String slot) { + listSyncStatusSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSyncStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listSyncStatusSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncFunctionsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .syncFunctionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncFunctionsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .syncFunctionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncFunctionsSlotAsync(String resourceGroupName, String name, String slot) { + return syncFunctionsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 syncFunctionsSlot(String resourceGroupName, String name, String slot) { + syncFunctionsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response syncFunctionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return syncFunctionsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHostSecretSlotWithResponseAsync( + String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (keyType == null) { + return Mono.error(new IllegalArgumentException("Parameter keyType is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (key == null) { + return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null.")); + } else { + key.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateHostSecretSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + keyType, + keyName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + key, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHostSecretSlotWithResponseAsync( + String resourceGroupName, + String name, + String keyType, + String keyName, + String slot, + KeyInfoInner key, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (keyType == null) { + return Mono.error(new IllegalArgumentException("Parameter keyType is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (key == null) { + return Mono.error(new IllegalArgumentException("Parameter key is required and cannot be null.")); + } else { + key.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateHostSecretSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + keyType, + keyName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + key, + accept, + context); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateHostSecretSlotAsync( + String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key) { + return createOrUpdateHostSecretSlotWithResponseAsync(resourceGroupName, name, keyType, keyName, slot, key) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public KeyInfoInner createOrUpdateHostSecretSlot( + String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key) { + return createOrUpdateHostSecretSlotAsync(resourceGroupName, name, keyType, keyName, slot, key).block(); + } + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateHostSecretSlotWithResponse( + String resourceGroupName, + String name, + String keyType, + String keyName, + String slot, + KeyInfoInner key, + Context context) { + return createOrUpdateHostSecretSlotWithResponseAsync( + resourceGroupName, name, keyType, keyName, slot, key, context) + .block(); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHostSecretSlotWithResponseAsync( + String resourceGroupName, String name, String keyType, String keyName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (keyType == null) { + return Mono.error(new IllegalArgumentException("Parameter keyType is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteHostSecretSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + keyType, + keyName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHostSecretSlotWithResponseAsync( + String resourceGroupName, String name, String keyType, String keyName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (keyType == null) { + return Mono.error(new IllegalArgumentException("Parameter keyType is required and cannot be null.")); + } + if (keyName == null) { + return Mono.error(new IllegalArgumentException("Parameter keyName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteHostSecretSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + keyType, + keyName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteHostSecretSlotAsync( + String resourceGroupName, String name, String keyType, String keyName, String slot) { + return deleteHostSecretSlotWithResponseAsync(resourceGroupName, name, keyType, keyName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteHostSecretSlot( + String resourceGroupName, String name, String keyType, String keyName, String slot) { + deleteHostSecretSlotAsync(resourceGroupName, name, keyType, keyName, slot).block(); + } + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteHostSecretSlotWithResponse( + String resourceGroupName, String name, String keyType, String keyName, String slot, Context context) { + return deleteHostSecretSlotWithResponseAsync(resourceGroupName, name, keyType, keyName, slot, context).block(); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostnameBindingsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listHostnameBindingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostnameBindingsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listHostnameBindingsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHostnameBindingsSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listHostnameBindingsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listHostnameBindingsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listHostnameBindingsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listHostnameBindingsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listHostnameBindingsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHostnameBindingsSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listHostnameBindingsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname bindings. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHostnameBindingsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listHostnameBindingsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHostnameBindingSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String hostname) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 + .getHostnameBindingSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHostnameBindingSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String hostname, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 + .getHostnameBindingSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getHostnameBindingSlotAsync( + String resourceGroupName, String name, String slot, String hostname) { + return getHostnameBindingSlotWithResponseAsync(resourceGroupName, name, slot, hostname) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HostnameBindingInner getHostnameBindingSlot( + String resourceGroupName, String name, String slot, String hostname) { + return getHostnameBindingSlotAsync(resourceGroupName, name, slot, hostname).block(); + } + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getHostnameBindingSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context) { + return getHostnameBindingSlotWithResponseAsync(resourceGroupName, name, slot, hostname, context).block(); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHostnameBindingSlotWithResponseAsync( + String resourceGroupName, String name, String hostname, String slot, HostnameBindingInner hostnameBinding) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (hostnameBinding == null) { + return Mono + .error(new IllegalArgumentException("Parameter hostnameBinding is required and cannot be null.")); + } else { + hostnameBinding.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateHostnameBindingSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + hostnameBinding, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHostnameBindingSlotWithResponseAsync( + String resourceGroupName, + String name, + String hostname, + String slot, + HostnameBindingInner hostnameBinding, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (hostnameBinding == null) { + return Mono + .error(new IllegalArgumentException("Parameter hostnameBinding is required and cannot be null.")); + } else { + hostnameBinding.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateHostnameBindingSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + hostname, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + hostnameBinding, + accept, + context); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateHostnameBindingSlotAsync( + String resourceGroupName, String name, String hostname, String slot, HostnameBindingInner hostnameBinding) { + return createOrUpdateHostnameBindingSlotWithResponseAsync( + resourceGroupName, name, hostname, slot, hostnameBinding) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HostnameBindingInner createOrUpdateHostnameBindingSlot( + String resourceGroupName, String name, String hostname, String slot, HostnameBindingInner hostnameBinding) { + return createOrUpdateHostnameBindingSlotAsync(resourceGroupName, name, hostname, slot, hostnameBinding).block(); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 hostname binding object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateHostnameBindingSlotWithResponse( + String resourceGroupName, + String name, + String hostname, + String slot, + HostnameBindingInner hostnameBinding, + Context context) { + return createOrUpdateHostnameBindingSlotWithResponseAsync( + resourceGroupName, name, hostname, slot, hostnameBinding, context) + .block(); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHostnameBindingSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String hostname) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 + .deleteHostnameBindingSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHostnameBindingSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String hostname, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (hostname == null) { + return Mono.error(new IllegalArgumentException("Parameter hostname is required 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 + .deleteHostnameBindingSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + hostname, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteHostnameBindingSlotAsync( + String resourceGroupName, String name, String slot, String hostname) { + return deleteHostnameBindingSlotWithResponseAsync(resourceGroupName, name, slot, hostname) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteHostnameBindingSlot(String resourceGroupName, String name, String slot, String hostname) { + deleteHostnameBindingSlotAsync(resourceGroupName, name, slot, hostname).block(); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteHostnameBindingSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context) { + return deleteHostnameBindingSlotWithResponseAsync(resourceGroupName, name, slot, hostname, context).block(); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHybridConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getHybridConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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 hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getHybridConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getHybridConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getHybridConnectionSlotAsync( + String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return getHybridConnectionSlotWithResponseAsync(resourceGroupName, name, namespaceName, relayName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner getHybridConnectionSlot( + String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return getHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, slot).block(); + } + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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 hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getHybridConnectionSlotWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context) { + return getHybridConnectionSlotWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, slot, context) + .block(); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHybridConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateHybridConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateHybridConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateHybridConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateHybridConnectionSlotAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionSlotWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner createOrUpdateHybridConnectionSlot( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope) { + return createOrUpdateHybridConnectionSlotAsync( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateHybridConnectionSlotWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context) { + return createOrUpdateHybridConnectionSlotWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHybridConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteHybridConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteHybridConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteHybridConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteHybridConnectionSlotAsync( + String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + return deleteHybridConnectionSlotWithResponseAsync(resourceGroupName, name, namespaceName, relayName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteHybridConnectionSlot( + String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + deleteHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, slot).block(); + } + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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 response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteHybridConnectionSlotWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context) { + return deleteHybridConnectionSlotWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, slot, context) + .block(); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateHybridConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateHybridConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateHybridConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (namespaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter namespaceName is required and cannot be null.")); + } + if (relayName == null) { + return Mono.error(new IllegalArgumentException("Parameter relayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateHybridConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + namespaceName, + relayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateHybridConnectionSlotAsync( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionSlotWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner updateHybridConnectionSlot( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope) { + return updateHybridConnectionSlotAsync( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateHybridConnectionSlotWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context) { + return updateHybridConnectionSlotWithResponseAsync( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listHybridConnectionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web 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 hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHybridConnectionsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listHybridConnectionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listHybridConnectionsSlotAsync( + String resourceGroupName, String name, String slot) { + return listHybridConnectionsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public HybridConnectionInner listHybridConnectionsSlot(String resourceGroupName, String name, String slot) { + return listHybridConnectionsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web 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 hybrid Connection contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listHybridConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listHybridConnectionsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRelayServiceConnectionsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listRelayServiceConnectionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRelayServiceConnectionsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listRelayServiceConnectionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listRelayServiceConnectionsSlotAsync( + String resourceGroupName, String name, String slot) { + return listRelayServiceConnectionsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RelayServiceConnectionEntityInner listRelayServiceConnectionsSlot( + String resourceGroupName, String name, String slot) { + return listRelayServiceConnectionsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listRelayServiceConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listRelayServiceConnectionsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRelayServiceConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String entityName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getRelayServiceConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getRelayServiceConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String entityName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getRelayServiceConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getRelayServiceConnectionSlotAsync( + String resourceGroupName, String name, String entityName, String slot) { + return getRelayServiceConnectionSlotWithResponseAsync(resourceGroupName, name, entityName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RelayServiceConnectionEntityInner getRelayServiceConnectionSlot( + String resourceGroupName, String name, String entityName, String slot) { + return getRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot).block(); + } + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRelayServiceConnectionSlotWithResponse( + String resourceGroupName, String name, String entityName, String slot, Context context) { + return getRelayServiceConnectionSlotWithResponseAsync(resourceGroupName, name, entityName, slot, context) + .block(); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateRelayServiceConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateRelayServiceConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateRelayServiceConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateRelayServiceConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateRelayServiceConnectionSlotAsync( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionSlotWithResponseAsync( + resourceGroupName, name, entityName, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RelayServiceConnectionEntityInner createOrUpdateRelayServiceConnectionSlot( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope) { + return createOrUpdateRelayServiceConnectionSlotAsync( + resourceGroupName, name, entityName, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateRelayServiceConnectionSlotWithResponse( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + return createOrUpdateRelayServiceConnectionSlotWithResponseAsync( + resourceGroupName, name, entityName, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteRelayServiceConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String entityName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteRelayServiceConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteRelayServiceConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String entityName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteRelayServiceConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteRelayServiceConnectionSlotAsync( + String resourceGroupName, String name, String entityName, String slot) { + return deleteRelayServiceConnectionSlotWithResponseAsync(resourceGroupName, name, entityName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteRelayServiceConnectionSlot( + String resourceGroupName, String name, String entityName, String slot) { + deleteRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot).block(); + } + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteRelayServiceConnectionSlotWithResponse( + String resourceGroupName, String name, String entityName, String slot, Context context) { + return deleteRelayServiceConnectionSlotWithResponseAsync(resourceGroupName, name, entityName, slot, context) + .block(); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateRelayServiceConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateRelayServiceConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateRelayServiceConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (entityName == null) { + return Mono.error(new IllegalArgumentException("Parameter entityName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateRelayServiceConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + entityName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateRelayServiceConnectionSlotAsync( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionSlotWithResponseAsync( + resourceGroupName, name, entityName, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RelayServiceConnectionEntityInner updateRelayServiceConnectionSlot( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope) { + return updateRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateRelayServiceConnectionSlotWithResponse( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + return updateRelayServiceConnectionSlotWithResponseAsync( + resourceGroupName, name, entityName, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app instances. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceIdentifiersSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listInstanceIdentifiersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app instances. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceIdentifiersSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listInstanceIdentifiersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceIdentifiersSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listInstanceIdentifiersSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceIdentifiersSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listInstanceIdentifiersSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceIdentifiersSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listInstanceIdentifiersSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 app instances. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceIdentifiersSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listInstanceIdentifiersSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceInfoSlotWithResponseAsync( + String resourceGroupName, String name, String instanceId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getInstanceInfoSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceInfoSlotWithResponseAsync( + String resourceGroupName, String name, String instanceId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getInstanceInfoSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + instanceId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceInfoSlotAsync( + String resourceGroupName, String name, String instanceId, String slot) { + return getInstanceInfoSlotWithResponseAsync(resourceGroupName, name, instanceId, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebSiteInstanceStatusInner getInstanceInfoSlot( + String resourceGroupName, String name, String instanceId, String slot) { + return getInstanceInfoSlotAsync(resourceGroupName, name, instanceId, slot).block(); + } + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceInfoSlotWithResponse( + String resourceGroupName, String name, String instanceId, String slot, Context context) { + return getInstanceInfoSlotWithResponseAsync(resourceGroupName, name, instanceId, slot, context).block(); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceMsDeployStatusSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceMsDeployStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceMsDeployStatusSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceMsDeployStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceMsDeployStatusSlotAsync( + String resourceGroupName, String name, String slot, String instanceId) { + return getInstanceMsDeployStatusSlotWithResponseAsync(resourceGroupName, name, slot, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner getInstanceMsDeployStatusSlot( + String resourceGroupName, String name, String slot, String instanceId) { + return getInstanceMsDeployStatusSlotAsync(resourceGroupName, name, slot, instanceId).block(); + } + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceMsDeployStatusSlotWithResponse( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + return getInstanceMsDeployStatusSlotWithResponseAsync(resourceGroupName, name, slot, instanceId, context) + .block(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createInstanceMSDeployOperationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 (mSDeploy == null) { + return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); + } else { + mSDeploy.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createInstanceMSDeployOperationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + mSDeploy, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createInstanceMSDeployOperationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 (mSDeploy == null) { + return Mono.error(new IllegalArgumentException("Parameter mSDeploy is required and cannot be null.")); + } else { + mSDeploy.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createInstanceMSDeployOperationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + mSDeploy, + accept, + context); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MSDeployStatusInner> + beginCreateInstanceMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + Mono>> mono = + createInstanceMSDeployOperationSlotWithResponseAsync(resourceGroupName, name, slot, instanceId, mSDeploy); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + MSDeployStatusInner.class, + MSDeployStatusInner.class, + this.client.getContext()); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, MSDeployStatusInner> + beginCreateInstanceMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createInstanceMSDeployOperationSlotWithResponseAsync( + resourceGroupName, name, slot, instanceId, mSDeploy, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), MSDeployStatusInner.class, MSDeployStatusInner.class, context); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + return beginCreateInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy) + .getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, MSDeployStatusInner> beginCreateInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { + return beginCreateInstanceMSDeployOperationSlotAsync( + resourceGroupName, name, slot, instanceId, mSDeploy, context) + .getSyncPoller(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createInstanceMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + return beginCreateInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createInstanceMSDeployOperationSlotAsync( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { + return beginCreateInstanceMSDeployOperationSlotAsync( + resourceGroupName, name, slot, instanceId, mSDeploy, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + return createInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy).block(); + } + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployStatusInner createInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { + return createInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy, context) + .block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceMSDeployLogSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceMSDeployLogSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceMSDeployLogSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceMSDeployLogSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceMSDeployLogSlotAsync( + String resourceGroupName, String name, String slot, String instanceId) { + return getInstanceMSDeployLogSlotWithResponseAsync(resourceGroupName, name, slot, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MSDeployLogInner getInstanceMSDeployLogSlot( + String resourceGroupName, String name, String slot, String instanceId) { + return getInstanceMSDeployLogSlotAsync(resourceGroupName, name, slot, instanceId).block(); + } + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceMSDeployLogSlotWithResponse( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + return getInstanceMSDeployLogSlotWithResponseAsync(resourceGroupName, name, slot, instanceId, context).block(); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + instanceId, + 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())); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + instanceId, + 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)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessesSlotAsync( + String resourceGroupName, String name, String slot, String instanceId) { + return new PagedFlux<>( + () -> listInstanceProcessesSlotSinglePageAsync(resourceGroupName, name, slot, instanceId), + nextLink -> listInstanceProcessesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessesSlotAsync( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + return new PagedFlux<>( + () -> listInstanceProcessesSlotSinglePageAsync(resourceGroupName, name, slot, instanceId, context), + nextLink -> listInstanceProcessesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessesSlot( + String resourceGroupName, String name, String slot, String instanceId) { + return new PagedIterable<>(listInstanceProcessesSlotAsync(resourceGroupName, name, slot, instanceId)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessesSlot( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + return new PagedIterable<>(listInstanceProcessesSlotAsync(resourceGroupName, name, slot, instanceId, context)); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceProcessSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceProcessSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceProcessSlotAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return getInstanceProcessSlotWithResponseAsync(resourceGroupName, name, processId, slot, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProcessInfoInner getInstanceProcessSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return getInstanceProcessSlotAsync(resourceGroupName, name, processId, slot, instanceId).block(); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return getInstanceProcessSlotWithResponseAsync(resourceGroupName, name, processId, slot, instanceId, context) + .block(); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteInstanceProcessSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .deleteInstanceProcessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteInstanceProcessSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .deleteInstanceProcessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteInstanceProcessSlotAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return deleteInstanceProcessSlotWithResponseAsync(resourceGroupName, name, processId, slot, instanceId) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteInstanceProcessSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + deleteInstanceProcessSlotAsync(resourceGroupName, name, processId, slot, instanceId).block(); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteInstanceProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return deleteInstanceProcessSlotWithResponseAsync(resourceGroupName, name, processId, slot, instanceId, context) + .block(); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceProcessDumpSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessDumpSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceProcessDumpSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessDumpSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux getInstanceProcessDumpSlotAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return getInstanceProcessDumpSlotWithResponseAsync(resourceGroupName, name, processId, slot, instanceId) + .flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream getInstanceProcessDumpSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + Iterator iterator = + getInstanceProcessDumpSlotAsync(resourceGroupName, name, processId, slot, instanceId) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse getInstanceProcessDumpSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return getInstanceProcessDumpSlotWithResponseAsync( + resourceGroupName, name, processId, slot, instanceId, context) + .block(); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessModulesSlotSinglePageAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessModulesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + 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())); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessModulesSlotSinglePageAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessModulesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + 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)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessModulesSlotAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return new PagedFlux<>( + () -> listInstanceProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot, instanceId), + nextLink -> listInstanceProcessModulesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessModulesSlotAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return new PagedFlux<>( + () -> + listInstanceProcessModulesSlotSinglePageAsync( + resourceGroupName, name, processId, slot, instanceId, context), + nextLink -> listInstanceProcessModulesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return new PagedIterable<>( + listInstanceProcessModulesSlotAsync(resourceGroupName, name, processId, slot, instanceId)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return new PagedIterable<>( + listInstanceProcessModulesSlotAsync(resourceGroupName, name, processId, slot, instanceId, context)); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceProcessModuleSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (baseAddress == null) { + return Mono.error(new IllegalArgumentException("Parameter baseAddress is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessModuleSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + baseAddress, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getInstanceProcessModuleSlotWithResponseAsync( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String slot, + String instanceId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (baseAddress == null) { + return Mono.error(new IllegalArgumentException("Parameter baseAddress is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .getInstanceProcessModuleSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + baseAddress, + slot, + instanceId, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getInstanceProcessModuleSlotAsync( + String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId) { + return getInstanceProcessModuleSlotWithResponseAsync( + resourceGroupName, name, processId, baseAddress, slot, instanceId) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProcessModuleInfoInner getInstanceProcessModuleSlot( + String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId) { + return getInstanceProcessModuleSlotAsync(resourceGroupName, name, processId, baseAddress, slot, instanceId) + .block(); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getInstanceProcessModuleSlotWithResponse( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String slot, + String instanceId, + Context context) { + return getInstanceProcessModuleSlotWithResponseAsync( + resourceGroupName, name, processId, baseAddress, slot, instanceId, context) + .block(); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessThreadsSlotSinglePageAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessThreadsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + 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())); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessThreadsSlotSinglePageAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (instanceId == null) { + return Mono.error(new IllegalArgumentException("Parameter instanceId is required 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 + .listInstanceProcessThreadsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + instanceId, + 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)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessThreadsSlotAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return new PagedFlux<>( + () -> listInstanceProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot, instanceId), + nextLink -> listInstanceProcessThreadsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listInstanceProcessThreadsSlotAsync( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return new PagedFlux<>( + () -> + listInstanceProcessThreadsSlotSinglePageAsync( + resourceGroupName, name, processId, slot, instanceId, context), + nextLink -> listInstanceProcessThreadsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return new PagedIterable<>( + listInstanceProcessThreadsSlotAsync(resourceGroupName, name, processId, slot, instanceId)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listInstanceProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return new PagedIterable<>( + listInstanceProcessThreadsSlotAsync(resourceGroupName, name, processId, slot, instanceId, context)); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> isCloneableSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .isCloneableSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> isCloneableSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .isCloneableSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono isCloneableSlotAsync(String resourceGroupName, String name, String slot) { + return isCloneableSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteCloneabilityInner isCloneableSlot(String resourceGroupName, String name, String slot) { + return isCloneableSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response isCloneableSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return isCloneableSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteBackupsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteBackupsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteBackupsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteBackupsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteBackupsSlotAsync(String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listSiteBackupsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteBackupsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listSiteBackupsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteBackupsSlot(String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listSiteBackupsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 backup items. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteBackupsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listSiteBackupsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSyncFunctionTriggersSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSyncFunctionTriggersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSyncFunctionTriggersSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSyncFunctionTriggersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listSyncFunctionTriggersSlotAsync( + String resourceGroupName, String name, String slot) { + return listSyncFunctionTriggersSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public FunctionSecretsInner listSyncFunctionTriggersSlot(String resourceGroupName, String name, String slot) { + return listSyncFunctionTriggersSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSyncFunctionTriggersSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listSyncFunctionTriggersSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMigrateMySqlStatusSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getMigrateMySqlStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getMigrateMySqlStatusSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getMigrateMySqlStatusSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getMigrateMySqlStatusSlotAsync( + String resourceGroupName, String name, String slot) { + return getMigrateMySqlStatusSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public MigrateMySqlStatusInner getMigrateMySqlStatusSlot(String resourceGroupName, String name, String slot) { + return getMigrateMySqlStatusSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getMigrateMySqlStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getMigrateMySqlStatusSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSwiftVirtualNetworkConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSwiftVirtualNetworkConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSwiftVirtualNetworkConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSwiftVirtualNetworkConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSwiftVirtualNetworkConnectionSlotAsync( + String resourceGroupName, String name, String slot) { + return getSwiftVirtualNetworkConnectionSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SwiftVirtualNetworkInner getSwiftVirtualNetworkConnectionSlot( + String resourceGroupName, String name, String slot) { + return getSwiftVirtualNetworkConnectionSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSwiftVirtualNetworkConnectionSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getSwiftVirtualNetworkConnectionSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + return createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponseAsync( + resourceGroupName, name, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SwiftVirtualNetworkInner createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + return createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync( + resourceGroupName, name, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context) { + return createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponseAsync( + resourceGroupName, name, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSwiftVirtualNetworkSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteSwiftVirtualNetworkSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSwiftVirtualNetworkSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteSwiftVirtualNetworkSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSwiftVirtualNetworkSlotAsync(String resourceGroupName, String name, String slot) { + return deleteSwiftVirtualNetworkSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSwiftVirtualNetworkSlot(String resourceGroupName, String name, String slot) { + deleteSwiftVirtualNetworkSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSwiftVirtualNetworkSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return deleteSwiftVirtualNetworkSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSwiftVirtualNetworkConnectionWithCheckSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSwiftVirtualNetworkConnectionWithCheckSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSwiftVirtualNetworkConnectionWithCheckSlotAsync( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + return updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponseAsync( + resourceGroupName, name, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SwiftVirtualNetworkInner updateSwiftVirtualNetworkConnectionWithCheckSlot( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + return updateSwiftVirtualNetworkConnectionWithCheckSlotAsync(resourceGroupName, name, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context) { + return updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponseAsync( + resourceGroupName, name, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNetworkFeaturesSlotWithResponseAsync( + String resourceGroupName, String name, String view, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (view == null) { + return Mono.error(new IllegalArgumentException("Parameter view is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listNetworkFeaturesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + view, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNetworkFeaturesSlotWithResponseAsync( + String resourceGroupName, String name, String view, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (view == null) { + return Mono.error(new IllegalArgumentException("Parameter view is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listNetworkFeaturesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + view, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listNetworkFeaturesSlotAsync( + String resourceGroupName, String name, String view, String slot) { + return listNetworkFeaturesSlotWithResponseAsync(resourceGroupName, name, view, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkFeaturesInner listNetworkFeaturesSlot( + String resourceGroupName, String name, String view, String slot) { + return listNetworkFeaturesSlotAsync(resourceGroupName, name, view, slot).block(); + } + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listNetworkFeaturesSlotWithResponse( + String resourceGroupName, String name, String view, String slot, Context context) { + return listNetworkFeaturesSlotWithResponseAsync(resourceGroupName, name, view, slot, context).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTraceOperationSlotWithResponseAsync( + String resourceGroupName, String name, String operationId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getNetworkTraceOperationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTraceOperationSlotWithResponseAsync( + String resourceGroupName, String name, String operationId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getNetworkTraceOperationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getNetworkTraceOperationSlotAsync( + String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTraceOperationSlotWithResponseAsync(resourceGroupName, name, operationId, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object getNetworkTraceOperationSlot(String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTraceOperationSlotAsync(resourceGroupName, name, operationId, slot).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getNetworkTraceOperationSlotWithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context) { + return getNetworkTraceOperationSlotWithResponseAsync(resourceGroupName, name, operationId, slot, context) + .block(); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startWebSiteNetworkTraceSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startWebSiteNetworkTraceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + slot, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startWebSiteNetworkTraceSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startWebSiteNetworkTraceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + slot, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return startWebSiteNetworkTraceSlotWithResponseAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return startWebSiteNetworkTraceSlotWithResponseAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String startWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return startWebSiteNetworkTraceSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .block(); + } + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startWebSiteNetworkTraceSlotWithResponse( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return startWebSiteNetworkTraceSlotWithResponseAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWebSiteNetworkTraceOperationSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startWebSiteNetworkTraceOperationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + slot, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startWebSiteNetworkTraceOperationSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startWebSiteNetworkTraceOperationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + slot, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginStartWebSiteNetworkTraceOperationSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + Mono>> mono = + startWebSiteNetworkTraceOperationSlotWithResponseAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Object.class, Object.class, this.client.getContext()); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginStartWebSiteNetworkTraceOperationSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + startWebSiteNetworkTraceOperationSlotWithResponseAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Object.class, Object.class, context); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginStartWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginStartWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceOperationSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceOperationSlotAsync( + String resourceGroupName, String name, String slot) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startWebSiteNetworkTraceOperationSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return startWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startWebSiteNetworkTraceOperationSlot(String resourceGroupName, String name, String slot) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return startWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return startWebSiteNetworkTraceOperationSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .block(); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWebSiteNetworkTraceSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .stopWebSiteNetworkTraceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWebSiteNetworkTraceSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .stopWebSiteNetworkTraceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopWebSiteNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return stopWebSiteNetworkTraceSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + stopWebSiteNetworkTraceSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopWebSiteNetworkTraceSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return stopWebSiteNetworkTraceSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getNetworkTracesSlotWithResponseAsync( + String resourceGroupName, String name, String operationId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getNetworkTracesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getNetworkTracesSlotWithResponseAsync( + String resourceGroupName, String name, String operationId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getNetworkTracesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTracesSlotAsync( + String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTracesSlotWithResponseAsync(resourceGroupName, name, operationId, slot) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List getNetworkTracesSlot( + String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTracesSlotAsync(resourceGroupName, name, operationId, slot).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> getNetworkTracesSlotWithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context) { + return getNetworkTracesSlotWithResponseAsync(resourceGroupName, name, operationId, slot, context).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTraceOperationSlotV2WithResponseAsync( + String resourceGroupName, String name, String operationId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getNetworkTraceOperationSlotV2( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTraceOperationSlotV2WithResponseAsync( + String resourceGroupName, String name, String operationId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getNetworkTraceOperationSlotV2( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getNetworkTraceOperationSlotV2Async( + String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTraceOperationSlotV2WithResponseAsync(resourceGroupName, name, operationId, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object getNetworkTraceOperationSlotV2( + String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTraceOperationSlotV2Async(resourceGroupName, name, operationId, slot).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getNetworkTraceOperationSlotV2WithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context) { + return getNetworkTraceOperationSlotV2WithResponseAsync(resourceGroupName, name, operationId, slot, context) + .block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getNetworkTracesSlotV2WithResponseAsync( + String resourceGroupName, String name, String operationId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getNetworkTracesSlotV2( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getNetworkTracesSlotV2WithResponseAsync( + String resourceGroupName, String name, String operationId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getNetworkTracesSlotV2( + this.client.getEndpoint(), + resourceGroupName, + name, + operationId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNetworkTracesSlotV2Async( + String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTracesSlotV2WithResponseAsync(resourceGroupName, name, operationId, slot) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List getNetworkTracesSlotV2( + String resourceGroupName, String name, String operationId, String slot) { + return getNetworkTracesSlotV2Async(resourceGroupName, name, operationId, slot).block(); + } + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> getNetworkTracesSlotV2WithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context) { + return getNetworkTracesSlotV2WithResponseAsync(resourceGroupName, name, operationId, slot, context).block(); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateNewSitePublishingPasswordSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .generateNewSitePublishingPasswordSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> generateNewSitePublishingPasswordSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .generateNewSitePublishingPasswordSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono generateNewSitePublishingPasswordSlotAsync(String resourceGroupName, String name, String slot) { + return generateNewSitePublishingPasswordSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 generateNewSitePublishingPasswordSlot(String resourceGroupName, String name, String slot) { + generateNewSitePublishingPasswordSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response generateNewSitePublishingPasswordSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return generateNewSitePublishingPasswordSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPerfMonCountersSlotSinglePageAsync( + String resourceGroupName, String name, String slot, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listPerfMonCountersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPerfMonCountersSlotSinglePageAsync( + String resourceGroupName, String name, String slot, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listPerfMonCountersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPerfMonCountersSlotAsync( + String resourceGroupName, String name, String slot, String filter) { + return new PagedFlux<>( + () -> listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot, filter), + nextLink -> listPerfMonCountersSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPerfMonCountersSlotAsync( + String resourceGroupName, String name, String slot) { + final String filter = null; + return new PagedFlux<>( + () -> listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot, filter), + nextLink -> listPerfMonCountersSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPerfMonCountersSlotAsync( + String resourceGroupName, String name, String slot, String filter, Context context) { + return new PagedFlux<>( + () -> listPerfMonCountersSlotSinglePageAsync(resourceGroupName, name, slot, filter, context), + nextLink -> listPerfMonCountersSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPerfMonCountersSlot( + String resourceGroupName, String name, String slot) { + final String filter = null; + return new PagedIterable<>(listPerfMonCountersSlotAsync(resourceGroupName, name, slot, filter)); + } + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPerfMonCountersSlot( + String resourceGroupName, String name, String slot, String filter, Context context) { + return new PagedIterable<>(listPerfMonCountersSlotAsync(resourceGroupName, name, slot, filter, context)); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSitePhpErrorLogFlagSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSitePhpErrorLogFlagSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSitePhpErrorLogFlagSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSitePhpErrorLogFlagSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSitePhpErrorLogFlagSlotAsync( + String resourceGroupName, String name, String slot) { + return getSitePhpErrorLogFlagSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SitePhpErrorLogFlagInner getSitePhpErrorLogFlagSlot(String resourceGroupName, String name, String slot) { + return getSitePhpErrorLogFlagSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSitePhpErrorLogFlagSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getSitePhpErrorLogFlagSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPremierAddOnsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listPremierAddOnsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPremierAddOnsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listPremierAddOnsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPremierAddOnsSlotAsync(String resourceGroupName, String name, String slot) { + return listPremierAddOnsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PremierAddOnInner listPremierAddOnsSlot(String resourceGroupName, String name, String slot) { + return listPremierAddOnsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listPremierAddOnsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listPremierAddOnsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPremierAddOnSlotWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPremierAddOnSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPremierAddOnSlotWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPremierAddOnSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPremierAddOnSlotAsync( + String resourceGroupName, String name, String premierAddOnName, String slot) { + return getPremierAddOnSlotWithResponseAsync(resourceGroupName, name, premierAddOnName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PremierAddOnInner getPremierAddOnSlot( + String resourceGroupName, String name, String premierAddOnName, String slot) { + return getPremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot).block(); + } + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPremierAddOnSlotWithResponse( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context) { + return getPremierAddOnSlotWithResponseAsync(resourceGroupName, name, premierAddOnName, slot, context).block(); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addPremierAddOnSlotWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (premierAddOn == null) { + return Mono.error(new IllegalArgumentException("Parameter premierAddOn is required and cannot be null.")); + } else { + premierAddOn.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .addPremierAddOnSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + premierAddOn, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> addPremierAddOnSlotWithResponseAsync( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnInner premierAddOn, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (premierAddOn == null) { + return Mono.error(new IllegalArgumentException("Parameter premierAddOn is required and cannot be null.")); + } else { + premierAddOn.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .addPremierAddOnSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + premierAddOn, + accept, + context); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono addPremierAddOnSlotAsync( + String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn) { + return addPremierAddOnSlotWithResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PremierAddOnInner addPremierAddOnSlot( + String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn) { + return addPremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn).block(); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response addPremierAddOnSlotWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnInner premierAddOn, + Context context) { + return addPremierAddOnSlotWithResponseAsync( + resourceGroupName, name, premierAddOnName, slot, premierAddOn, context) + .block(); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deletePremierAddOnSlotWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deletePremierAddOnSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deletePremierAddOnSlotWithResponseAsync( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deletePremierAddOnSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePremierAddOnSlotAsync( + String resourceGroupName, String name, String premierAddOnName, String slot) { + return deletePremierAddOnSlotWithResponseAsync(resourceGroupName, name, premierAddOnName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deletePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot) { + deletePremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot).block(); + } + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deletePremierAddOnSlotWithResponse( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context) { + return deletePremierAddOnSlotWithResponseAsync(resourceGroupName, name, premierAddOnName, slot, context) + .block(); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updatePremierAddOnSlotWithResponseAsync( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (premierAddOn == null) { + return Mono.error(new IllegalArgumentException("Parameter premierAddOn is required and cannot be null.")); + } else { + premierAddOn.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updatePremierAddOnSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + premierAddOn, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updatePremierAddOnSlotWithResponseAsync( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (premierAddOnName == null) { + return Mono + .error(new IllegalArgumentException("Parameter premierAddOnName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (premierAddOn == null) { + return Mono.error(new IllegalArgumentException("Parameter premierAddOn is required and cannot be null.")); + } else { + premierAddOn.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updatePremierAddOnSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + premierAddOnName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + premierAddOn, + accept, + context); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updatePremierAddOnSlotAsync( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn) { + return updatePremierAddOnSlotWithResponseAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PremierAddOnInner updatePremierAddOnSlot( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn) { + return updatePremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot, premierAddOn).block(); + } + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updatePremierAddOnSlotWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn, + Context context) { + return updatePremierAddOnSlotWithResponseAsync( + resourceGroupName, name, premierAddOnName, slot, premierAddOn, context) + .block(); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateAccessSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPrivateAccessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web 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 description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateAccessSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPrivateAccessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateAccessSlotAsync(String resourceGroupName, String name, String slot) { + return getPrivateAccessSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner getPrivateAccessSlot(String resourceGroupName, String name, String slot) { + return getPrivateAccessSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web 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 description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateAccessSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getPrivateAccessSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putPrivateAccessVnetSlotWithResponseAsync( + String resourceGroupName, String name, String slot, PrivateAccessInner access) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (access == null) { + return Mono.error(new IllegalArgumentException("Parameter access is required and cannot be null.")); + } else { + access.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .putPrivateAccessVnetSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + access, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> putPrivateAccessVnetSlotWithResponseAsync( + String resourceGroupName, String name, String slot, PrivateAccessInner access, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (access == null) { + return Mono.error(new IllegalArgumentException("Parameter access is required and cannot be null.")); + } else { + access.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .putPrivateAccessVnetSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + access, + accept, + context); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono putPrivateAccessVnetSlotAsync( + String resourceGroupName, String name, String slot, PrivateAccessInner access) { + return putPrivateAccessVnetSlotWithResponseAsync(resourceGroupName, name, slot, access) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateAccessInner putPrivateAccessVnetSlot( + String resourceGroupName, String name, String slot, PrivateAccessInner access) { + return putPrivateAccessVnetSlotAsync(resourceGroupName, name, slot, access).block(); + } + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response putPrivateAccessVnetSlotWithResponse( + String resourceGroupName, String name, String slot, PrivateAccessInner access, Context context) { + return putPrivateAccessVnetSlotWithResponseAsync(resourceGroupName, name, slot, access, context).block(); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSlotSinglePageAsync(String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPrivateEndpointConnectionListSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPrivateEndpointConnectionListSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getPrivateEndpointConnectionListSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> getPrivateEndpointConnectionListSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> getPrivateEndpointConnectionListSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getPrivateEndpointConnectionListSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> getPrivateEndpointConnectionListSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> getPrivateEndpointConnectionListSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getPrivateEndpointConnectionListSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(getPrivateEndpointConnectionListSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getPrivateEndpointConnectionListSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(getPrivateEndpointConnectionListSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPrivateEndpointConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPrivateEndpointConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateEndpointConnectionSlotAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + return getPrivateEndpointConnectionSlotWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner getPrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + return getPrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, slot) + .block(); + } + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateEndpointConnectionSlotWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + return getPrivateEndpointConnectionSlotWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, context) + .block(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveOrRejectPrivateEndpointConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (privateEndpointWrapper == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); + } else { + privateEndpointWrapper.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .approveOrRejectPrivateEndpointConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + privateEndpointWrapper, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> approveOrRejectPrivateEndpointConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (privateEndpointWrapper == null) { + return Mono + .error( + new IllegalArgumentException("Parameter privateEndpointWrapper is required and cannot be null.")); + } else { + privateEndpointWrapper.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .approveOrRejectPrivateEndpointConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + privateEndpointWrapper, + accept, + context); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionSlotAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + Mono>> mono = + approveOrRejectPrivateEndpointConnectionSlotWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + RemotePrivateEndpointConnectionArmResourceInner.class, + RemotePrivateEndpointConnectionArmResourceInner.class, + this.client.getContext()); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionSlotAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + approveOrRejectPrivateEndpointConnectionSlotWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, context); + return this + .client + . + getLroResult( + mono, + this.client.getHttpPipeline(), + RemotePrivateEndpointConnectionArmResourceInner.class, + RemotePrivateEndpointConnectionArmResourceInner.class, + context); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller< + PollResult, + RemotePrivateEndpointConnectionArmResourceInner> + beginApproveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, context) + .getSyncPoller(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveOrRejectPrivateEndpointConnectionSlotAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return beginApproveOrRejectPrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono approveOrRejectPrivateEndpointConnectionSlotAsync( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return beginApproveOrRejectPrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + return approveOrRejectPrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper) + .block(); + } + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RemotePrivateEndpointConnectionArmResourceInner approveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + return approveOrRejectPrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, context) + .block(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePrivateEndpointConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deletePrivateEndpointConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deletePrivateEndpointConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (privateEndpointConnectionName == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deletePrivateEndpointConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + privateEndpointConnectionName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginDeletePrivateEndpointConnectionSlotAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + Mono>> mono = + deletePrivateEndpointConnectionSlotWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, slot); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Object.class, Object.class, this.client.getContext()); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginDeletePrivateEndpointConnectionSlotAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deletePrivateEndpointConnectionSlotWithResponseAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Object.class, Object.class, context); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginDeletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + return beginDeletePrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginDeletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + return beginDeletePrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, context) + .getSyncPoller(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePrivateEndpointConnectionSlotAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + return beginDeletePrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePrivateEndpointConnectionSlotAsync( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + return beginDeletePrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object deletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + return deletePrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, slot) + .block(); + } + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot 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 any object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object deletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + return deletePrivateEndpointConnectionSlotAsync( + resourceGroupName, name, privateEndpointConnectionName, slot, context) + .block(); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourcesSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPrivateLinkResourcesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPrivateLinkResourcesSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getPrivateLinkResourcesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPrivateLinkResourcesSlotAsync( + String resourceGroupName, String name, String slot) { + return getPrivateLinkResourcesSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourcesWrapperInner getPrivateLinkResourcesSlot( + String resourceGroupName, String name, String slot) { + return getPrivateLinkResourcesSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot 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 wrapper for a collection of private link resources. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPrivateLinkResourcesSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getPrivateLinkResourcesSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessesSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listProcessesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listProcessesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessesSlotAsync(String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listProcessesSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listProcessesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessesSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listProcessesSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listProcessesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessesSlot(String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listProcessesSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessesSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listProcessesSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getProcessSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getProcessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getProcessSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getProcessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getProcessSlotAsync( + String resourceGroupName, String name, String processId, String slot) { + return getProcessSlotWithResponseAsync(resourceGroupName, name, processId, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProcessInfoInner getProcessSlot(String resourceGroupName, String name, String processId, String slot) { + return getProcessSlotAsync(resourceGroupName, name, processId, slot).block(); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context) { + return getProcessSlotWithResponseAsync(resourceGroupName, name, processId, slot, context).block(); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteProcessSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteProcessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteProcessSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteProcessSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteProcessSlotAsync(String resourceGroupName, String name, String processId, String slot) { + return deleteProcessSlotWithResponseAsync(resourceGroupName, name, processId, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteProcessSlot(String resourceGroupName, String name, String processId, String slot) { + deleteProcessSlotAsync(resourceGroupName, name, processId, slot).block(); + } + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context) { + return deleteProcessSlotWithResponseAsync(resourceGroupName, name, processId, slot, context).block(); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getProcessDumpSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getProcessDumpSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getProcessDumpSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getProcessDumpSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux getProcessDumpSlotAsync( + String resourceGroupName, String name, String processId, String slot) { + return getProcessDumpSlotWithResponseAsync(resourceGroupName, name, processId, slot) + .flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream getProcessDumpSlot(String resourceGroupName, String name, String processId, String slot) { + Iterator iterator = + getProcessDumpSlotAsync(resourceGroupName, name, processId, slot) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse getProcessDumpSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context) { + return getProcessDumpSlotWithResponseAsync(resourceGroupName, name, processId, slot, context).block(); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessModulesSlotSinglePageAsync( + String resourceGroupName, String name, String processId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listProcessModulesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + 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())); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessModulesSlotSinglePageAsync( + String resourceGroupName, String name, String processId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listProcessModulesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + 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)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessModulesSlotAsync( + String resourceGroupName, String name, String processId, String slot) { + return new PagedFlux<>( + () -> listProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot), + nextLink -> listProcessModulesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessModulesSlotAsync( + String resourceGroupName, String name, String processId, String slot, Context context) { + return new PagedFlux<>( + () -> listProcessModulesSlotSinglePageAsync(resourceGroupName, name, processId, slot, context), + nextLink -> listProcessModulesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot) { + return new PagedIterable<>(listProcessModulesSlotAsync(resourceGroupName, name, processId, slot)); + } + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, Context context) { + return new PagedIterable<>(listProcessModulesSlotAsync(resourceGroupName, name, processId, slot, context)); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getProcessModuleSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String baseAddress, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (baseAddress == null) { + return Mono.error(new IllegalArgumentException("Parameter baseAddress is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getProcessModuleSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + baseAddress, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getProcessModuleSlotWithResponseAsync( + String resourceGroupName, String name, String processId, String baseAddress, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (baseAddress == null) { + return Mono.error(new IllegalArgumentException("Parameter baseAddress is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getProcessModuleSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + baseAddress, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getProcessModuleSlotAsync( + String resourceGroupName, String name, String processId, String baseAddress, String slot) { + return getProcessModuleSlotWithResponseAsync(resourceGroupName, name, processId, baseAddress, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ProcessModuleInfoInner getProcessModuleSlot( + String resourceGroupName, String name, String processId, String baseAddress, String slot) { + return getProcessModuleSlotAsync(resourceGroupName, name, processId, baseAddress, slot).block(); + } + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Module Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getProcessModuleSlotWithResponse( + String resourceGroupName, String name, String processId, String baseAddress, String slot, Context context) { + return getProcessModuleSlotWithResponseAsync(resourceGroupName, name, processId, baseAddress, slot, context) + .block(); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessThreadsSlotSinglePageAsync( + String resourceGroupName, String name, String processId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listProcessThreadsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + 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())); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessThreadsSlotSinglePageAsync( + String resourceGroupName, String name, String processId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (processId == null) { + return Mono.error(new IllegalArgumentException("Parameter processId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listProcessThreadsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + processId, + slot, + 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)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessThreadsSlotAsync( + String resourceGroupName, String name, String processId, String slot) { + return new PagedFlux<>( + () -> listProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot), + nextLink -> listProcessThreadsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listProcessThreadsSlotAsync( + String resourceGroupName, String name, String processId, String slot, Context context) { + return new PagedFlux<>( + () -> listProcessThreadsSlotSinglePageAsync(resourceGroupName, name, processId, slot, context), + nextLink -> listProcessThreadsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot) { + return new PagedIterable<>(listProcessThreadsSlotAsync(resourceGroupName, name, processId, slot)); + } + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, Context context) { + return new PagedIterable<>(listProcessThreadsSlotAsync(resourceGroupName, name, processId, slot, context)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 public certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicCertificatesSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listPublicCertificatesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 public certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicCertificatesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listPublicCertificatesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPublicCertificatesSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listPublicCertificatesSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listPublicCertificatesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listPublicCertificatesSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listPublicCertificatesSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listPublicCertificatesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPublicCertificatesSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listPublicCertificatesSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 public certificates. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listPublicCertificatesSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listPublicCertificatesSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPublicCertificateSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String publicCertificateName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 + .getPublicCertificateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getPublicCertificateSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 + .getPublicCertificateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getPublicCertificateSlotAsync( + String resourceGroupName, String name, String slot, String publicCertificateName) { + return getPublicCertificateSlotWithResponseAsync(resourceGroupName, name, slot, publicCertificateName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicCertificateInner getPublicCertificateSlot( + String resourceGroupName, String name, String slot, String publicCertificateName) { + return getPublicCertificateSlotAsync(resourceGroupName, name, slot, publicCertificateName).block(); + } + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPublicCertificateSlotWithResponse( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context) { + return getPublicCertificateSlotWithResponseAsync(resourceGroupName, name, slot, publicCertificateName, context) + .block(); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdatePublicCertificateSlotWithResponseAsync( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (publicCertificate == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificate is required and cannot be null.")); + } else { + publicCertificate.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdatePublicCertificateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + publicCertificateName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + publicCertificate, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdatePublicCertificateSlotWithResponseAsync( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (publicCertificate == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificate is required and cannot be null.")); + } else { + publicCertificate.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdatePublicCertificateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + publicCertificateName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + publicCertificate, + accept, + context); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdatePublicCertificateSlotAsync( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate) { + return createOrUpdatePublicCertificateSlotWithResponseAsync( + resourceGroupName, name, publicCertificateName, slot, publicCertificate) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PublicCertificateInner createOrUpdatePublicCertificateSlot( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate) { + return createOrUpdatePublicCertificateSlotAsync( + resourceGroupName, name, publicCertificateName, slot, publicCertificate) + .block(); + } + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdatePublicCertificateSlotWithResponse( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate, + Context context) { + return createOrUpdatePublicCertificateSlotWithResponseAsync( + resourceGroupName, name, publicCertificateName, slot, publicCertificate, context) + .block(); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deletePublicCertificateSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String publicCertificateName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 + .deletePublicCertificateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deletePublicCertificateSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + } + if (publicCertificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter publicCertificateName is required 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 + .deletePublicCertificateSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + publicCertificateName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deletePublicCertificateSlotAsync( + String resourceGroupName, String name, String slot, String publicCertificateName) { + return deletePublicCertificateSlotWithResponseAsync(resourceGroupName, name, slot, publicCertificateName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deletePublicCertificateSlot( + String resourceGroupName, String name, String slot, String publicCertificateName) { + deletePublicCertificateSlotAsync(resourceGroupName, name, slot, publicCertificateName).block(); + } + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deletePublicCertificateSlotWithResponse( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context) { + return deletePublicCertificateSlotWithResponseAsync( + resourceGroupName, name, slot, publicCertificateName, context) + .block(); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPublishingProfileXmlWithSecretsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (publishingProfileOptions == null) { + return Mono + .error( + new IllegalArgumentException("Parameter publishingProfileOptions is required and cannot be null.")); + } else { + publishingProfileOptions.validate(); + } + final String accept = "application/xml"; + return FluxUtil + .withContext( + context -> + service + .listPublishingProfileXmlWithSecretsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + publishingProfileOptions, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listPublishingProfileXmlWithSecretsSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + CsmPublishingProfileOptions publishingProfileOptions, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (publishingProfileOptions == null) { + return Mono + .error( + new IllegalArgumentException("Parameter publishingProfileOptions is required and cannot be null.")); + } else { + publishingProfileOptions.validate(); + } + final String accept = "application/xml"; + context = this.client.mergeContext(context); + return service + .listPublishingProfileXmlWithSecretsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + publishingProfileOptions, + accept, + context); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Flux listPublishingProfileXmlWithSecretsSlotAsync( + String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions) { + return listPublishingProfileXmlWithSecretsSlotWithResponseAsync( + resourceGroupName, name, slot, publishingProfileOptions) + .flatMapMany(StreamResponse::getValue); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public InputStream listPublishingProfileXmlWithSecretsSlot( + String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions) { + Iterator iterator = + listPublishingProfileXmlWithSecretsSlotAsync(resourceGroupName, name, slot, publishingProfileOptions) + .map(ByteBufferBackedInputStream::new) + .toStream() + .iterator(); + Enumeration enumeration = + new Enumeration() { + @Override + public boolean hasMoreElements() { + return iterator.hasNext(); + } + + @Override + public InputStream nextElement() { + return iterator.next(); + } + }; + return new SequenceInputStream(enumeration); + } + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public StreamResponse listPublishingProfileXmlWithSecretsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingProfileOptions publishingProfileOptions, + Context context) { + return listPublishingProfileXmlWithSecretsSlotWithResponseAsync( + resourceGroupName, name, slot, publishingProfileOptions, context) + .block(); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetSlotConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .resetSlotConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> resetSlotConfigurationSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .resetSlotConfigurationSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono resetSlotConfigurationSlotAsync(String resourceGroupName, String name, String slot) { + return resetSlotConfigurationSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 resetSlotConfigurationSlot(String resourceGroupName, String name, String slot) { + resetSlotConfigurationSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response resetSlotConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return resetSlotConfigurationSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> restartSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .restartSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + softRestart, + synchronous, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> restartSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .restartSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + softRestart, + synchronous, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartSlotAsync( + String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { + return restartSlotWithResponseAsync(resourceGroupName, name, slot, softRestart, synchronous) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restartSlotAsync(String resourceGroupName, String name, String slot) { + final Boolean softRestart = null; + final Boolean synchronous = null; + return restartSlotWithResponseAsync(resourceGroupName, name, slot, softRestart, synchronous) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restartSlot(String resourceGroupName, String name, String slot) { + final Boolean softRestart = null; + final Boolean synchronous = null; + restartSlotAsync(resourceGroupName, name, slot, softRestart, synchronous).block(); + } + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response restartSlotWithResponse( + String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous, Context context) { + return restartSlotWithResponseAsync(resourceGroupName, name, slot, softRestart, synchronous, context).block(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreFromBackupBlobSlotWithResponseAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restoreFromBackupBlobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreFromBackupBlobSlotWithResponseAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (request == null) { + return Mono.error(new IllegalArgumentException("Parameter request is required and cannot be null.")); + } else { + request.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restoreFromBackupBlobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + request, + accept, + context); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreFromBackupBlobSlotAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + Mono>> mono = + restoreFromBackupBlobSlotWithResponseAsync(resourceGroupName, name, slot, request); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreFromBackupBlobSlotAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreFromBackupBlobSlotWithResponseAsync(resourceGroupName, name, slot, request, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return beginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request).getSyncPoller(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + return beginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request, context).getSyncPoller(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreFromBackupBlobSlotAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + return beginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreFromBackupBlobSlotAsync( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + return beginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + restoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request).block(); + } + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void restoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + restoreFromBackupBlobSlotAsync(resourceGroupName, name, slot, request, context).block(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreFromDeletedAppSlotWithResponseAsync( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restoreFromDeletedAppSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreFromDeletedAppSlotWithResponseAsync( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restoreFromDeletedAppSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + accept, + context); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreFromDeletedAppSlotAsync( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + Mono>> mono = + restoreFromDeletedAppSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreFromDeletedAppSlotAsync( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreFromDeletedAppSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + return beginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest).getSyncPoller(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { + return beginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest, context) + .getSyncPoller(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreFromDeletedAppSlotAsync( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + return beginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreFromDeletedAppSlotAsync( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { + return beginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + restoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest).block(); + } + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { + restoreFromDeletedAppSlotAsync(resourceGroupName, name, slot, restoreRequest, context).block(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreSnapshotSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .restoreSnapshotSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> restoreSnapshotSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (restoreRequest == null) { + return Mono.error(new IllegalArgumentException("Parameter restoreRequest is required and cannot be null.")); + } else { + restoreRequest.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .restoreSnapshotSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + restoreRequest, + accept, + context); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreSnapshotSlotAsync( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + Mono>> mono = + restoreSnapshotSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginRestoreSnapshotSlotAsync( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + restoreSnapshotSlotWithResponseAsync(resourceGroupName, name, slot, restoreRequest, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + return beginRestoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest).getSyncPoller(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginRestoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { + return beginRestoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest, context).getSyncPoller(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreSnapshotSlotAsync( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + return beginRestoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono restoreSnapshotSlotAsync( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { + return beginRestoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + restoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest).block(); + } + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 restoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { + restoreSnapshotSlotAsync(resourceGroupName, name, slot, restoreRequest, context).block(); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteExtensionsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteExtensionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteExtensionsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSiteExtensionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteExtensionsSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listSiteExtensionsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listSiteExtensionsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSiteExtensionsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listSiteExtensionsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listSiteExtensionsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteExtensionsSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listSiteExtensionsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSiteExtensionsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listSiteExtensionsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteExtensionSlotWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteExtensionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteExtensionSlotWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSiteExtensionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSiteExtensionSlotAsync( + String resourceGroupName, String name, String siteExtensionId, String slot) { + return getSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteExtensionInfoInner getSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot) { + return getSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).block(); + } + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSiteExtensionSlotWithResponse( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + return getSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot, context).block(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> installSiteExtensionSlotWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .installSiteExtensionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> installSiteExtensionSlotWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .installSiteExtensionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionSlotAsync( + String resourceGroupName, String name, String siteExtensionId, String slot) { + Mono>> mono = + installSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SiteExtensionInfoInner.class, + SiteExtensionInfoInner.class, + this.client.getContext()); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteExtensionInfoInner> beginInstallSiteExtensionSlotAsync( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + installSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SiteExtensionInfoInner.class, + SiteExtensionInfoInner.class, + context); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot) { + return beginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).getSyncPoller(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteExtensionInfoInner> beginInstallSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + return beginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot, context) + .getSyncPoller(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono installSiteExtensionSlotAsync( + String resourceGroupName, String name, String siteExtensionId, String slot) { + return beginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono installSiteExtensionSlotAsync( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + return beginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteExtensionInfoInner installSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot) { + return installSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).block(); + } + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteExtensionInfoInner installSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + return installSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot, context).block(); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSiteExtensionSlotWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteSiteExtensionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSiteExtensionSlotWithResponseAsync( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (siteExtensionId == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteExtensionId is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteSiteExtensionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + siteExtensionId, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSiteExtensionSlotAsync( + String resourceGroupName, String name, String siteExtensionId, String slot) { + return deleteSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot) { + deleteSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).block(); + } + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSiteExtensionSlotWithResponse( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + return deleteSiteExtensionSlotWithResponseAsync(resourceGroupName, name, siteExtensionId, slot, context) + .block(); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotDifferencesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSlotDifferencesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + 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())); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotDifferencesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSlotDifferencesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSlotDifferencesSlotAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + return new PagedFlux<>( + () -> listSlotDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity), + nextLink -> listSlotDifferencesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSlotDifferencesSlotAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + return new PagedFlux<>( + () -> listSlotDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity, context), + nextLink -> listSlotDifferencesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSlotDifferencesSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + return new PagedIterable<>(listSlotDifferencesSlotAsync(resourceGroupName, name, slot, slotSwapEntity)); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSlotDifferencesSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + return new PagedIterable<>( + listSlotDifferencesSlotAsync(resourceGroupName, name, slot, slotSwapEntity, context)); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> swapSlotWithResponseAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .swapSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> swapSlotWithResponseAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .swapSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSwapSlotAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + Mono>> mono = + swapSlotWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSwapSlotAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + swapSlotWithResponseAsync(resourceGroupName, name, slot, slotSwapEntity, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSwapSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + return beginSwapSlotAsync(resourceGroupName, name, slot, slotSwapEntity).getSyncPoller(); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSwapSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + return beginSwapSlotAsync(resourceGroupName, name, slot, slotSwapEntity, context).getSyncPoller(); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono swapSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + return beginSwapSlotAsync(resourceGroupName, name, slot, slotSwapEntity) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono swapSlotAsync( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + return beginSwapSlotAsync(resourceGroupName, name, slot, slotSwapEntity, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 swapSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + swapSlotAsync(resourceGroupName, name, slot, slotSwapEntity).block(); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 swapSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + swapSlotAsync(resourceGroupName, name, slot, slotSwapEntity, context).block(); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSnapshotsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSnapshotsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSnapshotsSlotAsync(String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listSnapshotsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listSnapshotsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSnapshotsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listSnapshotsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listSnapshotsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSnapshotsSlot(String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listSnapshotsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSnapshotsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listSnapshotsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsFromDRSecondarySlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSnapshotsFromDRSecondarySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsFromDRSecondarySlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listSnapshotsFromDRSecondarySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSnapshotsFromDRSecondarySlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listSnapshotsFromDRSecondarySlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listSnapshotsFromDRSecondarySlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSnapshotsFromDRSecondarySlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listSnapshotsFromDRSecondarySlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listSnapshotsFromDRSecondarySlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSnapshotsFromDRSecondarySlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listSnapshotsFromDRSecondarySlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSnapshotsFromDRSecondarySlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listSnapshotsFromDRSecondarySlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSourceControlSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSourceControlSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSourceControlSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getSourceControlSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSourceControlSlotAsync(String resourceGroupName, String name, String slot) { + return getSourceControlSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSourceControlInner getSourceControlSlot(String resourceGroupName, String name, String slot) { + return getSourceControlSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return getSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateSourceControlSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteSourceControl == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); + } else { + siteSourceControl.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateSourceControlSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSourceControl, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateSourceControlSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteSourceControl == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); + } else { + siteSourceControl.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateSourceControlSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSourceControl, + accept, + context); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteSourceControlInner> + beginCreateOrUpdateSourceControlSlotAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + Mono>> mono = + createOrUpdateSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, siteSourceControl); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SiteSourceControlInner.class, + SiteSourceControlInner.class, + this.client.getContext()); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteSourceControlInner> + beginCreateOrUpdateSourceControlSlotAsync( + String resourceGroupName, + String name, + String slot, + SiteSourceControlInner siteSourceControl, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, siteSourceControl, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SiteSourceControlInner.class, + SiteSourceControlInner.class, + context); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl) + .getSyncPoller(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + return beginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl, context) + .getSyncPoller(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateSourceControlSlotAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateSourceControlSlotAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + return beginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSourceControlInner createOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return createOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl).block(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSourceControlInner createOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + return createOrUpdateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl, context).block(); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @param additionalFlags The additionalFlags parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSourceControlSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String additionalFlags) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteSourceControlSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + additionalFlags, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @param additionalFlags The additionalFlags parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSourceControlSlotWithResponseAsync( + String resourceGroupName, String name, String slot, String additionalFlags, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteSourceControlSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + additionalFlags, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @param additionalFlags The additionalFlags parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSourceControlSlotAsync( + String resourceGroupName, String name, String slot, String additionalFlags) { + return deleteSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, additionalFlags) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSourceControlSlotAsync(String resourceGroupName, String name, String slot) { + final String additionalFlags = null; + return deleteSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, additionalFlags) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSourceControlSlot(String resourceGroupName, String name, String slot) { + final String additionalFlags = null; + deleteSourceControlSlotAsync(resourceGroupName, name, slot, additionalFlags).block(); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @param additionalFlags The additionalFlags parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, String additionalFlags, Context context) { + return deleteSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, additionalFlags, context) + .block(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSourceControlSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteSourceControl == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); + } else { + siteSourceControl.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSourceControlSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSourceControl, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSourceControlSlotWithResponseAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (siteSourceControl == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); + } else { + siteSourceControl.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSourceControlSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSourceControl, + accept, + context); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSourceControlSlotAsync( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return updateSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, siteSourceControl) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSourceControlInner updateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + return updateSourceControlSlotAsync(resourceGroupName, name, slot, siteSourceControl).block(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + return updateSourceControlSlotWithResponseAsync(resourceGroupName, name, slot, siteSourceControl, context) + .block(); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startSlotWithResponseAsync(String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startSlotAsync(String resourceGroupName, String name, String slot) { + return startSlotWithResponseAsync(resourceGroupName, name, slot).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 startSlot(String resourceGroupName, String name, String slot) { + startSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startSlotWithResponse(String resourceGroupName, String name, String slot, Context context) { + return startSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startNetworkTraceSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startNetworkTraceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + slot, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startNetworkTraceSlotWithResponseAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .startNetworkTraceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + slot, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginStartNetworkTraceSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + Mono>> mono = + startNetworkTraceSlotWithResponseAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Object.class, Object.class, this.client.getContext()); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginStartNetworkTraceSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + startNetworkTraceSlotWithResponseAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Object.class, Object.class, context); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginStartNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return beginStartNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginStartNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartNetworkTraceSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startNetworkTraceSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return beginStartNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return beginStartNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startNetworkTraceSlotAsync( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartNetworkTraceSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return startNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startNetworkTraceSlot(String resourceGroupName, String name, String slot) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return startNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl) + .block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return startNetworkTraceSlotAsync( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context) + .block(); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopSlotWithResponseAsync(String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .stopSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .stopSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopSlotAsync(String resourceGroupName, String name, String slot) { + return stopSlotWithResponseAsync(resourceGroupName, name, slot).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 stopSlot(String resourceGroupName, String name, String slot) { + stopSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopSlotWithResponse(String resourceGroupName, String name, String slot, Context context) { + return stopSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopNetworkTraceSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .stopNetworkTraceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopNetworkTraceSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .stopNetworkTraceSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopNetworkTraceSlotAsync(String resourceGroupName, String name, String slot) { + return stopNetworkTraceSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopNetworkTraceSlot(String resourceGroupName, String name, String slot) { + stopNetworkTraceSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopNetworkTraceSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return stopNetworkTraceSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncRepositorySlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .syncRepositorySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncRepositorySlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .syncRepositorySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncRepositorySlotAsync(String resourceGroupName, String name, String slot) { + return syncRepositorySlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 syncRepositorySlot(String resourceGroupName, String name, String slot) { + syncRepositorySlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response syncRepositorySlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return syncRepositorySlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncFunctionTriggersSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .syncFunctionTriggersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncFunctionTriggersSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .syncFunctionTriggersSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncFunctionTriggersSlotAsync(String resourceGroupName, String name, String slot) { + return syncFunctionTriggersSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 syncFunctionTriggersSlot(String resourceGroupName, String name, String slot) { + syncFunctionTriggersSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response syncFunctionTriggersSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return syncFunctionTriggersSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listTriggeredWebJobsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listTriggeredWebJobsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listTriggeredWebJobsSlotAsync( + String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listTriggeredWebJobsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listTriggeredWebJobsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listTriggeredWebJobsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listTriggeredWebJobsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listTriggeredWebJobsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggeredWebJobsSlot( + String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listTriggeredWebJobsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggeredWebJobsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listTriggeredWebJobsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTriggeredWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getTriggeredWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTriggeredWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getTriggeredWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getTriggeredWebJobSlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return getTriggeredWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TriggeredWebJobInner getTriggeredWebJobSlot( + String resourceGroupName, String name, String webJobName, String slot) { + return getTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot).block(); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return getTriggeredWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot, context).block(); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteTriggeredWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteTriggeredWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteTriggeredWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteTriggeredWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteTriggeredWebJobSlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return deleteTriggeredWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + deleteTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot).block(); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return deleteTriggeredWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot, context).block(); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobHistorySlotSinglePageAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listTriggeredWebJobHistorySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + 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())); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobHistorySlotSinglePageAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listTriggeredWebJobHistorySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + 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)); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listTriggeredWebJobHistorySlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return new PagedFlux<>( + () -> listTriggeredWebJobHistorySlotSinglePageAsync(resourceGroupName, name, webJobName, slot), + nextLink -> listTriggeredWebJobHistorySlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listTriggeredWebJobHistorySlotAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return new PagedFlux<>( + () -> listTriggeredWebJobHistorySlotSinglePageAsync(resourceGroupName, name, webJobName, slot, context), + nextLink -> listTriggeredWebJobHistorySlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String slot) { + return new PagedIterable<>(listTriggeredWebJobHistorySlotAsync(resourceGroupName, name, webJobName, slot)); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return new PagedIterable<>( + listTriggeredWebJobHistorySlotAsync(resourceGroupName, name, webJobName, slot, context)); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTriggeredWebJobHistorySlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String id, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getTriggeredWebJobHistorySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTriggeredWebJobHistorySlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String id, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getTriggeredWebJobHistorySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + id, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getTriggeredWebJobHistorySlotAsync( + String resourceGroupName, String name, String webJobName, String id, String slot) { + return getTriggeredWebJobHistorySlotWithResponseAsync(resourceGroupName, name, webJobName, id, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TriggeredJobHistoryInner getTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String id, String slot) { + return getTriggeredWebJobHistorySlotAsync(resourceGroupName, name, webJobName, id, slot).block(); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTriggeredWebJobHistorySlotWithResponse( + String resourceGroupName, String name, String webJobName, String id, String slot, Context context) { + return getTriggeredWebJobHistorySlotWithResponseAsync(resourceGroupName, name, webJobName, id, slot, context) + .block(); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runTriggeredWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .runTriggeredWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runTriggeredWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .runTriggeredWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runTriggeredWebJobSlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return runTriggeredWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void runTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + runTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot).block(); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response runTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return runTriggeredWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot, context).block(); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listUsagesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSlotSinglePageAsync( + String resourceGroupName, String name, String slot, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listUsagesSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesSlotAsync( + String resourceGroupName, String name, String slot, String filter) { + return new PagedFlux<>( + () -> listUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter), + nextLink -> listUsagesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesSlotAsync(String resourceGroupName, String name, String slot) { + final String filter = null; + return new PagedFlux<>( + () -> listUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter), + nextLink -> listUsagesSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesSlotAsync( + String resourceGroupName, String name, String slot, String filter, Context context) { + return new PagedFlux<>( + () -> listUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter, context), + nextLink -> listUsagesSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsagesSlot(String resourceGroupName, String name, String slot) { + final String filter = null; + return new PagedIterable<>(listUsagesSlotAsync(resourceGroupName, name, slot, filter)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsagesSlot( + String resourceGroupName, String name, String slot, String filter, Context context) { + return new PagedIterable<>(listUsagesSlotAsync(resourceGroupName, name, slot, filter, context)); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listVnetConnectionsSlotWithResponseAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listVnetConnectionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listVnetConnectionsSlotWithResponseAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listVnetConnectionsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVnetConnectionsSlotAsync( + String resourceGroupName, String name, String slot) { + return listVnetConnectionsSlotWithResponseAsync(resourceGroupName, name, slot) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listVnetConnectionsSlot(String resourceGroupName, String name, String slot) { + return listVnetConnectionsSlotAsync(resourceGroupName, name, slot).block(); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listVnetConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return listVnetConnectionsSlotWithResponseAsync(resourceGroupName, name, slot, context).block(); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String vnetName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getVnetConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String vnetName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getVnetConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVnetConnectionSlotAsync( + String resourceGroupName, String name, String vnetName, String slot) { + return getVnetConnectionSlotWithResponseAsync(resourceGroupName, name, vnetName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetInfoResourceInner getVnetConnectionSlot( + String resourceGroupName, String name, String vnetName, String slot) { + return getVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot).block(); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVnetConnectionSlotWithResponse( + String resourceGroupName, String name, String vnetName, String slot, Context context) { + return getVnetConnectionSlotWithResponseAsync(resourceGroupName, name, vnetName, slot, context).block(); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String vnetName, String slot, VnetInfoResourceInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateVnetConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String slot, + VnetInfoResourceInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateVnetConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateVnetConnectionSlotAsync( + String resourceGroupName, String name, String vnetName, String slot, VnetInfoResourceInner connectionEnvelope) { + return createOrUpdateVnetConnectionSlotWithResponseAsync( + resourceGroupName, name, vnetName, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetInfoResourceInner createOrUpdateVnetConnectionSlot( + String resourceGroupName, String name, String vnetName, String slot, VnetInfoResourceInner connectionEnvelope) { + return createOrUpdateVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateVnetConnectionSlotWithResponse( + String resourceGroupName, + String name, + String vnetName, + String slot, + VnetInfoResourceInner connectionEnvelope, + Context context) { + return createOrUpdateVnetConnectionSlotWithResponseAsync( + resourceGroupName, name, vnetName, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteVnetConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String vnetName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteVnetConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteVnetConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String vnetName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .deleteVnetConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteVnetConnectionSlotAsync( + String resourceGroupName, String name, String vnetName, String slot) { + return deleteVnetConnectionSlotWithResponseAsync(resourceGroupName, name, vnetName, slot) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { + deleteVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot).block(); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteVnetConnectionSlotWithResponse( + String resourceGroupName, String name, String vnetName, String slot, Context context) { + return deleteVnetConnectionSlotWithResponseAsync(resourceGroupName, name, vnetName, slot, context).block(); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetConnectionSlotWithResponseAsync( + String resourceGroupName, String name, String vnetName, String slot, VnetInfoResourceInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateVnetConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetConnectionSlotWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String slot, + VnetInfoResourceInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateVnetConnectionSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateVnetConnectionSlotAsync( + String resourceGroupName, String name, String vnetName, String slot, VnetInfoResourceInner connectionEnvelope) { + return updateVnetConnectionSlotWithResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetInfoResourceInner updateVnetConnectionSlot( + String resourceGroupName, String name, String vnetName, String slot, VnetInfoResourceInner connectionEnvelope) { + return updateVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).block(); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateVnetConnectionSlotWithResponse( + String resourceGroupName, + String name, + String vnetName, + String slot, + VnetInfoResourceInner connectionEnvelope, + Context context) { + return updateVnetConnectionSlotWithResponseAsync( + resourceGroupName, name, vnetName, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetConnectionGatewaySlotWithResponseAsync( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getVnetConnectionGatewaySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetConnectionGatewaySlotWithResponseAsync( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getVnetConnectionGatewaySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVnetConnectionGatewaySlotAsync( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + return getVnetConnectionGatewaySlotWithResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetGatewayInner getVnetConnectionGatewaySlot( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + return getVnetConnectionGatewaySlotAsync(resourceGroupName, name, vnetName, gatewayName, slot).block(); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVnetConnectionGatewaySlotWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot, Context context) { + return getVnetConnectionGatewaySlotWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, slot, context) + .block(); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetConnectionGatewaySlotWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateVnetConnectionGatewaySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetConnectionGatewaySlotWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateVnetConnectionGatewaySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateVnetConnectionGatewaySlotAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope) { + return createOrUpdateVnetConnectionGatewaySlotWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetGatewayInner createOrUpdateVnetConnectionGatewaySlot( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope) { + return createOrUpdateVnetConnectionGatewaySlotAsync( + resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateVnetConnectionGatewaySlotWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope, + Context context) { + return createOrUpdateVnetConnectionGatewaySlotWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetConnectionGatewaySlotWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateVnetConnectionGatewaySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetConnectionGatewaySlotWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateVnetConnectionGatewaySlot( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateVnetConnectionGatewaySlotAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope) { + return updateVnetConnectionGatewaySlotWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetGatewayInner updateVnetConnectionGatewaySlot( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope) { + return updateVnetConnectionGatewaySlotAsync( + resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope) + .block(); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the + * production slot's Virtual Network. + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateVnetConnectionGatewaySlotWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + String slot, + VnetGatewayInner connectionEnvelope, + Context context) { + return updateVnetConnectionGatewaySlotWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope, context) + .block(); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebJobsSlotSinglePageAsync( + String resourceGroupName, String name, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listWebJobsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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())); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebJobsSlotSinglePageAsync( + String resourceGroupName, String name, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .listWebJobsSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + slot, + 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)); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebJobsSlotAsync(String resourceGroupName, String name, String slot) { + return new PagedFlux<>( + () -> listWebJobsSlotSinglePageAsync(resourceGroupName, name, slot), + nextLink -> listWebJobsSlotNextSinglePageAsync(nextLink)); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebJobsSlotAsync( + String resourceGroupName, String name, String slot, Context context) { + return new PagedFlux<>( + () -> listWebJobsSlotSinglePageAsync(resourceGroupName, name, slot, context), + nextLink -> listWebJobsSlotNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebJobsSlot(String resourceGroupName, String name, String slot) { + return new PagedIterable<>(listWebJobsSlotAsync(resourceGroupName, name, slot)); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebJobsSlot( + String resourceGroupName, String name, String slot, Context context) { + return new PagedIterable<>(listWebJobsSlotAsync(resourceGroupName, name, slot, context)); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebJobSlotWithResponseAsync( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (slot == null) { + return Mono.error(new IllegalArgumentException("Parameter slot is required 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 + .getWebJobSlot( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + slot, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWebJobSlotAsync( + String resourceGroupName, String name, String webJobName, String slot) { + return getWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebJobInner getWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + return getWebJobSlotAsync(resourceGroupName, name, webJobName, slot).block(); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return getWebJobSlotWithResponseAsync(resourceGroupName, name, webJobName, slot, context).block(); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotDifferencesFromProductionSinglePageAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listSlotDifferencesFromProduction( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + 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())); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotDifferencesFromProductionSinglePageAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listSlotDifferencesFromProduction( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSlotDifferencesFromProductionAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + return new PagedFlux<>( + () -> listSlotDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity), + nextLink -> listSlotDifferencesFromProductionNextSinglePageAsync(nextLink)); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSlotDifferencesFromProductionAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + return new PagedFlux<>( + () -> listSlotDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity, context), + nextLink -> listSlotDifferencesFromProductionNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSlotDifferencesFromProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + return new PagedIterable<>(listSlotDifferencesFromProductionAsync(resourceGroupName, name, slotSwapEntity)); + } + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 slot differences. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSlotDifferencesFromProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + return new PagedIterable<>( + listSlotDifferencesFromProductionAsync(resourceGroupName, name, slotSwapEntity, context)); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> swapSlotWithProductionWithResponseAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .swapSlotWithProduction( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> swapSlotWithProductionWithResponseAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (slotSwapEntity == null) { + return Mono.error(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + } else { + slotSwapEntity.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .swapSlotWithProduction( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + slotSwapEntity, + accept, + context); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSwapSlotWithProductionAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + Mono>> mono = + swapSlotWithProductionWithResponseAsync(resourceGroupName, name, slotSwapEntity); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSwapSlotWithProductionAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + swapSlotWithProductionWithResponseAsync(resourceGroupName, name, slotSwapEntity, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSwapSlotWithProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + return beginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity).getSyncPoller(); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSwapSlotWithProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + return beginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity, context).getSyncPoller(); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono swapSlotWithProductionAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + return beginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono swapSlotWithProductionAsync( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + return beginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + swapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity).block(); + } + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 swapSlotWithProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + swapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity, context).block(); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSnapshots( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSnapshots( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSnapshotsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listSnapshotsSinglePageAsync(resourceGroupName, name), + nextLink -> listSnapshotsNextSinglePageAsync(nextLink)); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSnapshotsAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listSnapshotsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listSnapshotsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSnapshots(String resourceGroupName, String name) { + return new PagedIterable<>(listSnapshotsAsync(resourceGroupName, name)); + } + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSnapshots(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listSnapshotsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsFromDRSecondarySinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSnapshotsFromDRSecondary( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsFromDRSecondarySinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listSnapshotsFromDRSecondary( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSnapshotsFromDRSecondaryAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listSnapshotsFromDRSecondarySinglePageAsync(resourceGroupName, name), + nextLink -> listSnapshotsFromDRSecondaryNextSinglePageAsync(nextLink)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listSnapshotsFromDRSecondaryAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listSnapshotsFromDRSecondarySinglePageAsync(resourceGroupName, name, context), + nextLink -> listSnapshotsFromDRSecondaryNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSnapshotsFromDRSecondary(String resourceGroupName, String name) { + return new PagedIterable<>(listSnapshotsFromDRSecondaryAsync(resourceGroupName, name)); + } + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listSnapshotsFromDRSecondary( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listSnapshotsFromDRSecondaryAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSourceControlWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getSourceControl( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSourceControlWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .getSourceControl( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getSourceControlAsync(String resourceGroupName, String name) { + return getSourceControlWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSourceControlInner getSourceControl(String resourceGroupName, String name) { + return getSourceControlAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getSourceControlWithResponse( + String resourceGroupName, String name, Context context) { + return getSourceControlWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateSourceControlWithResponseAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteSourceControl == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); + } else { + siteSourceControl.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateSourceControl( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSourceControl, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateSourceControlWithResponseAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteSourceControl == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); + } else { + siteSourceControl.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateSourceControl( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSourceControl, + accept, + context); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteSourceControlInner> + beginCreateOrUpdateSourceControlAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + Mono>> mono = + createOrUpdateSourceControlWithResponseAsync(resourceGroupName, name, siteSourceControl); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SiteSourceControlInner.class, + SiteSourceControlInner.class, + this.client.getContext()); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SiteSourceControlInner> + beginCreateOrUpdateSourceControlAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateSourceControlWithResponseAsync(resourceGroupName, name, siteSourceControl, context); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + SiteSourceControlInner.class, + SiteSourceControlInner.class, + context); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl).getSyncPoller(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SiteSourceControlInner> beginCreateOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + return beginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl, context) + .getSyncPoller(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateSourceControlAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return beginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateSourceControlAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + return beginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSourceControlInner createOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return createOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl).block(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSourceControlInner createOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + return createOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl, context).block(); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param additionalFlags The additionalFlags parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSourceControlWithResponseAsync( + String resourceGroupName, String name, String additionalFlags) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteSourceControl( + this.client.getEndpoint(), + resourceGroupName, + name, + additionalFlags, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param additionalFlags The additionalFlags parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteSourceControlWithResponseAsync( + String resourceGroupName, String name, String additionalFlags, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .deleteSourceControl( + this.client.getEndpoint(), + resourceGroupName, + name, + additionalFlags, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param additionalFlags The additionalFlags parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSourceControlAsync(String resourceGroupName, String name, String additionalFlags) { + return deleteSourceControlWithResponseAsync(resourceGroupName, name, additionalFlags) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteSourceControlAsync(String resourceGroupName, String name) { + final String additionalFlags = null; + return deleteSourceControlWithResponseAsync(resourceGroupName, name, additionalFlags) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteSourceControl(String resourceGroupName, String name) { + final String additionalFlags = null; + deleteSourceControlAsync(resourceGroupName, name, additionalFlags).block(); + } + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param additionalFlags The additionalFlags parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteSourceControlWithResponse( + String resourceGroupName, String name, String additionalFlags, Context context) { + return deleteSourceControlWithResponseAsync(resourceGroupName, name, additionalFlags, context).block(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSourceControlWithResponseAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteSourceControl == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); + } else { + siteSourceControl.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateSourceControl( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSourceControl, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateSourceControlWithResponseAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 (siteSourceControl == null) { + return Mono + .error(new IllegalArgumentException("Parameter siteSourceControl is required and cannot be null.")); + } else { + siteSourceControl.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateSourceControl( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + siteSourceControl, + accept, + context); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateSourceControlAsync( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return updateSourceControlWithResponseAsync(resourceGroupName, name, siteSourceControl) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SiteSourceControlInner updateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + return updateSourceControlAsync(resourceGroupName, name, siteSourceControl).block(); + } + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateSourceControlWithResponse( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + return updateSourceControlWithResponseAsync(resourceGroupName, name, siteSourceControl, context).block(); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .start( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> startWithResponseAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .start( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startAsync(String resourceGroupName, String name) { + return startWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void start(String resourceGroupName, String name) { + startAsync(resourceGroupName, name).block(); + } + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response startWithResponse(String resourceGroupName, String name, Context context) { + return startWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startNetworkTraceWithResponseAsync( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .startNetworkTrace( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> startNetworkTraceWithResponseAsync( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .startNetworkTrace( + this.client.getEndpoint(), + resourceGroupName, + name, + durationInSeconds, + maxFrameLength, + sasUrl, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginStartNetworkTraceAsync( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + Mono>> mono = + startNetworkTraceWithResponseAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Object.class, Object.class, this.client.getContext()); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Object> beginStartNetworkTraceAsync( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + startNetworkTraceWithResponseAsync( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Object.class, Object.class, context); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginStartNetworkTrace( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Object> beginStartNetworkTrace( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .getSyncPoller(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startNetworkTraceAsync( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startNetworkTraceAsync(String resourceGroupName, String name) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono startNetworkTraceAsync( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return beginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startNetworkTrace( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return startNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startNetworkTrace(String resourceGroupName, String name) { + final Integer durationInSeconds = null; + final Integer maxFrameLength = null; + final String sasUrl = null; + return startNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).block(); + } + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Object startNetworkTrace( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return startNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context) + .block(); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .stop( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopWithResponseAsync(String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .stop( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopAsync(String resourceGroupName, String name) { + return stopWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stop(String resourceGroupName, String name) { + stopAsync(resourceGroupName, name).block(); + } + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopWithResponse(String resourceGroupName, String name, Context context) { + return stopWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopNetworkTraceWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .stopNetworkTrace( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> stopNetworkTraceWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .stopNetworkTrace( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono stopNetworkTraceAsync(String resourceGroupName, String name) { + return stopNetworkTraceWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void stopNetworkTrace(String resourceGroupName, String name) { + stopNetworkTraceAsync(resourceGroupName, name).block(); + } + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response stopNetworkTraceWithResponse(String resourceGroupName, String name, Context context) { + return stopNetworkTraceWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncRepositoryWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .syncRepository( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncRepositoryWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .syncRepository( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncRepositoryAsync(String resourceGroupName, String name) { + return syncRepositoryWithResponseAsync(resourceGroupName, name).flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void syncRepository(String resourceGroupName, String name) { + syncRepositoryAsync(resourceGroupName, name).block(); + } + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response syncRepositoryWithResponse(String resourceGroupName, String name, Context context) { + return syncRepositoryWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncFunctionTriggersWithResponseAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .syncFunctionTriggers( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> syncFunctionTriggersWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .syncFunctionTriggers( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono syncFunctionTriggersAsync(String resourceGroupName, String name) { + return syncFunctionTriggersWithResponseAsync(resourceGroupName, name) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void syncFunctionTriggers(String resourceGroupName, String name) { + syncFunctionTriggersAsync(resourceGroupName, name).block(); + } + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response syncFunctionTriggersWithResponse(String resourceGroupName, String name, Context context) { + return syncFunctionTriggersWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobsSinglePageAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listTriggeredWebJobs( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listTriggeredWebJobs( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listTriggeredWebJobsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listTriggeredWebJobsSinglePageAsync(resourceGroupName, name), + nextLink -> listTriggeredWebJobsNextSinglePageAsync(nextLink)); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listTriggeredWebJobsAsync( + String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listTriggeredWebJobsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listTriggeredWebJobsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggeredWebJobs(String resourceGroupName, String name) { + return new PagedIterable<>(listTriggeredWebJobsAsync(resourceGroupName, name)); + } + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggeredWebJobs( + String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listTriggeredWebJobsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTriggeredWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .getTriggeredWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTriggeredWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .getTriggeredWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getTriggeredWebJobAsync( + String resourceGroupName, String name, String webJobName) { + return getTriggeredWebJobWithResponseAsync(resourceGroupName, name, webJobName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TriggeredWebJobInner getTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + return getTriggeredWebJobAsync(resourceGroupName, name, webJobName).block(); + } + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 triggered Web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return getTriggeredWebJobWithResponseAsync(resourceGroupName, name, webJobName, context).block(); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteTriggeredWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .deleteTriggeredWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteTriggeredWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .deleteTriggeredWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName) { + return deleteTriggeredWebJobWithResponseAsync(resourceGroupName, name, webJobName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 deleteTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + deleteTriggeredWebJobAsync(resourceGroupName, name, webJobName).block(); + } + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return deleteTriggeredWebJobWithResponseAsync(resourceGroupName, name, webJobName, context).block(); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobHistorySinglePageAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .listTriggeredWebJobHistory( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + 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())); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobHistorySinglePageAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .listTriggeredWebJobHistory( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + 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)); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listTriggeredWebJobHistoryAsync( + String resourceGroupName, String name, String webJobName) { + return new PagedFlux<>( + () -> listTriggeredWebJobHistorySinglePageAsync(resourceGroupName, name, webJobName), + nextLink -> listTriggeredWebJobHistoryNextSinglePageAsync(nextLink)); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listTriggeredWebJobHistoryAsync( + String resourceGroupName, String name, String webJobName, Context context) { + return new PagedFlux<>( + () -> listTriggeredWebJobHistorySinglePageAsync(resourceGroupName, name, webJobName, context), + nextLink -> listTriggeredWebJobHistoryNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName) { + return new PagedIterable<>(listTriggeredWebJobHistoryAsync(resourceGroupName, name, webJobName)); + } + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName, Context context) { + return new PagedIterable<>(listTriggeredWebJobHistoryAsync(resourceGroupName, name, webJobName, context)); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTriggeredWebJobHistoryWithResponseAsync( + String resourceGroupName, String name, String webJobName, String id) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 + .getTriggeredWebJobHistory( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getTriggeredWebJobHistoryWithResponseAsync( + String resourceGroupName, String name, String webJobName, String id, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required and cannot be null.")); + } + if (id == null) { + return Mono.error(new IllegalArgumentException("Parameter id is required 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 + .getTriggeredWebJobHistory( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + id, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getTriggeredWebJobHistoryAsync( + String resourceGroupName, String name, String webJobName, String id) { + return getTriggeredWebJobHistoryWithResponseAsync(resourceGroupName, name, webJobName, id) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public TriggeredJobHistoryInner getTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName, String id) { + return getTriggeredWebJobHistoryAsync(resourceGroupName, name, webJobName, id).block(); + } + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTriggeredWebJobHistoryWithResponse( + String resourceGroupName, String name, String webJobName, String id, Context context) { + return getTriggeredWebJobHistoryWithResponseAsync(resourceGroupName, name, webJobName, id, context).block(); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runTriggeredWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .runTriggeredWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> runTriggeredWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .runTriggeredWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono runTriggeredWebJobAsync(String resourceGroupName, String name, String webJobName) { + return runTriggeredWebJobWithResponseAsync(resourceGroupName, name, webJobName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void runTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + runTriggeredWebJobAsync(resourceGroupName, name, webJobName).block(); + } + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response runTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return runTriggeredWebJobWithResponseAsync(resourceGroupName, name, webJobName, context).block(); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSinglePageAsync( + String resourceGroupName, String name, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + 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())); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSinglePageAsync( + String resourceGroupName, String name, 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 (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listUsages( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + filter, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync(String resourceGroupName, String name, String filter) { + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter), + nextLink -> listUsagesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync(String resourceGroupName, String name) { + final String filter = null; + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter), + nextLink -> listUsagesNextSinglePageAsync(nextLink)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listUsagesAsync( + String resourceGroupName, String name, String filter, Context context) { + return new PagedFlux<>( + () -> listUsagesSinglePageAsync(resourceGroupName, name, filter, context), + nextLink -> listUsagesNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsages(String resourceGroupName, String name) { + final String filter = null; + return new PagedIterable<>(listUsagesAsync(resourceGroupName, name, filter)); + } + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listUsages( + String resourceGroupName, String name, String filter, Context context) { + return new PagedIterable<>(listUsagesAsync(resourceGroupName, name, filter, context)); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listVnetConnectionsWithResponseAsync( + String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listVnetConnections( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> listVnetConnectionsWithResponseAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listVnetConnections( + this.client.getEndpoint(), + resourceGroupName, + name, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listVnetConnectionsAsync(String resourceGroupName, String name) { + return listVnetConnectionsWithResponseAsync(resourceGroupName, name) + .flatMap( + (Response> res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public List listVnetConnections(String resourceGroupName, String name) { + return listVnetConnectionsAsync(resourceGroupName, name).block(); + } + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 array of VnetInfoResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response> listVnetConnectionsWithResponse( + String resourceGroupName, String name, Context context) { + return listVnetConnectionsWithResponseAsync(resourceGroupName, name, context).block(); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetConnectionWithResponseAsync( + String resourceGroupName, String name, String vnetName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 + .getVnetConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetConnectionWithResponseAsync( + String resourceGroupName, String name, String vnetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 + .getVnetConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVnetConnectionAsync(String resourceGroupName, String name, String vnetName) { + return getVnetConnectionWithResponseAsync(resourceGroupName, name, vnetName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetInfoResourceInner getVnetConnection(String resourceGroupName, String name, String vnetName) { + return getVnetConnectionAsync(resourceGroupName, name, vnetName).block(); + } + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVnetConnectionWithResponse( + String resourceGroupName, String name, String vnetName, Context context) { + return getVnetConnectionWithResponseAsync(resourceGroupName, name, vnetName, context).block(); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetConnectionWithResponseAsync( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateVnetConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetConnectionWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateVnetConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateVnetConnectionAsync( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope) { + return createOrUpdateVnetConnectionWithResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetInfoResourceInner createOrUpdateVnetConnection( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope) { + return createOrUpdateVnetConnectionAsync(resourceGroupName, name, vnetName, connectionEnvelope).block(); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateVnetConnectionWithResponse( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context) { + return createOrUpdateVnetConnectionWithResponseAsync( + resourceGroupName, name, vnetName, connectionEnvelope, context) + .block(); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteVnetConnectionWithResponseAsync( + String resourceGroupName, String name, String vnetName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 + .deleteVnetConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteVnetConnectionWithResponseAsync( + String resourceGroupName, String name, String vnetName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 + .deleteVnetConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteVnetConnectionAsync(String resourceGroupName, String name, String vnetName) { + return deleteVnetConnectionWithResponseAsync(resourceGroupName, name, vnetName) + .flatMap((Response res) -> Mono.empty()); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void deleteVnetConnection(String resourceGroupName, String name, String vnetName) { + deleteVnetConnectionAsync(resourceGroupName, name, vnetName).block(); + } + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteVnetConnectionWithResponse( + String resourceGroupName, String name, String vnetName, Context context) { + return deleteVnetConnectionWithResponseAsync(resourceGroupName, name, vnetName, context).block(); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetConnectionWithResponseAsync( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateVnetConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetConnectionWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateVnetConnection( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateVnetConnectionAsync( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope) { + return updateVnetConnectionWithResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetInfoResourceInner updateVnetConnection( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope) { + return updateVnetConnectionAsync(resourceGroupName, name, vnetName, connectionEnvelope).block(); + } + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateVnetConnectionWithResponse( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context) { + return updateVnetConnectionWithResponseAsync(resourceGroupName, name, vnetName, connectionEnvelope, context) + .block(); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetConnectionGatewayWithResponseAsync( + String resourceGroupName, String name, String vnetName, String gatewayName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 + .getVnetConnectionGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getVnetConnectionGatewayWithResponseAsync( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 + .getVnetConnectionGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getVnetConnectionGatewayAsync( + String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetConnectionGatewayWithResponseAsync(resourceGroupName, name, vnetName, gatewayName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetGatewayInner getVnetConnectionGateway( + String resourceGroupName, String name, String vnetName, String gatewayName) { + return getVnetConnectionGatewayAsync(resourceGroupName, name, vnetName, gatewayName).block(); + } + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @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 Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getVnetConnectionGatewayWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context) { + return getVnetConnectionGatewayWithResponseAsync(resourceGroupName, name, vnetName, gatewayName, context) + .block(); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetConnectionGatewayWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateVnetConnectionGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateVnetConnectionGatewayWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateVnetConnectionGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateVnetConnectionGatewayAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + return createOrUpdateVnetConnectionGatewayWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetGatewayInner createOrUpdateVnetConnectionGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + return createOrUpdateVnetConnectionGatewayAsync( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + .block(); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateVnetConnectionGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + return createOrUpdateVnetConnectionGatewayWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, context) + .block(); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetConnectionGatewayWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .updateVnetConnectionGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateVnetConnectionGatewayWithResponseAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (vnetName == null) { + return Mono.error(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + } + if (gatewayName == null) { + return Mono.error(new IllegalArgumentException("Parameter gatewayName is required 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 (connectionEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + } else { + connectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .updateVnetConnectionGateway( + this.client.getEndpoint(), + resourceGroupName, + name, + vnetName, + gatewayName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + connectionEnvelope, + accept, + context); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateVnetConnectionGatewayAsync( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + return updateVnetConnectionGatewayWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public VnetGatewayInner updateVnetConnectionGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + return updateVnetConnectionGatewayAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope) + .block(); + } + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateVnetConnectionGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + return updateVnetConnectionGatewayWithResponseAsync( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, context) + .block(); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebJobsSinglePageAsync(String resourceGroupName, String name) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listWebJobs( + this.client.getEndpoint(), + resourceGroupName, + name, + 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())); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebJobsSinglePageAsync( + String resourceGroupName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required 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 + .listWebJobs( + this.client.getEndpoint(), + resourceGroupName, + name, + 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)); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebJobsAsync(String resourceGroupName, String name) { + return new PagedFlux<>( + () -> listWebJobsSinglePageAsync(resourceGroupName, name), + nextLink -> listWebJobsNextSinglePageAsync(nextLink)); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWebJobsAsync(String resourceGroupName, String name, Context context) { + return new PagedFlux<>( + () -> listWebJobsSinglePageAsync(resourceGroupName, name, context), + nextLink -> listWebJobsNextSinglePageAsync(nextLink, context)); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebJobs(String resourceGroupName, String name) { + return new PagedIterable<>(listWebJobsAsync(resourceGroupName, name)); + } + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWebJobs(String resourceGroupName, String name, Context context) { + return new PagedIterable<>(listWebJobsAsync(resourceGroupName, name, context)); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .getWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWebJobWithResponseAsync( + String resourceGroupName, String name, String webJobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (webJobName == null) { + return Mono.error(new IllegalArgumentException("Parameter webJobName is required 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 + .getWebJob( + this.client.getEndpoint(), + resourceGroupName, + name, + webJobName, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getWebJobAsync(String resourceGroupName, String name, String webJobName) { + return getWebJobWithResponseAsync(resourceGroupName, name, webJobName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public WebJobInner getWebJob(String resourceGroupName, String name, String webJobName) { + return getWebJobAsync(resourceGroupName, name, webJobName).block(); + } + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return getWebJobWithResponseAsync(resourceGroupName, name, webJobName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @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)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupsNextSinglePageAsync(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.listBackupsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupsNextSinglePageAsync(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 + .listBackupsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBasicPublishingCredentialsPoliciesNextSinglePageAsync(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 + .listBasicPublishingCredentialsPoliciesNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBasicPublishingCredentialsPoliciesNextSinglePageAsync(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 + .listBasicPublishingCredentialsPoliciesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationsNextSinglePageAsync(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.listConfigurationsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationsNextSinglePageAsync( + 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 + .listConfigurationsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingsKeyVaultReferencesNextSinglePageAsync( + 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.getAppSettingsKeyVaultReferencesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingsKeyVaultReferencesNextSinglePageAsync( + 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 + .getAppSettingsKeyVaultReferencesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferencesNextSinglePageAsync( + 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 + .getSiteConnectionStringKeyVaultReferencesNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferencesNextSinglePageAsync( + 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 + .getSiteConnectionStringKeyVaultReferencesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationSnapshotInfoNextSinglePageAsync( + 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.listConfigurationSnapshotInfoNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationSnapshotInfoNextSinglePageAsync( + 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 + .listConfigurationSnapshotInfoNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listContinuousWebJobsNextSinglePageAsync(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.listContinuousWebJobsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listContinuousWebJobsNextSinglePageAsync( + 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 + .listContinuousWebJobsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsNextSinglePageAsync(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.listDeploymentsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsNextSinglePageAsync(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 + .listDeploymentsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDomainOwnershipIdentifiersNextSinglePageAsync(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.listDomainOwnershipIdentifiersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDomainOwnershipIdentifiersNextSinglePageAsync( + 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 + .listDomainOwnershipIdentifiersNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionsNextSinglePageAsync(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.listFunctionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listFunctionsNextSinglePageAsync( + 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 + .listFunctionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostnameBindingsNextSinglePageAsync(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.listHostnameBindingsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostnameBindingsNextSinglePageAsync( + 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 + .listHostnameBindingsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceIdentifiersNextSinglePageAsync( + 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.listInstanceIdentifiersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceIdentifiersNextSinglePageAsync( + 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 + .listInstanceIdentifiersNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessesNextSinglePageAsync(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.listInstanceProcessesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessesNextSinglePageAsync( + 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 + .listInstanceProcessesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessModulesNextSinglePageAsync(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.listInstanceProcessModulesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessModulesNextSinglePageAsync( + 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 + .listInstanceProcessModulesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessThreadsNextSinglePageAsync(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.listInstanceProcessThreadsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessThreadsNextSinglePageAsync( + 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 + .listInstanceProcessThreadsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteBackupsNextSinglePageAsync(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.listSiteBackupsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteBackupsNextSinglePageAsync(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 + .listSiteBackupsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPerfMonCountersNextSinglePageAsync(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.listPerfMonCountersNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPerfMonCountersNextSinglePageAsync( + 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 + .listPerfMonCountersNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListNextSinglePageAsync(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.getPrivateEndpointConnectionListNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListNextSinglePageAsync(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 + .getPrivateEndpointConnectionListNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessesNextSinglePageAsync(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.listProcessesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessesNextSinglePageAsync(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 + .listProcessesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessModulesNextSinglePageAsync(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.listProcessModulesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessModulesNextSinglePageAsync( + 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 + .listProcessModulesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessThreadsNextSinglePageAsync(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.listProcessThreadsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessThreadsNextSinglePageAsync( + 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 + .listProcessThreadsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicCertificatesNextSinglePageAsync(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.listPublicCertificatesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicCertificatesNextSinglePageAsync( + 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 + .listPublicCertificatesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteExtensionsNextSinglePageAsync(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.listSiteExtensionsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteExtensionsNextSinglePageAsync( + 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 + .listSiteExtensionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotsNextSinglePageAsync(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.listSlotsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of App Service apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotsNextSinglePageAsync(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 + .listSlotsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupsSlotNextSinglePageAsync(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.listBackupsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBackupsSlotNextSinglePageAsync(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 + .listBackupsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBasicPublishingCredentialsPoliciesSlotNextSinglePageAsync(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 + .listBasicPublishingCredentialsPoliciesSlotNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listBasicPublishingCredentialsPoliciesSlotNextSinglePageAsync(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 + .listBasicPublishingCredentialsPoliciesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationsSlotNextSinglePageAsync(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.listConfigurationsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of site configurations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listConfigurationsSlotNextSinglePageAsync( + 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 + .listConfigurationsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingsKeyVaultReferencesSlotNextSinglePageAsync( + 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 + .getAppSettingsKeyVaultReferencesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAppSettingsKeyVaultReferencesSlotNextSinglePageAsync( + 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 + .getAppSettingsKeyVaultReferencesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferencesSlotNextSinglePageAsync( + 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 + .getSiteConnectionStringKeyVaultReferencesSlotNext( + nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getSiteConnectionStringKeyVaultReferencesSlotNextSinglePageAsync( + 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 + .getSiteConnectionStringKeyVaultReferencesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listConfigurationSnapshotInfoSlotNextSinglePageAsync(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.listConfigurationSnapshotInfoSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of metadata for the app configuration snapshots that can be restored. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listConfigurationSnapshotInfoSlotNextSinglePageAsync(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 + .listConfigurationSnapshotInfoSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listContinuousWebJobsSlotNextSinglePageAsync(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.listContinuousWebJobsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listContinuousWebJobsSlotNextSinglePageAsync( + 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 + .listContinuousWebJobsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsSlotNextSinglePageAsync(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.listDeploymentsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app deployments. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDeploymentsSlotNextSinglePageAsync( + 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 + .listDeploymentsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDomainOwnershipIdentifiersSlotNextSinglePageAsync( + 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 + .listDomainOwnershipIdentifiersSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of identifiers. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDomainOwnershipIdentifiersSlotNextSinglePageAsync( + 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 + .listDomainOwnershipIdentifiersSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceFunctionsSlotNextSinglePageAsync(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.listInstanceFunctionsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu function information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceFunctionsSlotNextSinglePageAsync( + 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 + .listInstanceFunctionsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostnameBindingsSlotNextSinglePageAsync(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.listHostnameBindingsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of hostname bindings. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listHostnameBindingsSlotNextSinglePageAsync( + 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 + .listHostnameBindingsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceIdentifiersSlotNextSinglePageAsync( + 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.listInstanceIdentifiersSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of app instances. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceIdentifiersSlotNextSinglePageAsync( + 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 + .listInstanceIdentifiersSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessesSlotNextSinglePageAsync(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.listInstanceProcessesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessesSlotNextSinglePageAsync( + 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 + .listInstanceProcessesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessModulesSlotNextSinglePageAsync( + 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.listInstanceProcessModulesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessModulesSlotNextSinglePageAsync( + 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 + .listInstanceProcessModulesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessThreadsSlotNextSinglePageAsync( + 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.listInstanceProcessThreadsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listInstanceProcessThreadsSlotNextSinglePageAsync( + 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 + .listInstanceProcessThreadsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteBackupsSlotNextSinglePageAsync(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.listSiteBackupsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of backup items. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteBackupsSlotNextSinglePageAsync( + 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 + .listSiteBackupsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPerfMonCountersSlotNextSinglePageAsync(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.listPerfMonCountersSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of performance monitor counters. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPerfMonCountersSlotNextSinglePageAsync( + 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 + .listPerfMonCountersSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSlotNextSinglePageAsync(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 + .getPrivateEndpointConnectionListSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getPrivateEndpointConnectionListSlotNextSinglePageAsync(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 + .getPrivateEndpointConnectionListSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessesSlotNextSinglePageAsync(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.listProcessesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu process information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessesSlotNextSinglePageAsync( + 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 + .listProcessesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessModulesSlotNextSinglePageAsync(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.listProcessModulesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessModulesSlotNextSinglePageAsync( + 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 + .listProcessModulesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessThreadsSlotNextSinglePageAsync(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.listProcessThreadsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu thread information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listProcessThreadsSlotNextSinglePageAsync( + 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 + .listProcessThreadsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicCertificatesSlotNextSinglePageAsync(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.listPublicCertificatesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of public certificates. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listPublicCertificatesSlotNextSinglePageAsync( + 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 + .listPublicCertificatesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteExtensionsSlotNextSinglePageAsync(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.listSiteExtensionsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu site extension information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSiteExtensionsSlotNextSinglePageAsync( + 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 + .listSiteExtensionsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of slot differences. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotDifferencesSlotNextSinglePageAsync(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.listSlotDifferencesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of slot differences. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotDifferencesSlotNextSinglePageAsync( + 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 + .listSlotDifferencesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsSlotNextSinglePageAsync(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.listSnapshotsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsSlotNextSinglePageAsync(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 + .listSnapshotsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsFromDRSecondarySlotNextSinglePageAsync(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.listSnapshotsFromDRSecondarySlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsFromDRSecondarySlotNextSinglePageAsync( + 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 + .listSnapshotsFromDRSecondarySlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobsSlotNextSinglePageAsync(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.listTriggeredWebJobsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobsSlotNextSinglePageAsync( + 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 + .listTriggeredWebJobsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobHistorySlotNextSinglePageAsync( + 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.listTriggeredWebJobHistorySlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobHistorySlotNextSinglePageAsync( + 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 + .listTriggeredWebJobHistorySlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSlotNextSinglePageAsync(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.listUsagesSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesSlotNextSinglePageAsync( + 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 + .listUsagesSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebJobsSlotNextSinglePageAsync(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.listWebJobsSlotNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebJobsSlotNextSinglePageAsync(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 + .listWebJobsSlotNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of slot differences. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotDifferencesFromProductionNextSinglePageAsync( + 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.listSlotDifferencesFromProductionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of slot differences. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSlotDifferencesFromProductionNextSinglePageAsync( + 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 + .listSlotDifferencesFromProductionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsNextSinglePageAsync(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.listSnapshotsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsNextSinglePageAsync(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 + .listSnapshotsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsFromDRSecondaryNextSinglePageAsync(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.listSnapshotsFromDRSecondaryNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of snapshots which can be used to revert an app to a previous time. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSnapshotsFromDRSecondaryNextSinglePageAsync( + 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 + .listSnapshotsFromDRSecondaryNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobsNextSinglePageAsync(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.listTriggeredWebJobsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobsNextSinglePageAsync( + 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 + .listTriggeredWebJobsNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobHistoryNextSinglePageAsync( + 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.listTriggeredWebJobHistoryNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 Kudu continuous web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listTriggeredWebJobHistoryNextSinglePageAsync( + 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 + .listTriggeredWebJobHistoryNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesNextSinglePageAsync(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.listUsagesNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of CSM usage quotas. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listUsagesNextSinglePageAsync(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 + .listUsagesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebJobsNextSinglePageAsync(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.listWebJobsNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of Kudu web job information elements. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWebJobsNextSinglePageAsync(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 + .listWebJobsNext(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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppsImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppsImpl.java new file mode 100644 index 0000000000000..caae1dcdfe788 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebAppsImpl.java @@ -0,0 +1,8968 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.http.rest.StreamResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.WebAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApiKVReferenceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.AzureStoragePropertyDictionaryResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupItemInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ConnectionStringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContinuousWebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameAnalysisResultInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionEnvelopeInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionSecretsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostKeysInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostnameBindingInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.KeyInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployLogInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployStatusInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.MigrateMySqlStatusInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkFeaturesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkTraceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PerfMonResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessModuleInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessThreadInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PublicCertificateInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RelayServiceConnectionEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsV2Inner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteCloneabilityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigurationSnapshotInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteExtensionInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteLogsConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePhpErrorLogFlagInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSourceControlInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotConfigNamesResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotDifferenceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StorageMigrationResponseInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SwiftVirtualNetworkInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredJobHistoryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredWebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebJobInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebSiteInstanceStatusInner; +import com.azure.resourcemanager.appservice.generated.models.ApiKVReference; +import com.azure.resourcemanager.appservice.generated.models.AzureStoragePropertyDictionaryResource; +import com.azure.resourcemanager.appservice.generated.models.BackupItem; +import com.azure.resourcemanager.appservice.generated.models.BackupRequest; +import com.azure.resourcemanager.appservice.generated.models.ConnectionStringDictionary; +import com.azure.resourcemanager.appservice.generated.models.ContinuousWebJob; +import com.azure.resourcemanager.appservice.generated.models.CsmPublishingCredentialsPoliciesEntity; +import com.azure.resourcemanager.appservice.generated.models.CsmPublishingProfileOptions; +import com.azure.resourcemanager.appservice.generated.models.CsmSlotEntity; +import com.azure.resourcemanager.appservice.generated.models.CsmUsageQuota; +import com.azure.resourcemanager.appservice.generated.models.CustomHostnameAnalysisResult; +import com.azure.resourcemanager.appservice.generated.models.DeletedAppRestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.Deployment; +import com.azure.resourcemanager.appservice.generated.models.FunctionEnvelope; +import com.azure.resourcemanager.appservice.generated.models.FunctionSecrets; +import com.azure.resourcemanager.appservice.generated.models.HostKeys; +import com.azure.resourcemanager.appservice.generated.models.HostnameBinding; +import com.azure.resourcemanager.appservice.generated.models.HybridConnection; +import com.azure.resourcemanager.appservice.generated.models.Identifier; +import com.azure.resourcemanager.appservice.generated.models.KeyInfo; +import com.azure.resourcemanager.appservice.generated.models.MSDeploy; +import com.azure.resourcemanager.appservice.generated.models.MSDeployLog; +import com.azure.resourcemanager.appservice.generated.models.MSDeployStatus; +import com.azure.resourcemanager.appservice.generated.models.MigrateMySqlRequest; +import com.azure.resourcemanager.appservice.generated.models.MigrateMySqlStatus; +import com.azure.resourcemanager.appservice.generated.models.NetworkFeatures; +import com.azure.resourcemanager.appservice.generated.models.NetworkTrace; +import com.azure.resourcemanager.appservice.generated.models.Operation; +import com.azure.resourcemanager.appservice.generated.models.PerfMonResponse; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOn; +import com.azure.resourcemanager.appservice.generated.models.PremierAddOnPatchResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateAccess; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkResourcesWrapper; +import com.azure.resourcemanager.appservice.generated.models.ProcessInfo; +import com.azure.resourcemanager.appservice.generated.models.ProcessModuleInfo; +import com.azure.resourcemanager.appservice.generated.models.ProcessThreadInfo; +import com.azure.resourcemanager.appservice.generated.models.PublicCertificate; +import com.azure.resourcemanager.appservice.generated.models.PushSettings; +import com.azure.resourcemanager.appservice.generated.models.RelayServiceConnectionEntity; +import com.azure.resourcemanager.appservice.generated.models.RemotePrivateEndpointConnectionArmResource; +import com.azure.resourcemanager.appservice.generated.models.RestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.Site; +import com.azure.resourcemanager.appservice.generated.models.SiteAuthSettings; +import com.azure.resourcemanager.appservice.generated.models.SiteAuthSettingsV2; +import com.azure.resourcemanager.appservice.generated.models.SiteCloneability; +import com.azure.resourcemanager.appservice.generated.models.SiteConfigResource; +import com.azure.resourcemanager.appservice.generated.models.SiteConfigurationSnapshotInfo; +import com.azure.resourcemanager.appservice.generated.models.SiteExtensionInfo; +import com.azure.resourcemanager.appservice.generated.models.SiteLogsConfig; +import com.azure.resourcemanager.appservice.generated.models.SitePhpErrorLogFlag; +import com.azure.resourcemanager.appservice.generated.models.SiteSourceControl; +import com.azure.resourcemanager.appservice.generated.models.SlotConfigNamesResource; +import com.azure.resourcemanager.appservice.generated.models.SlotDifference; +import com.azure.resourcemanager.appservice.generated.models.Snapshot; +import com.azure.resourcemanager.appservice.generated.models.SnapshotRestoreRequest; +import com.azure.resourcemanager.appservice.generated.models.StorageMigrationOptions; +import com.azure.resourcemanager.appservice.generated.models.StorageMigrationResponse; +import com.azure.resourcemanager.appservice.generated.models.StringDictionary; +import com.azure.resourcemanager.appservice.generated.models.SwiftVirtualNetwork; +import com.azure.resourcemanager.appservice.generated.models.TriggeredJobHistory; +import com.azure.resourcemanager.appservice.generated.models.TriggeredWebJob; +import com.azure.resourcemanager.appservice.generated.models.User; +import com.azure.resourcemanager.appservice.generated.models.VnetGateway; +import com.azure.resourcemanager.appservice.generated.models.VnetInfoResource; +import com.azure.resourcemanager.appservice.generated.models.WebApps; +import com.azure.resourcemanager.appservice.generated.models.WebJob; +import com.azure.resourcemanager.appservice.generated.models.WebSiteInstanceStatus; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class WebAppsImpl implements WebApps { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppsImpl.class); + + private final WebAppsClient innerClient; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public WebAppsImpl( + WebAppsClient innerClient, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Boolean includeSlots, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, includeSlots, context); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public Site getByResourceGroup(String resourceGroupName, String name) { + SiteInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, name); + if (inner != null) { + return new SiteImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String name) { + this.serviceClient().delete(resourceGroupName, name); + } + + public Response deleteWithResponse( + String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, context); + } + + public CustomHostnameAnalysisResult analyzeCustomHostname(String resourceGroupName, String name) { + CustomHostnameAnalysisResultInner inner = this.serviceClient().analyzeCustomHostname(resourceGroupName, name); + if (inner != null) { + return new CustomHostnameAnalysisResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response analyzeCustomHostnameWithResponse( + String resourceGroupName, String name, String hostname, Context context) { + Response inner = + this.serviceClient().analyzeCustomHostnameWithResponse(resourceGroupName, name, hostname, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CustomHostnameAnalysisResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + this.serviceClient().applySlotConfigToProduction(resourceGroupName, name, slotSwapEntity); + } + + public Response applySlotConfigToProductionWithResponse( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + return this + .serviceClient() + .applySlotConfigToProductionWithResponse(resourceGroupName, name, slotSwapEntity, context); + } + + public BackupItem backup(String resourceGroupName, String name, BackupRequestInner request) { + BackupItemInner inner = this.serviceClient().backup(resourceGroupName, name, request); + if (inner != null) { + return new BackupItemImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response backupWithResponse( + String resourceGroupName, String name, BackupRequestInner request, Context context) { + Response inner = + this.serviceClient().backupWithResponse(resourceGroupName, name, request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupItemImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listBackups(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listBackups(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new BackupItemImpl(inner1, this.manager())); + } + + public PagedIterable listBackups(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listBackups(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new BackupItemImpl(inner1, this.manager())); + } + + public BackupItem getBackupStatus(String resourceGroupName, String name, String backupId) { + BackupItemInner inner = this.serviceClient().getBackupStatus(resourceGroupName, name, backupId); + if (inner != null) { + return new BackupItemImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getBackupStatusWithResponse( + String resourceGroupName, String name, String backupId, Context context) { + Response inner = + this.serviceClient().getBackupStatusWithResponse(resourceGroupName, name, backupId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupItemImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteBackup(String resourceGroupName, String name, String backupId) { + this.serviceClient().deleteBackup(resourceGroupName, name, backupId); + } + + public Response deleteBackupWithResponse( + String resourceGroupName, String name, String backupId, Context context) { + return this.serviceClient().deleteBackupWithResponse(resourceGroupName, name, backupId, context); + } + + public BackupItem listBackupStatusSecrets( + String resourceGroupName, String name, String backupId, BackupRequestInner request) { + BackupItemInner inner = + this.serviceClient().listBackupStatusSecrets(resourceGroupName, name, backupId, request); + if (inner != null) { + return new BackupItemImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listBackupStatusSecretsWithResponse( + String resourceGroupName, String name, String backupId, BackupRequestInner request, Context context) { + Response inner = + this + .serviceClient() + .listBackupStatusSecretsWithResponse(resourceGroupName, name, backupId, request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupItemImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { + this.serviceClient().restore(resourceGroupName, name, backupId, request); + } + + public void restore( + String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context) { + this.serviceClient().restore(resourceGroupName, name, backupId, request, context); + } + + public PagedIterable listBasicPublishingCredentialsPolicies( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listBasicPublishingCredentialsPolicies(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new CsmPublishingCredentialsPoliciesEntityImpl(inner1, this.manager())); + } + + public PagedIterable listBasicPublishingCredentialsPolicies( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listBasicPublishingCredentialsPolicies(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new CsmPublishingCredentialsPoliciesEntityImpl(inner1, this.manager())); + } + + public CsmPublishingCredentialsPoliciesEntity getFtpAllowed(String resourceGroupName, String name) { + CsmPublishingCredentialsPoliciesEntityInner inner = this.serviceClient().getFtpAllowed(resourceGroupName, name); + if (inner != null) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getFtpAllowedWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getFtpAllowedWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CsmPublishingCredentialsPoliciesEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CsmPublishingCredentialsPoliciesEntity updateFtpAllowed( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + CsmPublishingCredentialsPoliciesEntityInner inner = + this.serviceClient().updateFtpAllowed(resourceGroupName, name, csmPublishingAccessPoliciesEntity); + if (inner != null) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateFtpAllowedWithResponse( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + Response inner = + this + .serviceClient() + .updateFtpAllowedWithResponse(resourceGroupName, name, csmPublishingAccessPoliciesEntity, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CsmPublishingCredentialsPoliciesEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CsmPublishingCredentialsPoliciesEntity getScmAllowed(String resourceGroupName, String name) { + CsmPublishingCredentialsPoliciesEntityInner inner = this.serviceClient().getScmAllowed(resourceGroupName, name); + if (inner != null) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getScmAllowedWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getScmAllowedWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CsmPublishingCredentialsPoliciesEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CsmPublishingCredentialsPoliciesEntity updateScmAllowed( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + CsmPublishingCredentialsPoliciesEntityInner inner = + this.serviceClient().updateScmAllowed(resourceGroupName, name, csmPublishingAccessPoliciesEntity); + if (inner != null) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateScmAllowedWithResponse( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + Response inner = + this + .serviceClient() + .updateScmAllowedWithResponse(resourceGroupName, name, csmPublishingAccessPoliciesEntity, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CsmPublishingCredentialsPoliciesEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listConfigurations(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listConfigurations(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SiteConfigResourceImpl(inner1, this.manager())); + } + + public PagedIterable listConfigurations( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listConfigurations(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SiteConfigResourceImpl(inner1, this.manager())); + } + + public StringDictionary updateApplicationSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings) { + StringDictionaryInner inner = + this.serviceClient().updateApplicationSettings(resourceGroupName, name, appSettings); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateApplicationSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context) { + Response inner = + this.serviceClient().updateApplicationSettingsWithResponse(resourceGroupName, name, appSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary listApplicationSettings(String resourceGroupName, String name) { + StringDictionaryInner inner = this.serviceClient().listApplicationSettings(resourceGroupName, name); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listApplicationSettingsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listApplicationSettingsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettings updateAuthSettings( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { + SiteAuthSettingsInner inner = + this.serviceClient().updateAuthSettings(resourceGroupName, name, siteAuthSettings); + if (inner != null) { + return new SiteAuthSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateAuthSettingsWithResponse( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings, Context context) { + Response inner = + this.serviceClient().updateAuthSettingsWithResponse(resourceGroupName, name, siteAuthSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettings getAuthSettings(String resourceGroupName, String name) { + SiteAuthSettingsInner inner = this.serviceClient().getAuthSettings(resourceGroupName, name); + if (inner != null) { + return new SiteAuthSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAuthSettingsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getAuthSettingsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettingsV2 getAuthSettingsV2WithoutSecrets(String resourceGroupName, String name) { + SiteAuthSettingsV2Inner inner = this.serviceClient().getAuthSettingsV2WithoutSecrets(resourceGroupName, name); + if (inner != null) { + return new SiteAuthSettingsV2Impl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAuthSettingsV2WithoutSecretsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getAuthSettingsV2WithoutSecretsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsV2Impl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettingsV2 updateAuthSettingsV2( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2) { + SiteAuthSettingsV2Inner inner = + this.serviceClient().updateAuthSettingsV2(resourceGroupName, name, siteAuthSettingsV2); + if (inner != null) { + return new SiteAuthSettingsV2Impl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateAuthSettingsV2WithResponse( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2, Context context) { + Response inner = + this.serviceClient().updateAuthSettingsV2WithResponse(resourceGroupName, name, siteAuthSettingsV2, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsV2Impl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettingsV2 getAuthSettingsV2(String resourceGroupName, String name) { + SiteAuthSettingsV2Inner inner = this.serviceClient().getAuthSettingsV2(resourceGroupName, name); + if (inner != null) { + return new SiteAuthSettingsV2Impl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAuthSettingsV2WithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getAuthSettingsV2WithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsV2Impl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureStoragePropertyDictionaryResource updateAzureStorageAccounts( + String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + AzureStoragePropertyDictionaryResourceInner inner = + this.serviceClient().updateAzureStorageAccounts(resourceGroupName, name, azureStorageAccounts); + if (inner != null) { + return new AzureStoragePropertyDictionaryResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateAzureStorageAccountsWithResponse( + String resourceGroupName, + String name, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context) { + Response inner = + this + .serviceClient() + .updateAzureStorageAccountsWithResponse(resourceGroupName, name, azureStorageAccounts, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AzureStoragePropertyDictionaryResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureStoragePropertyDictionaryResource listAzureStorageAccounts(String resourceGroupName, String name) { + AzureStoragePropertyDictionaryResourceInner inner = + this.serviceClient().listAzureStorageAccounts(resourceGroupName, name); + if (inner != null) { + return new AzureStoragePropertyDictionaryResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listAzureStorageAccountsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listAzureStorageAccountsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AzureStoragePropertyDictionaryResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupRequest updateBackupConfiguration(String resourceGroupName, String name, BackupRequestInner request) { + BackupRequestInner inner = this.serviceClient().updateBackupConfiguration(resourceGroupName, name, request); + if (inner != null) { + return new BackupRequestImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateBackupConfigurationWithResponse( + String resourceGroupName, String name, BackupRequestInner request, Context context) { + Response inner = + this.serviceClient().updateBackupConfigurationWithResponse(resourceGroupName, name, request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupRequestImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteBackupConfiguration(String resourceGroupName, String name) { + this.serviceClient().deleteBackupConfiguration(resourceGroupName, name); + } + + public Response deleteBackupConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + return this.serviceClient().deleteBackupConfigurationWithResponse(resourceGroupName, name, context); + } + + public BackupRequest getBackupConfiguration(String resourceGroupName, String name) { + BackupRequestInner inner = this.serviceClient().getBackupConfiguration(resourceGroupName, name); + if (inner != null) { + return new BackupRequestImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getBackupConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getBackupConfigurationWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupRequestImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getAppSettingsKeyVaultReferences(String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getAppSettingsKeyVaultReferences(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new ApiKVReferenceImpl(inner1, this.manager())); + } + + public PagedIterable getAppSettingsKeyVaultReferences( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getAppSettingsKeyVaultReferences(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new ApiKVReferenceImpl(inner1, this.manager())); + } + + public ApiKVReference getAppSettingKeyVaultReference(String resourceGroupName, String name, String appSettingKey) { + ApiKVReferenceInner inner = + this.serviceClient().getAppSettingKeyVaultReference(resourceGroupName, name, appSettingKey); + if (inner != null) { + return new ApiKVReferenceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAppSettingKeyVaultReferenceWithResponse( + String resourceGroupName, String name, String appSettingKey, Context context) { + Response inner = + this + .serviceClient() + .getAppSettingKeyVaultReferenceWithResponse(resourceGroupName, name, appSettingKey, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ApiKVReferenceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getSiteConnectionStringKeyVaultReferences( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getSiteConnectionStringKeyVaultReferences(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new ApiKVReferenceImpl(inner1, this.manager())); + } + + public PagedIterable getSiteConnectionStringKeyVaultReferences( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getSiteConnectionStringKeyVaultReferences(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new ApiKVReferenceImpl(inner1, this.manager())); + } + + public ApiKVReference getSiteConnectionStringKeyVaultReference( + String resourceGroupName, String name, String connectionStringKey) { + ApiKVReferenceInner inner = + this.serviceClient().getSiteConnectionStringKeyVaultReference(resourceGroupName, name, connectionStringKey); + if (inner != null) { + return new ApiKVReferenceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteConnectionStringKeyVaultReferenceWithResponse( + String resourceGroupName, String name, String connectionStringKey, Context context) { + Response inner = + this + .serviceClient() + .getSiteConnectionStringKeyVaultReferenceWithResponse( + resourceGroupName, name, connectionStringKey, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ApiKVReferenceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ConnectionStringDictionary updateConnectionStrings( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { + ConnectionStringDictionaryInner inner = + this.serviceClient().updateConnectionStrings(resourceGroupName, name, connectionStrings); + if (inner != null) { + return new ConnectionStringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateConnectionStringsWithResponse( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings, Context context) { + Response inner = + this + .serviceClient() + .updateConnectionStringsWithResponse(resourceGroupName, name, connectionStrings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ConnectionStringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ConnectionStringDictionary listConnectionStrings(String resourceGroupName, String name) { + ConnectionStringDictionaryInner inner = this.serviceClient().listConnectionStrings(resourceGroupName, name); + if (inner != null) { + return new ConnectionStringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listConnectionStringsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listConnectionStringsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ConnectionStringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteLogsConfig getDiagnosticLogsConfiguration(String resourceGroupName, String name) { + SiteLogsConfigInner inner = this.serviceClient().getDiagnosticLogsConfiguration(resourceGroupName, name); + if (inner != null) { + return new SiteLogsConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDiagnosticLogsConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getDiagnosticLogsConfigurationWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteLogsConfigImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteLogsConfig updateDiagnosticLogsConfig( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { + SiteLogsConfigInner inner = + this.serviceClient().updateDiagnosticLogsConfig(resourceGroupName, name, siteLogsConfig); + if (inner != null) { + return new SiteLogsConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateDiagnosticLogsConfigWithResponse( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig, Context context) { + Response inner = + this + .serviceClient() + .updateDiagnosticLogsConfigWithResponse(resourceGroupName, name, siteLogsConfig, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteLogsConfigImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary updateMetadata(String resourceGroupName, String name, StringDictionaryInner metadata) { + StringDictionaryInner inner = this.serviceClient().updateMetadata(resourceGroupName, name, metadata); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateMetadataWithResponse( + String resourceGroupName, String name, StringDictionaryInner metadata, Context context) { + Response inner = + this.serviceClient().updateMetadataWithResponse(resourceGroupName, name, metadata, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary listMetadata(String resourceGroupName, String name) { + StringDictionaryInner inner = this.serviceClient().listMetadata(resourceGroupName, name); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listMetadataWithResponse(String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listMetadataWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public User listPublishingCredentials(String resourceGroupName, String name) { + UserInner inner = this.serviceClient().listPublishingCredentials(resourceGroupName, name); + if (inner != null) { + return new UserImpl(inner, this.manager()); + } else { + return null; + } + } + + public User listPublishingCredentials(String resourceGroupName, String name, Context context) { + UserInner inner = this.serviceClient().listPublishingCredentials(resourceGroupName, name, context); + if (inner != null) { + return new UserImpl(inner, this.manager()); + } else { + return null; + } + } + + public PushSettings updateSitePushSettings(String resourceGroupName, String name, PushSettingsInner pushSettings) { + PushSettingsInner inner = this.serviceClient().updateSitePushSettings(resourceGroupName, name, pushSettings); + if (inner != null) { + return new PushSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSitePushSettingsWithResponse( + String resourceGroupName, String name, PushSettingsInner pushSettings, Context context) { + Response inner = + this.serviceClient().updateSitePushSettingsWithResponse(resourceGroupName, name, pushSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PushSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PushSettings listSitePushSettings(String resourceGroupName, String name) { + PushSettingsInner inner = this.serviceClient().listSitePushSettings(resourceGroupName, name); + if (inner != null) { + return new PushSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSitePushSettingsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listSitePushSettingsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PushSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SlotConfigNamesResource listSlotConfigurationNames(String resourceGroupName, String name) { + SlotConfigNamesResourceInner inner = this.serviceClient().listSlotConfigurationNames(resourceGroupName, name); + if (inner != null) { + return new SlotConfigNamesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSlotConfigurationNamesWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listSlotConfigurationNamesWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SlotConfigNamesResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SlotConfigNamesResource updateSlotConfigurationNames( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { + SlotConfigNamesResourceInner inner = + this.serviceClient().updateSlotConfigurationNames(resourceGroupName, name, slotConfigNames); + if (inner != null) { + return new SlotConfigNamesResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSlotConfigurationNamesWithResponse( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames, Context context) { + Response inner = + this + .serviceClient() + .updateSlotConfigurationNamesWithResponse(resourceGroupName, name, slotConfigNames, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SlotConfigNamesResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteConfigResource getConfiguration(String resourceGroupName, String name) { + SiteConfigResourceInner inner = this.serviceClient().getConfiguration(resourceGroupName, name); + if (inner != null) { + return new SiteConfigResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getConfigurationWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getConfigurationWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteConfigResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteConfigResource createOrUpdateConfiguration( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + SiteConfigResourceInner inner = + this.serviceClient().createOrUpdateConfiguration(resourceGroupName, name, siteConfig); + if (inner != null) { + return new SiteConfigResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateConfigurationWithResponse( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context) { + Response inner = + this.serviceClient().createOrUpdateConfigurationWithResponse(resourceGroupName, name, siteConfig, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteConfigResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteConfigResource updateConfiguration( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig) { + SiteConfigResourceInner inner = this.serviceClient().updateConfiguration(resourceGroupName, name, siteConfig); + if (inner != null) { + return new SiteConfigResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateConfigurationWithResponse( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context) { + Response inner = + this.serviceClient().updateConfigurationWithResponse(resourceGroupName, name, siteConfig, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteConfigResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listConfigurationSnapshotInfo( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listConfigurationSnapshotInfo(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SiteConfigurationSnapshotInfoImpl(inner1, this.manager())); + } + + public PagedIterable listConfigurationSnapshotInfo( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listConfigurationSnapshotInfo(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SiteConfigurationSnapshotInfoImpl(inner1, this.manager())); + } + + public SiteConfigResource getConfigurationSnapshot(String resourceGroupName, String name, String snapshotId) { + SiteConfigResourceInner inner = + this.serviceClient().getConfigurationSnapshot(resourceGroupName, name, snapshotId); + if (inner != null) { + return new SiteConfigResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getConfigurationSnapshotWithResponse( + String resourceGroupName, String name, String snapshotId, Context context) { + Response inner = + this.serviceClient().getConfigurationSnapshotWithResponse(resourceGroupName, name, snapshotId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteConfigResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void recoverSiteConfigurationSnapshot(String resourceGroupName, String name, String snapshotId) { + this.serviceClient().recoverSiteConfigurationSnapshot(resourceGroupName, name, snapshotId); + } + + public Response recoverSiteConfigurationSnapshotWithResponse( + String resourceGroupName, String name, String snapshotId, Context context) { + return this + .serviceClient() + .recoverSiteConfigurationSnapshotWithResponse(resourceGroupName, name, snapshotId, context); + } + + public InputStream getWebSiteContainerLogs(String resourceGroupName, String name) { + return this.serviceClient().getWebSiteContainerLogs(resourceGroupName, name); + } + + public StreamResponse getWebSiteContainerLogsWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().getWebSiteContainerLogsWithResponse(resourceGroupName, name, context); + } + + public InputStream getContainerLogsZip(String resourceGroupName, String name) { + return this.serviceClient().getContainerLogsZip(resourceGroupName, name); + } + + public StreamResponse getContainerLogsZipWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().getContainerLogsZipWithResponse(resourceGroupName, name, context); + } + + public PagedIterable listContinuousWebJobs(String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listContinuousWebJobs(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new ContinuousWebJobImpl(inner1, this.manager())); + } + + public PagedIterable listContinuousWebJobs( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listContinuousWebJobs(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new ContinuousWebJobImpl(inner1, this.manager())); + } + + public ContinuousWebJob getContinuousWebJob(String resourceGroupName, String name, String webJobName) { + ContinuousWebJobInner inner = this.serviceClient().getContinuousWebJob(resourceGroupName, name, webJobName); + if (inner != null) { + return new ContinuousWebJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + Response inner = + this.serviceClient().getContinuousWebJobWithResponse(resourceGroupName, name, webJobName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ContinuousWebJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteContinuousWebJob(String resourceGroupName, String name, String webJobName) { + this.serviceClient().deleteContinuousWebJob(resourceGroupName, name, webJobName); + } + + public Response deleteContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return this.serviceClient().deleteContinuousWebJobWithResponse(resourceGroupName, name, webJobName, context); + } + + public void startContinuousWebJob(String resourceGroupName, String name, String webJobName) { + this.serviceClient().startContinuousWebJob(resourceGroupName, name, webJobName); + } + + public Response startContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return this.serviceClient().startContinuousWebJobWithResponse(resourceGroupName, name, webJobName, context); + } + + public void stopContinuousWebJob(String resourceGroupName, String name, String webJobName) { + this.serviceClient().stopContinuousWebJob(resourceGroupName, name, webJobName); + } + + public Response stopContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return this.serviceClient().stopContinuousWebJobWithResponse(resourceGroupName, name, webJobName, context); + } + + public PagedIterable listDeployments(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listDeployments(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new DeploymentImpl(inner1, this.manager())); + } + + public PagedIterable listDeployments(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listDeployments(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new DeploymentImpl(inner1, this.manager())); + } + + public Deployment getDeployment(String resourceGroupName, String name, String id) { + DeploymentInner inner = this.serviceClient().getDeployment(resourceGroupName, name, id); + if (inner != null) { + return new DeploymentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDeploymentWithResponse( + String resourceGroupName, String name, String id, Context context) { + Response inner = + this.serviceClient().getDeploymentWithResponse(resourceGroupName, name, id, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeploymentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteDeployment(String resourceGroupName, String name, String id) { + this.serviceClient().deleteDeployment(resourceGroupName, name, id); + } + + public Response deleteDeploymentWithResponse( + String resourceGroupName, String name, String id, Context context) { + return this.serviceClient().deleteDeploymentWithResponse(resourceGroupName, name, id, context); + } + + public Deployment listDeploymentLog(String resourceGroupName, String name, String id) { + DeploymentInner inner = this.serviceClient().listDeploymentLog(resourceGroupName, name, id); + if (inner != null) { + return new DeploymentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listDeploymentLogWithResponse( + String resourceGroupName, String name, String id, Context context) { + Response inner = + this.serviceClient().listDeploymentLogWithResponse(resourceGroupName, name, id, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeploymentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RestoreRequest discoverBackup(String resourceGroupName, String name, RestoreRequestInner request) { + RestoreRequestInner inner = this.serviceClient().discoverBackup(resourceGroupName, name, request); + if (inner != null) { + return new RestoreRequestImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response discoverBackupWithResponse( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + Response inner = + this.serviceClient().discoverBackupWithResponse(resourceGroupName, name, request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RestoreRequestImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listDomainOwnershipIdentifiers(String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listDomainOwnershipIdentifiers(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new IdentifierImpl(inner1, this.manager())); + } + + public PagedIterable listDomainOwnershipIdentifiers( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listDomainOwnershipIdentifiers(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new IdentifierImpl(inner1, this.manager())); + } + + public Identifier getDomainOwnershipIdentifier( + String resourceGroupName, String name, String domainOwnershipIdentifierName) { + IdentifierInner inner = + this.serviceClient().getDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName); + if (inner != null) { + return new IdentifierImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDomainOwnershipIdentifierWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context) { + Response inner = + this + .serviceClient() + .getDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new IdentifierImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteDomainOwnershipIdentifier( + String resourceGroupName, String name, String domainOwnershipIdentifierName) { + this.serviceClient().deleteDomainOwnershipIdentifier(resourceGroupName, name, domainOwnershipIdentifierName); + } + + public Response deleteDomainOwnershipIdentifierWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context) { + return this + .serviceClient() + .deleteDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, context); + } + + public MSDeployStatus getMSDeployStatus(String resourceGroupName, String name) { + MSDeployStatusInner inner = this.serviceClient().getMSDeployStatus(resourceGroupName, name); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getMSDeployStatusWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getMSDeployStatusWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MSDeployStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MSDeployStatus createMSDeployOperation(String resourceGroupName, String name, MSDeploy mSDeploy) { + MSDeployStatusInner inner = this.serviceClient().createMSDeployOperation(resourceGroupName, name, mSDeploy); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MSDeployStatus createMSDeployOperation( + String resourceGroupName, String name, MSDeploy mSDeploy, Context context) { + MSDeployStatusInner inner = + this.serviceClient().createMSDeployOperation(resourceGroupName, name, mSDeploy, context); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MSDeployLog getMSDeployLog(String resourceGroupName, String name) { + MSDeployLogInner inner = this.serviceClient().getMSDeployLog(resourceGroupName, name); + if (inner != null) { + return new MSDeployLogImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getMSDeployLogWithResponse(String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getMSDeployLogWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MSDeployLogImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listFunctions(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listFunctions(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new FunctionEnvelopeImpl(inner1, this.manager())); + } + + public PagedIterable listFunctions(String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listFunctions(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new FunctionEnvelopeImpl(inner1, this.manager())); + } + + public String getFunctionsAdminToken(String resourceGroupName, String name) { + return this.serviceClient().getFunctionsAdminToken(resourceGroupName, name); + } + + public Response getFunctionsAdminTokenWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().getFunctionsAdminTokenWithResponse(resourceGroupName, name, context); + } + + public FunctionEnvelope getFunction(String resourceGroupName, String name, String functionName) { + FunctionEnvelopeInner inner = this.serviceClient().getFunction(resourceGroupName, name, functionName); + if (inner != null) { + return new FunctionEnvelopeImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getFunctionWithResponse( + String resourceGroupName, String name, String functionName, Context context) { + Response inner = + this.serviceClient().getFunctionWithResponse(resourceGroupName, name, functionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FunctionEnvelopeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteFunction(String resourceGroupName, String name, String functionName) { + this.serviceClient().deleteFunction(resourceGroupName, name, functionName); + } + + public Response deleteFunctionWithResponse( + String resourceGroupName, String name, String functionName, Context context) { + return this.serviceClient().deleteFunctionWithResponse(resourceGroupName, name, functionName, context); + } + + public KeyInfo createOrUpdateFunctionSecret( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key) { + KeyInfoInner inner = + this.serviceClient().createOrUpdateFunctionSecret(resourceGroupName, name, functionName, keyName, key); + if (inner != null) { + return new KeyInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateFunctionSecretWithResponse( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key, Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateFunctionSecretWithResponse(resourceGroupName, name, functionName, keyName, key, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new KeyInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteFunctionSecret(String resourceGroupName, String name, String functionName, String keyName) { + this.serviceClient().deleteFunctionSecret(resourceGroupName, name, functionName, keyName); + } + + public Response deleteFunctionSecretWithResponse( + String resourceGroupName, String name, String functionName, String keyName, Context context) { + return this + .serviceClient() + .deleteFunctionSecretWithResponse(resourceGroupName, name, functionName, keyName, context); + } + + public StringDictionary listFunctionKeys(String resourceGroupName, String name, String functionName) { + StringDictionaryInner inner = this.serviceClient().listFunctionKeys(resourceGroupName, name, functionName); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listFunctionKeysWithResponse( + String resourceGroupName, String name, String functionName, Context context) { + Response inner = + this.serviceClient().listFunctionKeysWithResponse(resourceGroupName, name, functionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FunctionSecrets listFunctionSecrets(String resourceGroupName, String name, String functionName) { + FunctionSecretsInner inner = this.serviceClient().listFunctionSecrets(resourceGroupName, name, functionName); + if (inner != null) { + return new FunctionSecretsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listFunctionSecretsWithResponse( + String resourceGroupName, String name, String functionName, Context context) { + Response inner = + this.serviceClient().listFunctionSecretsWithResponse(resourceGroupName, name, functionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FunctionSecretsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HostKeys listHostKeys(String resourceGroupName, String name) { + HostKeysInner inner = this.serviceClient().listHostKeys(resourceGroupName, name); + if (inner != null) { + return new HostKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listHostKeysWithResponse(String resourceGroupName, String name, Context context) { + Response inner = this.serviceClient().listHostKeysWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HostKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void listSyncStatus(String resourceGroupName, String name) { + this.serviceClient().listSyncStatus(resourceGroupName, name); + } + + public Response listSyncStatusWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().listSyncStatusWithResponse(resourceGroupName, name, context); + } + + public void syncFunctions(String resourceGroupName, String name) { + this.serviceClient().syncFunctions(resourceGroupName, name); + } + + public Response syncFunctionsWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().syncFunctionsWithResponse(resourceGroupName, name, context); + } + + public KeyInfo createOrUpdateHostSecret( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key) { + KeyInfoInner inner = + this.serviceClient().createOrUpdateHostSecret(resourceGroupName, name, keyType, keyName, key); + if (inner != null) { + return new KeyInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateHostSecretWithResponse( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key, Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateHostSecretWithResponse(resourceGroupName, name, keyType, keyName, key, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new KeyInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteHostSecret(String resourceGroupName, String name, String keyType, String keyName) { + this.serviceClient().deleteHostSecret(resourceGroupName, name, keyType, keyName); + } + + public Response deleteHostSecretWithResponse( + String resourceGroupName, String name, String keyType, String keyName, Context context) { + return this.serviceClient().deleteHostSecretWithResponse(resourceGroupName, name, keyType, keyName, context); + } + + public PagedIterable listHostnameBindings(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listHostnameBindings(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new HostnameBindingImpl(inner1, this.manager())); + } + + public PagedIterable listHostnameBindings(String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listHostnameBindings(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new HostnameBindingImpl(inner1, this.manager())); + } + + public HostnameBinding getHostnameBinding(String resourceGroupName, String name, String hostname) { + HostnameBindingInner inner = this.serviceClient().getHostnameBinding(resourceGroupName, name, hostname); + if (inner != null) { + return new HostnameBindingImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, Context context) { + Response inner = + this.serviceClient().getHostnameBindingWithResponse(resourceGroupName, name, hostname, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HostnameBindingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteHostnameBinding(String resourceGroupName, String name, String hostname) { + this.serviceClient().deleteHostnameBinding(resourceGroupName, name, hostname); + } + + public Response deleteHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, Context context) { + return this.serviceClient().deleteHostnameBindingWithResponse(resourceGroupName, name, hostname, context); + } + + public HybridConnection getHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName) { + HybridConnectionInner inner = + this.serviceClient().getHybridConnection(resourceGroupName, name, namespaceName, relayName); + if (inner != null) { + return new HybridConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + Response inner = + this + .serviceClient() + .getHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName) { + this.serviceClient().deleteHybridConnection(resourceGroupName, name, namespaceName, relayName); + } + + public Response deleteHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context) { + return this + .serviceClient() + .deleteHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, context); + } + + public HybridConnection listHybridConnections(String resourceGroupName, String name) { + HybridConnectionInner inner = this.serviceClient().listHybridConnections(resourceGroupName, name); + if (inner != null) { + return new HybridConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listHybridConnectionsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listHybridConnectionsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RelayServiceConnectionEntity listRelayServiceConnections(String resourceGroupName, String name) { + RelayServiceConnectionEntityInner inner = + this.serviceClient().listRelayServiceConnections(resourceGroupName, name); + if (inner != null) { + return new RelayServiceConnectionEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listRelayServiceConnectionsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listRelayServiceConnectionsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RelayServiceConnectionEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RelayServiceConnectionEntity getRelayServiceConnection( + String resourceGroupName, String name, String entityName) { + RelayServiceConnectionEntityInner inner = + this.serviceClient().getRelayServiceConnection(resourceGroupName, name, entityName); + if (inner != null) { + return new RelayServiceConnectionEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getRelayServiceConnectionWithResponse( + String resourceGroupName, String name, String entityName, Context context) { + Response inner = + this.serviceClient().getRelayServiceConnectionWithResponse(resourceGroupName, name, entityName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RelayServiceConnectionEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteRelayServiceConnection(String resourceGroupName, String name, String entityName) { + this.serviceClient().deleteRelayServiceConnection(resourceGroupName, name, entityName); + } + + public Response deleteRelayServiceConnectionWithResponse( + String resourceGroupName, String name, String entityName, Context context) { + return this + .serviceClient() + .deleteRelayServiceConnectionWithResponse(resourceGroupName, name, entityName, context); + } + + public PagedIterable listInstanceIdentifiers(String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listInstanceIdentifiers(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new WebSiteInstanceStatusImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceIdentifiers( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listInstanceIdentifiers(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new WebSiteInstanceStatusImpl(inner1, this.manager())); + } + + public WebSiteInstanceStatus getInstanceInfo(String resourceGroupName, String name, String instanceId) { + WebSiteInstanceStatusInner inner = this.serviceClient().getInstanceInfo(resourceGroupName, name, instanceId); + if (inner != null) { + return new WebSiteInstanceStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceInfoWithResponse( + String resourceGroupName, String name, String instanceId, Context context) { + Response inner = + this.serviceClient().getInstanceInfoWithResponse(resourceGroupName, name, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WebSiteInstanceStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MSDeployStatus getInstanceMsDeployStatus(String resourceGroupName, String name, String instanceId) { + MSDeployStatusInner inner = this.serviceClient().getInstanceMsDeployStatus(resourceGroupName, name, instanceId); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceMsDeployStatusWithResponse( + String resourceGroupName, String name, String instanceId, Context context) { + Response inner = + this.serviceClient().getInstanceMsDeployStatusWithResponse(resourceGroupName, name, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MSDeployStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MSDeployStatus createInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy) { + MSDeployStatusInner inner = + this.serviceClient().createInstanceMSDeployOperation(resourceGroupName, name, instanceId, mSDeploy); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MSDeployStatus createInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context) { + MSDeployStatusInner inner = + this + .serviceClient() + .createInstanceMSDeployOperation(resourceGroupName, name, instanceId, mSDeploy, context); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MSDeployLog getInstanceMSDeployLog(String resourceGroupName, String name, String instanceId) { + MSDeployLogInner inner = this.serviceClient().getInstanceMSDeployLog(resourceGroupName, name, instanceId); + if (inner != null) { + return new MSDeployLogImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceMSDeployLogWithResponse( + String resourceGroupName, String name, String instanceId, Context context) { + Response inner = + this.serviceClient().getInstanceMSDeployLogWithResponse(resourceGroupName, name, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MSDeployLogImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listInstanceProcesses(String resourceGroupName, String name, String instanceId) { + PagedIterable inner = + this.serviceClient().listInstanceProcesses(resourceGroupName, name, instanceId); + return Utils.mapPage(inner, inner1 -> new ProcessInfoImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceProcesses( + String resourceGroupName, String name, String instanceId, Context context) { + PagedIterable inner = + this.serviceClient().listInstanceProcesses(resourceGroupName, name, instanceId, context); + return Utils.mapPage(inner, inner1 -> new ProcessInfoImpl(inner1, this.manager())); + } + + public ProcessInfo getInstanceProcess(String resourceGroupName, String name, String processId, String instanceId) { + ProcessInfoInner inner = + this.serviceClient().getInstanceProcess(resourceGroupName, name, processId, instanceId); + if (inner != null) { + return new ProcessInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceProcessWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + Response inner = + this + .serviceClient() + .getInstanceProcessWithResponse(resourceGroupName, name, processId, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ProcessInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteInstanceProcess(String resourceGroupName, String name, String processId, String instanceId) { + this.serviceClient().deleteInstanceProcess(resourceGroupName, name, processId, instanceId); + } + + public Response deleteInstanceProcessWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return this + .serviceClient() + .deleteInstanceProcessWithResponse(resourceGroupName, name, processId, instanceId, context); + } + + public InputStream getInstanceProcessDump( + String resourceGroupName, String name, String processId, String instanceId) { + return this.serviceClient().getInstanceProcessDump(resourceGroupName, name, processId, instanceId); + } + + public StreamResponse getInstanceProcessDumpWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + return this + .serviceClient() + .getInstanceProcessDumpWithResponse(resourceGroupName, name, processId, instanceId, context); + } + + public PagedIterable listInstanceProcessModules( + String resourceGroupName, String name, String processId, String instanceId) { + PagedIterable inner = + this.serviceClient().listInstanceProcessModules(resourceGroupName, name, processId, instanceId); + return Utils.mapPage(inner, inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceProcessModules( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + PagedIterable inner = + this.serviceClient().listInstanceProcessModules(resourceGroupName, name, processId, instanceId, context); + return Utils.mapPage(inner, inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())); + } + + public ProcessModuleInfo getInstanceProcessModule( + String resourceGroupName, String name, String processId, String baseAddress, String instanceId) { + ProcessModuleInfoInner inner = + this.serviceClient().getInstanceProcessModule(resourceGroupName, name, processId, baseAddress, instanceId); + if (inner != null) { + return new ProcessModuleInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceProcessModuleWithResponse( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String instanceId, + Context context) { + Response inner = + this + .serviceClient() + .getInstanceProcessModuleWithResponse( + resourceGroupName, name, processId, baseAddress, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ProcessModuleInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listInstanceProcessThreads( + String resourceGroupName, String name, String processId, String instanceId) { + PagedIterable inner = + this.serviceClient().listInstanceProcessThreads(resourceGroupName, name, processId, instanceId); + return Utils.mapPage(inner, inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceProcessThreads( + String resourceGroupName, String name, String processId, String instanceId, Context context) { + PagedIterable inner = + this.serviceClient().listInstanceProcessThreads(resourceGroupName, name, processId, instanceId, context); + return Utils.mapPage(inner, inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())); + } + + public SiteCloneability isCloneable(String resourceGroupName, String name) { + SiteCloneabilityInner inner = this.serviceClient().isCloneable(resourceGroupName, name); + if (inner != null) { + return new SiteCloneabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response isCloneableWithResponse(String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().isCloneableWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteCloneabilityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteBackups(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listSiteBackups(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new BackupItemImpl(inner1, this.manager())); + } + + public PagedIterable listSiteBackups(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listSiteBackups(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new BackupItemImpl(inner1, this.manager())); + } + + public FunctionSecrets listSyncFunctionTriggers(String resourceGroupName, String name) { + FunctionSecretsInner inner = this.serviceClient().listSyncFunctionTriggers(resourceGroupName, name); + if (inner != null) { + return new FunctionSecretsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSyncFunctionTriggersWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listSyncFunctionTriggersWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FunctionSecretsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StorageMigrationResponse migrateStorage( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions) { + StorageMigrationResponseInner inner = + this.serviceClient().migrateStorage(subscriptionName, resourceGroupName, name, migrationOptions); + if (inner != null) { + return new StorageMigrationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public StorageMigrationResponse migrateStorage( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context) { + StorageMigrationResponseInner inner = + this.serviceClient().migrateStorage(subscriptionName, resourceGroupName, name, migrationOptions, context); + if (inner != null) { + return new StorageMigrationResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Operation migrateMySql(String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope) { + OperationInner inner = this.serviceClient().migrateMySql(resourceGroupName, name, migrationRequestEnvelope); + if (inner != null) { + return new OperationImpl(inner, this.manager()); + } else { + return null; + } + } + + public Operation migrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context) { + OperationInner inner = + this.serviceClient().migrateMySql(resourceGroupName, name, migrationRequestEnvelope, context); + if (inner != null) { + return new OperationImpl(inner, this.manager()); + } else { + return null; + } + } + + public MigrateMySqlStatus getMigrateMySqlStatus(String resourceGroupName, String name) { + MigrateMySqlStatusInner inner = this.serviceClient().getMigrateMySqlStatus(resourceGroupName, name); + if (inner != null) { + return new MigrateMySqlStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getMigrateMySqlStatusWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getMigrateMySqlStatusWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MigrateMySqlStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SwiftVirtualNetwork getSwiftVirtualNetworkConnection(String resourceGroupName, String name) { + SwiftVirtualNetworkInner inner = this.serviceClient().getSwiftVirtualNetworkConnection(resourceGroupName, name); + if (inner != null) { + return new SwiftVirtualNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSwiftVirtualNetworkConnectionWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getSwiftVirtualNetworkConnectionWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SwiftVirtualNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SwiftVirtualNetwork createOrUpdateSwiftVirtualNetworkConnectionWithCheck( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + SwiftVirtualNetworkInner inner = + this + .serviceClient() + .createOrUpdateSwiftVirtualNetworkConnectionWithCheck(resourceGroupName, name, connectionEnvelope); + if (inner != null) { + return new SwiftVirtualNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponse( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponse( + resourceGroupName, name, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SwiftVirtualNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteSwiftVirtualNetwork(String resourceGroupName, String name) { + this.serviceClient().deleteSwiftVirtualNetwork(resourceGroupName, name); + } + + public Response deleteSwiftVirtualNetworkWithResponse( + String resourceGroupName, String name, Context context) { + return this.serviceClient().deleteSwiftVirtualNetworkWithResponse(resourceGroupName, name, context); + } + + public SwiftVirtualNetwork updateSwiftVirtualNetworkConnectionWithCheck( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope) { + SwiftVirtualNetworkInner inner = + this + .serviceClient() + .updateSwiftVirtualNetworkConnectionWithCheck(resourceGroupName, name, connectionEnvelope); + if (inner != null) { + return new SwiftVirtualNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSwiftVirtualNetworkConnectionWithCheckWithResponse( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context) { + Response inner = + this + .serviceClient() + .updateSwiftVirtualNetworkConnectionWithCheckWithResponse( + resourceGroupName, name, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SwiftVirtualNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkFeatures listNetworkFeatures(String resourceGroupName, String name, String view) { + NetworkFeaturesInner inner = this.serviceClient().listNetworkFeatures(resourceGroupName, name, view); + if (inner != null) { + return new NetworkFeaturesImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listNetworkFeaturesWithResponse( + String resourceGroupName, String name, String view, Context context) { + Response inner = + this.serviceClient().listNetworkFeaturesWithResponse(resourceGroupName, name, view, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NetworkFeaturesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Object getNetworkTraceOperation(String resourceGroupName, String name, String operationId) { + return this.serviceClient().getNetworkTraceOperation(resourceGroupName, name, operationId); + } + + public Response getNetworkTraceOperationWithResponse( + String resourceGroupName, String name, String operationId, Context context) { + return this.serviceClient().getNetworkTraceOperationWithResponse(resourceGroupName, name, operationId, context); + } + + public String startWebSiteNetworkTrace(String resourceGroupName, String name) { + return this.serviceClient().startWebSiteNetworkTrace(resourceGroupName, name); + } + + public Response startWebSiteNetworkTraceWithResponse( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return this + .serviceClient() + .startWebSiteNetworkTraceWithResponse( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context); + } + + public Object startWebSiteNetworkTraceOperation( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return this + .serviceClient() + .startWebSiteNetworkTraceOperation(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); + } + + public Object startWebSiteNetworkTraceOperation(String resourceGroupName, String name) { + return this.serviceClient().startWebSiteNetworkTraceOperation(resourceGroupName, name); + } + + public Object startWebSiteNetworkTraceOperation( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return this + .serviceClient() + .startWebSiteNetworkTraceOperation( + resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context); + } + + public void stopWebSiteNetworkTrace(String resourceGroupName, String name) { + this.serviceClient().stopWebSiteNetworkTrace(resourceGroupName, name); + } + + public Response stopWebSiteNetworkTraceWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().stopWebSiteNetworkTraceWithResponse(resourceGroupName, name, context); + } + + public List getNetworkTraces(String resourceGroupName, String name, String operationId) { + List inner = this.serviceClient().getNetworkTraces(resourceGroupName, name, operationId); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new NetworkTraceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> getNetworkTracesWithResponse( + String resourceGroupName, String name, String operationId, Context context) { + Response> inner = + this.serviceClient().getNetworkTracesWithResponse(resourceGroupName, name, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new NetworkTraceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public Object getNetworkTraceOperationV2(String resourceGroupName, String name, String operationId) { + return this.serviceClient().getNetworkTraceOperationV2(resourceGroupName, name, operationId); + } + + public Response getNetworkTraceOperationV2WithResponse( + String resourceGroupName, String name, String operationId, Context context) { + return this + .serviceClient() + .getNetworkTraceOperationV2WithResponse(resourceGroupName, name, operationId, context); + } + + public List getNetworkTracesV2(String resourceGroupName, String name, String operationId) { + List inner = this.serviceClient().getNetworkTracesV2(resourceGroupName, name, operationId); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new NetworkTraceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> getNetworkTracesV2WithResponse( + String resourceGroupName, String name, String operationId, Context context) { + Response> inner = + this.serviceClient().getNetworkTracesV2WithResponse(resourceGroupName, name, operationId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new NetworkTraceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public void generateNewSitePublishingPassword(String resourceGroupName, String name) { + this.serviceClient().generateNewSitePublishingPassword(resourceGroupName, name); + } + + public Response generateNewSitePublishingPasswordWithResponse( + String resourceGroupName, String name, Context context) { + return this.serviceClient().generateNewSitePublishingPasswordWithResponse(resourceGroupName, name, context); + } + + public PagedIterable listPerfMonCounters(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listPerfMonCounters(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new PerfMonResponseImpl(inner1, this.manager())); + } + + public PagedIterable listPerfMonCounters( + String resourceGroupName, String name, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listPerfMonCounters(resourceGroupName, name, filter, context); + return Utils.mapPage(inner, inner1 -> new PerfMonResponseImpl(inner1, this.manager())); + } + + public SitePhpErrorLogFlag getSitePhpErrorLogFlag(String resourceGroupName, String name) { + SitePhpErrorLogFlagInner inner = this.serviceClient().getSitePhpErrorLogFlag(resourceGroupName, name); + if (inner != null) { + return new SitePhpErrorLogFlagImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSitePhpErrorLogFlagWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getSitePhpErrorLogFlagWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SitePhpErrorLogFlagImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PremierAddOn listPremierAddOns(String resourceGroupName, String name) { + PremierAddOnInner inner = this.serviceClient().listPremierAddOns(resourceGroupName, name); + if (inner != null) { + return new PremierAddOnImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listPremierAddOnsWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().listPremierAddOnsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PremierAddOnImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PremierAddOn getPremierAddOn(String resourceGroupName, String name, String premierAddOnName) { + PremierAddOnInner inner = this.serviceClient().getPremierAddOn(resourceGroupName, name, premierAddOnName); + if (inner != null) { + return new PremierAddOnImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPremierAddOnWithResponse( + String resourceGroupName, String name, String premierAddOnName, Context context) { + Response inner = + this.serviceClient().getPremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PremierAddOnImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deletePremierAddOn(String resourceGroupName, String name, String premierAddOnName) { + this.serviceClient().deletePremierAddOn(resourceGroupName, name, premierAddOnName); + } + + public Response deletePremierAddOnWithResponse( + String resourceGroupName, String name, String premierAddOnName, Context context) { + return this.serviceClient().deletePremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, context); + } + + public PrivateAccess getPrivateAccess(String resourceGroupName, String name) { + PrivateAccessInner inner = this.serviceClient().getPrivateAccess(resourceGroupName, name); + if (inner != null) { + return new PrivateAccessImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateAccessWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getPrivateAccessWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateAccessImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateAccess putPrivateAccessVnet(String resourceGroupName, String name, PrivateAccessInner access) { + PrivateAccessInner inner = this.serviceClient().putPrivateAccessVnet(resourceGroupName, name, access); + if (inner != null) { + return new PrivateAccessImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response putPrivateAccessVnetWithResponse( + String resourceGroupName, String name, PrivateAccessInner access, Context context) { + Response inner = + this.serviceClient().putPrivateAccessVnetWithResponse(resourceGroupName, name, access, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateAccessImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().getPrivateEndpointConnectionList(resourceGroupName, name); + return Utils + .mapPage(inner, inner1 -> new RemotePrivateEndpointConnectionArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().getPrivateEndpointConnectionList(resourceGroupName, name, context); + return Utils + .mapPage(inner, inner1 -> new RemotePrivateEndpointConnectionArmResourceImpl(inner1, this.manager())); + } + + public RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this.serviceClient().getPrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + Response inner = + this + .serviceClient() + .getPrivateEndpointConnectionWithResponse( + resourceGroupName, name, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RemotePrivateEndpointConnectionArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this + .serviceClient() + .approveOrRejectPrivateEndpointConnection( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this + .serviceClient() + .approveOrRejectPrivateEndpointConnection( + resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, context); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName) { + return this + .serviceClient() + .deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName); + } + + public Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context) { + return this + .serviceClient() + .deletePrivateEndpointConnection(resourceGroupName, name, privateEndpointConnectionName, context); + } + + public PrivateLinkResourcesWrapper getPrivateLinkResources(String resourceGroupName, String name) { + PrivateLinkResourcesWrapperInner inner = this.serviceClient().getPrivateLinkResources(resourceGroupName, name); + if (inner != null) { + return new PrivateLinkResourcesWrapperImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getPrivateLinkResourcesWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourcesWrapperImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listProcesses(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listProcesses(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new ProcessInfoImpl(inner1, this.manager())); + } + + public PagedIterable listProcesses(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listProcesses(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new ProcessInfoImpl(inner1, this.manager())); + } + + public ProcessInfo getProcess(String resourceGroupName, String name, String processId) { + ProcessInfoInner inner = this.serviceClient().getProcess(resourceGroupName, name, processId); + if (inner != null) { + return new ProcessInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getProcessWithResponse( + String resourceGroupName, String name, String processId, Context context) { + Response inner = + this.serviceClient().getProcessWithResponse(resourceGroupName, name, processId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ProcessInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteProcess(String resourceGroupName, String name, String processId) { + this.serviceClient().deleteProcess(resourceGroupName, name, processId); + } + + public Response deleteProcessWithResponse( + String resourceGroupName, String name, String processId, Context context) { + return this.serviceClient().deleteProcessWithResponse(resourceGroupName, name, processId, context); + } + + public InputStream getProcessDump(String resourceGroupName, String name, String processId) { + return this.serviceClient().getProcessDump(resourceGroupName, name, processId); + } + + public StreamResponse getProcessDumpWithResponse( + String resourceGroupName, String name, String processId, Context context) { + return this.serviceClient().getProcessDumpWithResponse(resourceGroupName, name, processId, context); + } + + public PagedIterable listProcessModules( + String resourceGroupName, String name, String processId) { + PagedIterable inner = + this.serviceClient().listProcessModules(resourceGroupName, name, processId); + return Utils.mapPage(inner, inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())); + } + + public PagedIterable listProcessModules( + String resourceGroupName, String name, String processId, Context context) { + PagedIterable inner = + this.serviceClient().listProcessModules(resourceGroupName, name, processId, context); + return Utils.mapPage(inner, inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())); + } + + public ProcessModuleInfo getProcessModule( + String resourceGroupName, String name, String processId, String baseAddress) { + ProcessModuleInfoInner inner = + this.serviceClient().getProcessModule(resourceGroupName, name, processId, baseAddress); + if (inner != null) { + return new ProcessModuleInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getProcessModuleWithResponse( + String resourceGroupName, String name, String processId, String baseAddress, Context context) { + Response inner = + this.serviceClient().getProcessModuleWithResponse(resourceGroupName, name, processId, baseAddress, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ProcessModuleInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listProcessThreads( + String resourceGroupName, String name, String processId) { + PagedIterable inner = + this.serviceClient().listProcessThreads(resourceGroupName, name, processId); + return Utils.mapPage(inner, inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())); + } + + public PagedIterable listProcessThreads( + String resourceGroupName, String name, String processId, Context context) { + PagedIterable inner = + this.serviceClient().listProcessThreads(resourceGroupName, name, processId, context); + return Utils.mapPage(inner, inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())); + } + + public PagedIterable listPublicCertificates(String resourceGroupName, String name) { + PagedIterable inner = + this.serviceClient().listPublicCertificates(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new PublicCertificateImpl(inner1, this.manager())); + } + + public PagedIterable listPublicCertificates( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listPublicCertificates(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new PublicCertificateImpl(inner1, this.manager())); + } + + public PublicCertificate getPublicCertificate(String resourceGroupName, String name, String publicCertificateName) { + PublicCertificateInner inner = + this.serviceClient().getPublicCertificate(resourceGroupName, name, publicCertificateName); + if (inner != null) { + return new PublicCertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPublicCertificateWithResponse( + String resourceGroupName, String name, String publicCertificateName, Context context) { + Response inner = + this + .serviceClient() + .getPublicCertificateWithResponse(resourceGroupName, name, publicCertificateName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PublicCertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deletePublicCertificate(String resourceGroupName, String name, String publicCertificateName) { + this.serviceClient().deletePublicCertificate(resourceGroupName, name, publicCertificateName); + } + + public Response deletePublicCertificateWithResponse( + String resourceGroupName, String name, String publicCertificateName, Context context) { + return this + .serviceClient() + .deletePublicCertificateWithResponse(resourceGroupName, name, publicCertificateName, context); + } + + public InputStream listPublishingProfileXmlWithSecrets( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions) { + return this + .serviceClient() + .listPublishingProfileXmlWithSecrets(resourceGroupName, name, publishingProfileOptions); + } + + public StreamResponse listPublishingProfileXmlWithSecretsWithResponse( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions, Context context) { + return this + .serviceClient() + .listPublishingProfileXmlWithSecretsWithResponse( + resourceGroupName, name, publishingProfileOptions, context); + } + + public void resetProductionSlotConfig(String resourceGroupName, String name) { + this.serviceClient().resetProductionSlotConfig(resourceGroupName, name); + } + + public Response resetProductionSlotConfigWithResponse( + String resourceGroupName, String name, Context context) { + return this.serviceClient().resetProductionSlotConfigWithResponse(resourceGroupName, name, context); + } + + public void restart(String resourceGroupName, String name) { + this.serviceClient().restart(resourceGroupName, name); + } + + public Response restartWithResponse( + String resourceGroupName, String name, Boolean softRestart, Boolean synchronous, Context context) { + return this.serviceClient().restartWithResponse(resourceGroupName, name, softRestart, synchronous, context); + } + + public void restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request) { + this.serviceClient().restoreFromBackupBlob(resourceGroupName, name, request); + } + + public void restoreFromBackupBlob( + String resourceGroupName, String name, RestoreRequestInner request, Context context) { + this.serviceClient().restoreFromBackupBlob(resourceGroupName, name, request, context); + } + + public void restoreFromDeletedApp(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest) { + this.serviceClient().restoreFromDeletedApp(resourceGroupName, name, restoreRequest); + } + + public void restoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context) { + this.serviceClient().restoreFromDeletedApp(resourceGroupName, name, restoreRequest, context); + } + + public void restoreSnapshot(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest) { + this.serviceClient().restoreSnapshot(resourceGroupName, name, restoreRequest); + } + + public void restoreSnapshot( + String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context) { + this.serviceClient().restoreSnapshot(resourceGroupName, name, restoreRequest, context); + } + + public PagedIterable listSiteExtensions(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listSiteExtensions(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SiteExtensionInfoImpl(inner1, this.manager())); + } + + public PagedIterable listSiteExtensions(String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listSiteExtensions(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SiteExtensionInfoImpl(inner1, this.manager())); + } + + public SiteExtensionInfo getSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + SiteExtensionInfoInner inner = this.serviceClient().getSiteExtension(resourceGroupName, name, siteExtensionId); + if (inner != null) { + return new SiteExtensionInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteExtensionWithResponse( + String resourceGroupName, String name, String siteExtensionId, Context context) { + Response inner = + this.serviceClient().getSiteExtensionWithResponse(resourceGroupName, name, siteExtensionId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteExtensionInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteExtensionInfo installSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + SiteExtensionInfoInner inner = + this.serviceClient().installSiteExtension(resourceGroupName, name, siteExtensionId); + if (inner != null) { + return new SiteExtensionInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public SiteExtensionInfo installSiteExtension( + String resourceGroupName, String name, String siteExtensionId, Context context) { + SiteExtensionInfoInner inner = + this.serviceClient().installSiteExtension(resourceGroupName, name, siteExtensionId, context); + if (inner != null) { + return new SiteExtensionInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteSiteExtension(String resourceGroupName, String name, String siteExtensionId) { + this.serviceClient().deleteSiteExtension(resourceGroupName, name, siteExtensionId); + } + + public Response deleteSiteExtensionWithResponse( + String resourceGroupName, String name, String siteExtensionId, Context context) { + return this.serviceClient().deleteSiteExtensionWithResponse(resourceGroupName, name, siteExtensionId, context); + } + + public PagedIterable listSlots(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listSlots(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public PagedIterable listSlots(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listSlots(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SiteImpl(inner1, this.manager())); + } + + public Site getSlot(String resourceGroupName, String name, String slot) { + SiteInner inner = this.serviceClient().getSlot(resourceGroupName, name, slot); + if (inner != null) { + return new SiteImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSlotWithResponse(String resourceGroupName, String name, String slot, Context context) { + Response inner = this.serviceClient().getSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Site createOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { + SiteInner inner = this.serviceClient().createOrUpdateSlot(resourceGroupName, name, slot, siteEnvelope); + if (inner != null) { + return new SiteImpl(inner, this.manager()); + } else { + return null; + } + } + + public Site createOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context) { + SiteInner inner = this.serviceClient().createOrUpdateSlot(resourceGroupName, name, slot, siteEnvelope, context); + if (inner != null) { + return new SiteImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().deleteSlot(resourceGroupName, name, slot); + } + + public Response deleteSlotWithResponse( + String resourceGroupName, + String name, + String slot, + Boolean deleteMetrics, + Boolean deleteEmptyServerFarm, + Context context) { + return this + .serviceClient() + .deleteSlotWithResponse(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, context); + } + + public Site updateSlot(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope) { + SiteInner inner = this.serviceClient().updateSlot(resourceGroupName, name, slot, siteEnvelope); + if (inner != null) { + return new SiteImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSlotWithResponse( + String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, Context context) { + Response inner = + this.serviceClient().updateSlotWithResponse(resourceGroupName, name, slot, siteEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CustomHostnameAnalysisResult analyzeCustomHostnameSlot(String resourceGroupName, String name, String slot) { + CustomHostnameAnalysisResultInner inner = + this.serviceClient().analyzeCustomHostnameSlot(resourceGroupName, name, slot); + if (inner != null) { + return new CustomHostnameAnalysisResultImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response analyzeCustomHostnameSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context) { + Response inner = + this + .serviceClient() + .analyzeCustomHostnameSlotWithResponse(resourceGroupName, name, slot, hostname, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CustomHostnameAnalysisResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void applySlotConfigurationSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + this.serviceClient().applySlotConfigurationSlot(resourceGroupName, name, slot, slotSwapEntity); + } + + public Response applySlotConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + return this + .serviceClient() + .applySlotConfigurationSlotWithResponse(resourceGroupName, name, slot, slotSwapEntity, context); + } + + public BackupItem backupSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { + BackupItemInner inner = this.serviceClient().backupSlot(resourceGroupName, name, slot, request); + if (inner != null) { + return new BackupItemImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response backupSlotWithResponse( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context) { + Response inner = + this.serviceClient().backupSlotWithResponse(resourceGroupName, name, slot, request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupItemImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listBackupsSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = this.serviceClient().listBackupsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new BackupItemImpl(inner1, this.manager())); + } + + public PagedIterable listBackupsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listBackupsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new BackupItemImpl(inner1, this.manager())); + } + + public BackupItem getBackupStatusSlot(String resourceGroupName, String name, String backupId, String slot) { + BackupItemInner inner = this.serviceClient().getBackupStatusSlot(resourceGroupName, name, backupId, slot); + if (inner != null) { + return new BackupItemImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getBackupStatusSlotWithResponse( + String resourceGroupName, String name, String backupId, String slot, Context context) { + Response inner = + this.serviceClient().getBackupStatusSlotWithResponse(resourceGroupName, name, backupId, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupItemImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot) { + this.serviceClient().deleteBackupSlot(resourceGroupName, name, backupId, slot); + } + + public Response deleteBackupSlotWithResponse( + String resourceGroupName, String name, String backupId, String slot, Context context) { + return this.serviceClient().deleteBackupSlotWithResponse(resourceGroupName, name, backupId, slot, context); + } + + public BackupItem listBackupStatusSecretsSlot( + String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request) { + BackupItemInner inner = + this.serviceClient().listBackupStatusSecretsSlot(resourceGroupName, name, backupId, slot, request); + if (inner != null) { + return new BackupItemImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listBackupStatusSecretsSlotWithResponse( + String resourceGroupName, + String name, + String backupId, + String slot, + BackupRequestInner request, + Context context) { + Response inner = + this + .serviceClient() + .listBackupStatusSecretsSlotWithResponse(resourceGroupName, name, backupId, slot, request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupItemImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void restoreSlot( + String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { + this.serviceClient().restoreSlot(resourceGroupName, name, backupId, slot, request); + } + + public void restoreSlot( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context) { + this.serviceClient().restoreSlot(resourceGroupName, name, backupId, slot, request, context); + } + + public PagedIterable listBasicPublishingCredentialsPoliciesSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listBasicPublishingCredentialsPoliciesSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new CsmPublishingCredentialsPoliciesEntityImpl(inner1, this.manager())); + } + + public PagedIterable listBasicPublishingCredentialsPoliciesSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listBasicPublishingCredentialsPoliciesSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new CsmPublishingCredentialsPoliciesEntityImpl(inner1, this.manager())); + } + + public CsmPublishingCredentialsPoliciesEntity getFtpAllowedSlot( + String resourceGroupName, String name, String slot) { + CsmPublishingCredentialsPoliciesEntityInner inner = + this.serviceClient().getFtpAllowedSlot(resourceGroupName, name, slot); + if (inner != null) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getFtpAllowedSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getFtpAllowedSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CsmPublishingCredentialsPoliciesEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CsmPublishingCredentialsPoliciesEntity updateFtpAllowedSlot( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + CsmPublishingCredentialsPoliciesEntityInner inner = + this.serviceClient().updateFtpAllowedSlot(resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity); + if (inner != null) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateFtpAllowedSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + Response inner = + this + .serviceClient() + .updateFtpAllowedSlotWithResponse( + resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CsmPublishingCredentialsPoliciesEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CsmPublishingCredentialsPoliciesEntity getScmAllowedSlot( + String resourceGroupName, String name, String slot) { + CsmPublishingCredentialsPoliciesEntityInner inner = + this.serviceClient().getScmAllowedSlot(resourceGroupName, name, slot); + if (inner != null) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getScmAllowedSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getScmAllowedSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CsmPublishingCredentialsPoliciesEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CsmPublishingCredentialsPoliciesEntity updateScmAllowedSlot( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity) { + CsmPublishingCredentialsPoliciesEntityInner inner = + this.serviceClient().updateScmAllowedSlot(resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity); + if (inner != null) { + return new CsmPublishingCredentialsPoliciesEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateScmAllowedSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context) { + Response inner = + this + .serviceClient() + .updateScmAllowedSlotWithResponse( + resourceGroupName, name, slot, csmPublishingAccessPoliciesEntity, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CsmPublishingCredentialsPoliciesEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listConfigurationsSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listConfigurationsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new SiteConfigResourceImpl(inner1, this.manager())); + } + + public PagedIterable listConfigurationsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listConfigurationsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new SiteConfigResourceImpl(inner1, this.manager())); + } + + public StringDictionary updateApplicationSettingsSlot( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { + StringDictionaryInner inner = + this.serviceClient().updateApplicationSettingsSlot(resourceGroupName, name, slot, appSettings); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateApplicationSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings, Context context) { + Response inner = + this + .serviceClient() + .updateApplicationSettingsSlotWithResponse(resourceGroupName, name, slot, appSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary listApplicationSettingsSlot(String resourceGroupName, String name, String slot) { + StringDictionaryInner inner = this.serviceClient().listApplicationSettingsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listApplicationSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listApplicationSettingsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettings updateAuthSettingsSlot( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { + SiteAuthSettingsInner inner = + this.serviceClient().updateAuthSettingsSlot(resourceGroupName, name, slot, siteAuthSettings); + if (inner != null) { + return new SiteAuthSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateAuthSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings, Context context) { + Response inner = + this + .serviceClient() + .updateAuthSettingsSlotWithResponse(resourceGroupName, name, slot, siteAuthSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettings getAuthSettingsSlot(String resourceGroupName, String name, String slot) { + SiteAuthSettingsInner inner = this.serviceClient().getAuthSettingsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new SiteAuthSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAuthSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getAuthSettingsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettingsV2 updateAuthSettingsV2Slot( + String resourceGroupName, String name, String slot, SiteAuthSettingsV2Inner siteAuthSettingsV2) { + SiteAuthSettingsV2Inner inner = + this.serviceClient().updateAuthSettingsV2Slot(resourceGroupName, name, slot, siteAuthSettingsV2); + if (inner != null) { + return new SiteAuthSettingsV2Impl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateAuthSettingsV2SlotWithResponse( + String resourceGroupName, + String name, + String slot, + SiteAuthSettingsV2Inner siteAuthSettingsV2, + Context context) { + Response inner = + this + .serviceClient() + .updateAuthSettingsV2SlotWithResponse(resourceGroupName, name, slot, siteAuthSettingsV2, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsV2Impl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteAuthSettingsV2 getAuthSettingsV2Slot(String resourceGroupName, String name, String slot) { + SiteAuthSettingsV2Inner inner = this.serviceClient().getAuthSettingsV2Slot(resourceGroupName, name, slot); + if (inner != null) { + return new SiteAuthSettingsV2Impl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAuthSettingsV2SlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getAuthSettingsV2SlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteAuthSettingsV2Impl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureStoragePropertyDictionaryResource updateAzureStorageAccountsSlot( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts) { + AzureStoragePropertyDictionaryResourceInner inner = + this.serviceClient().updateAzureStorageAccountsSlot(resourceGroupName, name, slot, azureStorageAccounts); + if (inner != null) { + return new AzureStoragePropertyDictionaryResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateAzureStorageAccountsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context) { + Response inner = + this + .serviceClient() + .updateAzureStorageAccountsSlotWithResponse( + resourceGroupName, name, slot, azureStorageAccounts, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AzureStoragePropertyDictionaryResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AzureStoragePropertyDictionaryResource listAzureStorageAccountsSlot( + String resourceGroupName, String name, String slot) { + AzureStoragePropertyDictionaryResourceInner inner = + this.serviceClient().listAzureStorageAccountsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new AzureStoragePropertyDictionaryResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listAzureStorageAccountsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listAzureStorageAccountsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new AzureStoragePropertyDictionaryResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BackupRequest updateBackupConfigurationSlot( + String resourceGroupName, String name, String slot, BackupRequestInner request) { + BackupRequestInner inner = + this.serviceClient().updateBackupConfigurationSlot(resourceGroupName, name, slot, request); + if (inner != null) { + return new BackupRequestImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context) { + Response inner = + this + .serviceClient() + .updateBackupConfigurationSlotWithResponse(resourceGroupName, name, slot, request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupRequestImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteBackupConfigurationSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().deleteBackupConfigurationSlot(resourceGroupName, name, slot); + } + + public Response deleteBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().deleteBackupConfigurationSlotWithResponse(resourceGroupName, name, slot, context); + } + + public BackupRequest getBackupConfigurationSlot(String resourceGroupName, String name, String slot) { + BackupRequestInner inner = this.serviceClient().getBackupConfigurationSlot(resourceGroupName, name, slot); + if (inner != null) { + return new BackupRequestImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getBackupConfigurationSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BackupRequestImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getAppSettingsKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().getAppSettingsKeyVaultReferencesSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new ApiKVReferenceImpl(inner1, this.manager())); + } + + public PagedIterable getAppSettingsKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().getAppSettingsKeyVaultReferencesSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new ApiKVReferenceImpl(inner1, this.manager())); + } + + public ApiKVReference getAppSettingKeyVaultReferenceSlot( + String resourceGroupName, String name, String appSettingKey, String slot) { + ApiKVReferenceInner inner = + this.serviceClient().getAppSettingKeyVaultReferenceSlot(resourceGroupName, name, appSettingKey, slot); + if (inner != null) { + return new ApiKVReferenceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getAppSettingKeyVaultReferenceSlotWithResponse( + String resourceGroupName, String name, String appSettingKey, String slot, Context context) { + Response inner = + this + .serviceClient() + .getAppSettingKeyVaultReferenceSlotWithResponse(resourceGroupName, name, appSettingKey, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ApiKVReferenceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getSiteConnectionStringKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().getSiteConnectionStringKeyVaultReferencesSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new ApiKVReferenceImpl(inner1, this.manager())); + } + + public PagedIterable getSiteConnectionStringKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().getSiteConnectionStringKeyVaultReferencesSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new ApiKVReferenceImpl(inner1, this.manager())); + } + + public ApiKVReference getSiteConnectionStringKeyVaultReferenceSlot( + String resourceGroupName, String name, String connectionStringKey, String slot) { + ApiKVReferenceInner inner = + this + .serviceClient() + .getSiteConnectionStringKeyVaultReferenceSlot(resourceGroupName, name, connectionStringKey, slot); + if (inner != null) { + return new ApiKVReferenceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteConnectionStringKeyVaultReferenceSlotWithResponse( + String resourceGroupName, String name, String connectionStringKey, String slot, Context context) { + Response inner = + this + .serviceClient() + .getSiteConnectionStringKeyVaultReferenceSlotWithResponse( + resourceGroupName, name, connectionStringKey, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ApiKVReferenceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ConnectionStringDictionary updateConnectionStringsSlot( + String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { + ConnectionStringDictionaryInner inner = + this.serviceClient().updateConnectionStringsSlot(resourceGroupName, name, slot, connectionStrings); + if (inner != null) { + return new ConnectionStringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateConnectionStringsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + ConnectionStringDictionaryInner connectionStrings, + Context context) { + Response inner = + this + .serviceClient() + .updateConnectionStringsSlotWithResponse(resourceGroupName, name, slot, connectionStrings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ConnectionStringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ConnectionStringDictionary listConnectionStringsSlot(String resourceGroupName, String name, String slot) { + ConnectionStringDictionaryInner inner = + this.serviceClient().listConnectionStringsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new ConnectionStringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listConnectionStringsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listConnectionStringsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ConnectionStringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteLogsConfig getDiagnosticLogsConfigurationSlot(String resourceGroupName, String name, String slot) { + SiteLogsConfigInner inner = + this.serviceClient().getDiagnosticLogsConfigurationSlot(resourceGroupName, name, slot); + if (inner != null) { + return new SiteLogsConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDiagnosticLogsConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getDiagnosticLogsConfigurationSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteLogsConfigImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteLogsConfig updateDiagnosticLogsConfigSlot( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { + SiteLogsConfigInner inner = + this.serviceClient().updateDiagnosticLogsConfigSlot(resourceGroupName, name, slot, siteLogsConfig); + if (inner != null) { + return new SiteLogsConfigImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateDiagnosticLogsConfigSlotWithResponse( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig, Context context) { + Response inner = + this + .serviceClient() + .updateDiagnosticLogsConfigSlotWithResponse(resourceGroupName, name, slot, siteLogsConfig, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteLogsConfigImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary updateMetadataSlot( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { + StringDictionaryInner inner = this.serviceClient().updateMetadataSlot(resourceGroupName, name, slot, metadata); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateMetadataSlotWithResponse( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata, Context context) { + Response inner = + this.serviceClient().updateMetadataSlotWithResponse(resourceGroupName, name, slot, metadata, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public StringDictionary listMetadataSlot(String resourceGroupName, String name, String slot) { + StringDictionaryInner inner = this.serviceClient().listMetadataSlot(resourceGroupName, name, slot); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listMetadataSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listMetadataSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public User listPublishingCredentialsSlot(String resourceGroupName, String name, String slot) { + UserInner inner = this.serviceClient().listPublishingCredentialsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new UserImpl(inner, this.manager()); + } else { + return null; + } + } + + public User listPublishingCredentialsSlot(String resourceGroupName, String name, String slot, Context context) { + UserInner inner = this.serviceClient().listPublishingCredentialsSlot(resourceGroupName, name, slot, context); + if (inner != null) { + return new UserImpl(inner, this.manager()); + } else { + return null; + } + } + + public PushSettings updateSitePushSettingsSlot( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings) { + PushSettingsInner inner = + this.serviceClient().updateSitePushSettingsSlot(resourceGroupName, name, slot, pushSettings); + if (inner != null) { + return new PushSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSitePushSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context) { + Response inner = + this + .serviceClient() + .updateSitePushSettingsSlotWithResponse(resourceGroupName, name, slot, pushSettings, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PushSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PushSettings listSitePushSettingsSlot(String resourceGroupName, String name, String slot) { + PushSettingsInner inner = this.serviceClient().listSitePushSettingsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new PushSettingsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSitePushSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listSitePushSettingsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PushSettingsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteConfigResource getConfigurationSlot(String resourceGroupName, String name, String slot) { + SiteConfigResourceInner inner = this.serviceClient().getConfigurationSlot(resourceGroupName, name, slot); + if (inner != null) { + return new SiteConfigResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getConfigurationSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteConfigResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteConfigResource createOrUpdateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + SiteConfigResourceInner inner = + this.serviceClient().createOrUpdateConfigurationSlot(resourceGroupName, name, slot, siteConfig); + if (inner != null) { + return new SiteConfigResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateConfigurationSlotWithResponse(resourceGroupName, name, slot, siteConfig, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteConfigResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteConfigResource updateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig) { + SiteConfigResourceInner inner = + this.serviceClient().updateConfigurationSlot(resourceGroupName, name, slot, siteConfig); + if (inner != null) { + return new SiteConfigResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context) { + Response inner = + this + .serviceClient() + .updateConfigurationSlotWithResponse(resourceGroupName, name, slot, siteConfig, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteConfigResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listConfigurationSnapshotInfoSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listConfigurationSnapshotInfoSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new SiteConfigurationSnapshotInfoImpl(inner1, this.manager())); + } + + public PagedIterable listConfigurationSnapshotInfoSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listConfigurationSnapshotInfoSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new SiteConfigurationSnapshotInfoImpl(inner1, this.manager())); + } + + public SiteConfigResource getConfigurationSnapshotSlot( + String resourceGroupName, String name, String snapshotId, String slot) { + SiteConfigResourceInner inner = + this.serviceClient().getConfigurationSnapshotSlot(resourceGroupName, name, snapshotId, slot); + if (inner != null) { + return new SiteConfigResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getConfigurationSnapshotSlotWithResponse( + String resourceGroupName, String name, String snapshotId, String slot, Context context) { + Response inner = + this + .serviceClient() + .getConfigurationSnapshotSlotWithResponse(resourceGroupName, name, snapshotId, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteConfigResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void recoverSiteConfigurationSnapshotSlot( + String resourceGroupName, String name, String snapshotId, String slot) { + this.serviceClient().recoverSiteConfigurationSnapshotSlot(resourceGroupName, name, snapshotId, slot); + } + + public Response recoverSiteConfigurationSnapshotSlotWithResponse( + String resourceGroupName, String name, String snapshotId, String slot, Context context) { + return this + .serviceClient() + .recoverSiteConfigurationSnapshotSlotWithResponse(resourceGroupName, name, snapshotId, slot, context); + } + + public InputStream getWebSiteContainerLogsSlot(String resourceGroupName, String name, String slot) { + return this.serviceClient().getWebSiteContainerLogsSlot(resourceGroupName, name, slot); + } + + public StreamResponse getWebSiteContainerLogsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().getWebSiteContainerLogsSlotWithResponse(resourceGroupName, name, slot, context); + } + + public InputStream getContainerLogsZipSlot(String resourceGroupName, String name, String slot) { + return this.serviceClient().getContainerLogsZipSlot(resourceGroupName, name, slot); + } + + public StreamResponse getContainerLogsZipSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().getContainerLogsZipSlotWithResponse(resourceGroupName, name, slot, context); + } + + public PagedIterable listContinuousWebJobsSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listContinuousWebJobsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new ContinuousWebJobImpl(inner1, this.manager())); + } + + public PagedIterable listContinuousWebJobsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listContinuousWebJobsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new ContinuousWebJobImpl(inner1, this.manager())); + } + + public ContinuousWebJob getContinuousWebJobSlot( + String resourceGroupName, String name, String webJobName, String slot) { + ContinuousWebJobInner inner = + this.serviceClient().getContinuousWebJobSlot(resourceGroupName, name, webJobName, slot); + if (inner != null) { + return new ContinuousWebJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + Response inner = + this + .serviceClient() + .getContinuousWebJobSlotWithResponse(resourceGroupName, name, webJobName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ContinuousWebJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + this.serviceClient().deleteContinuousWebJobSlot(resourceGroupName, name, webJobName, slot); + } + + public Response deleteContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return this + .serviceClient() + .deleteContinuousWebJobSlotWithResponse(resourceGroupName, name, webJobName, slot, context); + } + + public void startContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + this.serviceClient().startContinuousWebJobSlot(resourceGroupName, name, webJobName, slot); + } + + public Response startContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return this + .serviceClient() + .startContinuousWebJobSlotWithResponse(resourceGroupName, name, webJobName, slot, context); + } + + public void stopContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + this.serviceClient().stopContinuousWebJobSlot(resourceGroupName, name, webJobName, slot); + } + + public Response stopContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return this + .serviceClient() + .stopContinuousWebJobSlotWithResponse(resourceGroupName, name, webJobName, slot, context); + } + + public PagedIterable listDeploymentsSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = this.serviceClient().listDeploymentsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new DeploymentImpl(inner1, this.manager())); + } + + public PagedIterable listDeploymentsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listDeploymentsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new DeploymentImpl(inner1, this.manager())); + } + + public Deployment getDeploymentSlot(String resourceGroupName, String name, String id, String slot) { + DeploymentInner inner = this.serviceClient().getDeploymentSlot(resourceGroupName, name, id, slot); + if (inner != null) { + return new DeploymentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context) { + Response inner = + this.serviceClient().getDeploymentSlotWithResponse(resourceGroupName, name, id, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeploymentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Deployment createDeploymentSlot( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment) { + DeploymentInner inner = + this.serviceClient().createDeploymentSlot(resourceGroupName, name, id, slot, deployment); + if (inner != null) { + return new DeploymentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment, Context context) { + Response inner = + this + .serviceClient() + .createDeploymentSlotWithResponse(resourceGroupName, name, id, slot, deployment, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeploymentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) { + this.serviceClient().deleteDeploymentSlot(resourceGroupName, name, id, slot); + } + + public Response deleteDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context) { + return this.serviceClient().deleteDeploymentSlotWithResponse(resourceGroupName, name, id, slot, context); + } + + public Deployment listDeploymentLogSlot(String resourceGroupName, String name, String id, String slot) { + DeploymentInner inner = this.serviceClient().listDeploymentLogSlot(resourceGroupName, name, id, slot); + if (inner != null) { + return new DeploymentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listDeploymentLogSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context) { + Response inner = + this.serviceClient().listDeploymentLogSlotWithResponse(resourceGroupName, name, id, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DeploymentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RestoreRequest discoverBackupSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + RestoreRequestInner inner = this.serviceClient().discoverBackupSlot(resourceGroupName, name, slot, request); + if (inner != null) { + return new RestoreRequestImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response discoverBackupSlotWithResponse( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + Response inner = + this.serviceClient().discoverBackupSlotWithResponse(resourceGroupName, name, slot, request, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RestoreRequestImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listDomainOwnershipIdentifiersSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listDomainOwnershipIdentifiersSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new IdentifierImpl(inner1, this.manager())); + } + + public PagedIterable listDomainOwnershipIdentifiersSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listDomainOwnershipIdentifiersSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new IdentifierImpl(inner1, this.manager())); + } + + public Identifier getDomainOwnershipIdentifierSlot( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + IdentifierInner inner = + this + .serviceClient() + .getDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot); + if (inner != null) { + return new IdentifierImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context) { + Response inner = + this + .serviceClient() + .getDomainOwnershipIdentifierSlotWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new IdentifierImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Identifier createOrUpdateDomainOwnershipIdentifierSlot( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier) { + IdentifierInner inner = + this + .serviceClient() + .createOrUpdateDomainOwnershipIdentifierSlot( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier); + if (inner != null) { + return new IdentifierImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateDomainOwnershipIdentifierSlotWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new IdentifierImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteDomainOwnershipIdentifierSlot( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot) { + this + .serviceClient() + .deleteDomainOwnershipIdentifierSlot(resourceGroupName, name, domainOwnershipIdentifierName, slot); + } + + public Response deleteDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context) { + return this + .serviceClient() + .deleteDomainOwnershipIdentifierSlotWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, slot, context); + } + + public Identifier updateDomainOwnershipIdentifierSlot( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier) { + IdentifierInner inner = + this + .serviceClient() + .updateDomainOwnershipIdentifierSlot( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier); + if (inner != null) { + return new IdentifierImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context) { + Response inner = + this + .serviceClient() + .updateDomainOwnershipIdentifierSlotWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, slot, domainOwnershipIdentifier, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new IdentifierImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MSDeployStatus getMSDeployStatusSlot(String resourceGroupName, String name, String slot) { + MSDeployStatusInner inner = this.serviceClient().getMSDeployStatusSlot(resourceGroupName, name, slot); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getMSDeployStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getMSDeployStatusSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MSDeployStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MSDeployStatus createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy) { + MSDeployStatusInner inner = + this.serviceClient().createMSDeployOperationSlot(resourceGroupName, name, slot, mSDeploy); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MSDeployStatus createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context) { + MSDeployStatusInner inner = + this.serviceClient().createMSDeployOperationSlot(resourceGroupName, name, slot, mSDeploy, context); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MSDeployLog getMSDeployLogSlot(String resourceGroupName, String name, String slot) { + MSDeployLogInner inner = this.serviceClient().getMSDeployLogSlot(resourceGroupName, name, slot); + if (inner != null) { + return new MSDeployLogImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getMSDeployLogSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getMSDeployLogSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MSDeployLogImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listInstanceFunctionsSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listInstanceFunctionsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new FunctionEnvelopeImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceFunctionsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listInstanceFunctionsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new FunctionEnvelopeImpl(inner1, this.manager())); + } + + public String getFunctionsAdminTokenSlot(String resourceGroupName, String name, String slot) { + return this.serviceClient().getFunctionsAdminTokenSlot(resourceGroupName, name, slot); + } + + public Response getFunctionsAdminTokenSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().getFunctionsAdminTokenSlotWithResponse(resourceGroupName, name, slot, context); + } + + public FunctionEnvelope getInstanceFunctionSlot( + String resourceGroupName, String name, String functionName, String slot) { + FunctionEnvelopeInner inner = + this.serviceClient().getInstanceFunctionSlot(resourceGroupName, name, functionName, slot); + if (inner != null) { + return new FunctionEnvelopeImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceFunctionSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context) { + Response inner = + this + .serviceClient() + .getInstanceFunctionSlotWithResponse(resourceGroupName, name, functionName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FunctionEnvelopeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FunctionEnvelope createInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope) { + FunctionEnvelopeInner inner = + this + .serviceClient() + .createInstanceFunctionSlot(resourceGroupName, name, functionName, slot, functionEnvelope); + if (inner != null) { + return new FunctionEnvelopeImpl(inner, this.manager()); + } else { + return null; + } + } + + public FunctionEnvelope createInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context) { + FunctionEnvelopeInner inner = + this + .serviceClient() + .createInstanceFunctionSlot(resourceGroupName, name, functionName, slot, functionEnvelope, context); + if (inner != null) { + return new FunctionEnvelopeImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot) { + this.serviceClient().deleteInstanceFunctionSlot(resourceGroupName, name, functionName, slot); + } + + public Response deleteInstanceFunctionSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context) { + return this + .serviceClient() + .deleteInstanceFunctionSlotWithResponse(resourceGroupName, name, functionName, slot, context); + } + + public KeyInfo createOrUpdateFunctionSecretSlot( + String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key) { + KeyInfoInner inner = + this + .serviceClient() + .createOrUpdateFunctionSecretSlot(resourceGroupName, name, functionName, keyName, slot, key); + if (inner != null) { + return new KeyInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateFunctionSecretSlotWithResponse( + String resourceGroupName, + String name, + String functionName, + String keyName, + String slot, + KeyInfoInner key, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateFunctionSecretSlotWithResponse( + resourceGroupName, name, functionName, keyName, slot, key, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new KeyInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteFunctionSecretSlot( + String resourceGroupName, String name, String functionName, String keyName, String slot) { + this.serviceClient().deleteFunctionSecretSlot(resourceGroupName, name, functionName, keyName, slot); + } + + public Response deleteFunctionSecretSlotWithResponse( + String resourceGroupName, String name, String functionName, String keyName, String slot, Context context) { + return this + .serviceClient() + .deleteFunctionSecretSlotWithResponse(resourceGroupName, name, functionName, keyName, slot, context); + } + + public StringDictionary listFunctionKeysSlot( + String resourceGroupName, String name, String functionName, String slot) { + StringDictionaryInner inner = + this.serviceClient().listFunctionKeysSlot(resourceGroupName, name, functionName, slot); + if (inner != null) { + return new StringDictionaryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listFunctionKeysSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context) { + Response inner = + this.serviceClient().listFunctionKeysSlotWithResponse(resourceGroupName, name, functionName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new StringDictionaryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public FunctionSecrets listFunctionSecretsSlot( + String resourceGroupName, String name, String functionName, String slot) { + FunctionSecretsInner inner = + this.serviceClient().listFunctionSecretsSlot(resourceGroupName, name, functionName, slot); + if (inner != null) { + return new FunctionSecretsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listFunctionSecretsSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context) { + Response inner = + this + .serviceClient() + .listFunctionSecretsSlotWithResponse(resourceGroupName, name, functionName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FunctionSecretsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HostKeys listHostKeysSlot(String resourceGroupName, String name, String slot) { + HostKeysInner inner = this.serviceClient().listHostKeysSlot(resourceGroupName, name, slot); + if (inner != null) { + return new HostKeysImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listHostKeysSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listHostKeysSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HostKeysImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void listSyncStatusSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().listSyncStatusSlot(resourceGroupName, name, slot); + } + + public Response listSyncStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().listSyncStatusSlotWithResponse(resourceGroupName, name, slot, context); + } + + public void syncFunctionsSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().syncFunctionsSlot(resourceGroupName, name, slot); + } + + public Response syncFunctionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().syncFunctionsSlotWithResponse(resourceGroupName, name, slot, context); + } + + public KeyInfo createOrUpdateHostSecretSlot( + String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key) { + KeyInfoInner inner = + this.serviceClient().createOrUpdateHostSecretSlot(resourceGroupName, name, keyType, keyName, slot, key); + if (inner != null) { + return new KeyInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateHostSecretSlotWithResponse( + String resourceGroupName, + String name, + String keyType, + String keyName, + String slot, + KeyInfoInner key, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateHostSecretSlotWithResponse( + resourceGroupName, name, keyType, keyName, slot, key, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new KeyInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteHostSecretSlot( + String resourceGroupName, String name, String keyType, String keyName, String slot) { + this.serviceClient().deleteHostSecretSlot(resourceGroupName, name, keyType, keyName, slot); + } + + public Response deleteHostSecretSlotWithResponse( + String resourceGroupName, String name, String keyType, String keyName, String slot, Context context) { + return this + .serviceClient() + .deleteHostSecretSlotWithResponse(resourceGroupName, name, keyType, keyName, slot, context); + } + + public PagedIterable listHostnameBindingsSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listHostnameBindingsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new HostnameBindingImpl(inner1, this.manager())); + } + + public PagedIterable listHostnameBindingsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listHostnameBindingsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new HostnameBindingImpl(inner1, this.manager())); + } + + public HostnameBinding getHostnameBindingSlot(String resourceGroupName, String name, String slot, String hostname) { + HostnameBindingInner inner = + this.serviceClient().getHostnameBindingSlot(resourceGroupName, name, slot, hostname); + if (inner != null) { + return new HostnameBindingImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getHostnameBindingSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context) { + Response inner = + this.serviceClient().getHostnameBindingSlotWithResponse(resourceGroupName, name, slot, hostname, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HostnameBindingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HostnameBinding createOrUpdateHostnameBindingSlot( + String resourceGroupName, String name, String hostname, String slot, HostnameBindingInner hostnameBinding) { + HostnameBindingInner inner = + this + .serviceClient() + .createOrUpdateHostnameBindingSlot(resourceGroupName, name, hostname, slot, hostnameBinding); + if (inner != null) { + return new HostnameBindingImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateHostnameBindingSlotWithResponse( + String resourceGroupName, + String name, + String hostname, + String slot, + HostnameBindingInner hostnameBinding, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateHostnameBindingSlotWithResponse( + resourceGroupName, name, hostname, slot, hostnameBinding, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HostnameBindingImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteHostnameBindingSlot(String resourceGroupName, String name, String slot, String hostname) { + this.serviceClient().deleteHostnameBindingSlot(resourceGroupName, name, slot, hostname); + } + + public Response deleteHostnameBindingSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context) { + return this + .serviceClient() + .deleteHostnameBindingSlotWithResponse(resourceGroupName, name, slot, hostname, context); + } + + public HybridConnection getHybridConnectionSlot( + String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + HybridConnectionInner inner = + this.serviceClient().getHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot); + if (inner != null) { + return new HybridConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getHybridConnectionSlotWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context) { + Response inner = + this + .serviceClient() + .getHybridConnectionSlotWithResponse(resourceGroupName, name, namespaceName, relayName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HybridConnection createOrUpdateHybridConnectionSlot( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope) { + HybridConnectionInner inner = + this + .serviceClient() + .createOrUpdateHybridConnectionSlot( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope); + if (inner != null) { + return new HybridConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateHybridConnectionSlotWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateHybridConnectionSlotWithResponse( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteHybridConnectionSlot( + String resourceGroupName, String name, String namespaceName, String relayName, String slot) { + this.serviceClient().deleteHybridConnectionSlot(resourceGroupName, name, namespaceName, relayName, slot); + } + + public Response deleteHybridConnectionSlotWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context) { + return this + .serviceClient() + .deleteHybridConnectionSlotWithResponse(resourceGroupName, name, namespaceName, relayName, slot, context); + } + + public HybridConnection updateHybridConnectionSlot( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope) { + HybridConnectionInner inner = + this + .serviceClient() + .updateHybridConnectionSlot( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope); + if (inner != null) { + return new HybridConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateHybridConnectionSlotWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateHybridConnectionSlotWithResponse( + resourceGroupName, name, namespaceName, relayName, slot, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public HybridConnection listHybridConnectionsSlot(String resourceGroupName, String name, String slot) { + HybridConnectionInner inner = this.serviceClient().listHybridConnectionsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new HybridConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listHybridConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listHybridConnectionsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new HybridConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RelayServiceConnectionEntity listRelayServiceConnectionsSlot( + String resourceGroupName, String name, String slot) { + RelayServiceConnectionEntityInner inner = + this.serviceClient().listRelayServiceConnectionsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new RelayServiceConnectionEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listRelayServiceConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listRelayServiceConnectionsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RelayServiceConnectionEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RelayServiceConnectionEntity getRelayServiceConnectionSlot( + String resourceGroupName, String name, String entityName, String slot) { + RelayServiceConnectionEntityInner inner = + this.serviceClient().getRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot); + if (inner != null) { + return new RelayServiceConnectionEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getRelayServiceConnectionSlotWithResponse( + String resourceGroupName, String name, String entityName, String slot, Context context) { + Response inner = + this + .serviceClient() + .getRelayServiceConnectionSlotWithResponse(resourceGroupName, name, entityName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RelayServiceConnectionEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RelayServiceConnectionEntity createOrUpdateRelayServiceConnectionSlot( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope) { + RelayServiceConnectionEntityInner inner = + this + .serviceClient() + .createOrUpdateRelayServiceConnectionSlot( + resourceGroupName, name, entityName, slot, connectionEnvelope); + if (inner != null) { + return new RelayServiceConnectionEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateRelayServiceConnectionSlotWithResponse( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateRelayServiceConnectionSlotWithResponse( + resourceGroupName, name, entityName, slot, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RelayServiceConnectionEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteRelayServiceConnectionSlot( + String resourceGroupName, String name, String entityName, String slot) { + this.serviceClient().deleteRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot); + } + + public Response deleteRelayServiceConnectionSlotWithResponse( + String resourceGroupName, String name, String entityName, String slot, Context context) { + return this + .serviceClient() + .deleteRelayServiceConnectionSlotWithResponse(resourceGroupName, name, entityName, slot, context); + } + + public RelayServiceConnectionEntity updateRelayServiceConnectionSlot( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope) { + RelayServiceConnectionEntityInner inner = + this + .serviceClient() + .updateRelayServiceConnectionSlot(resourceGroupName, name, entityName, slot, connectionEnvelope); + if (inner != null) { + return new RelayServiceConnectionEntityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateRelayServiceConnectionSlotWithResponse( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateRelayServiceConnectionSlotWithResponse( + resourceGroupName, name, entityName, slot, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RelayServiceConnectionEntityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listInstanceIdentifiersSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listInstanceIdentifiersSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new WebSiteInstanceStatusImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceIdentifiersSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listInstanceIdentifiersSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new WebSiteInstanceStatusImpl(inner1, this.manager())); + } + + public WebSiteInstanceStatus getInstanceInfoSlot( + String resourceGroupName, String name, String instanceId, String slot) { + WebSiteInstanceStatusInner inner = + this.serviceClient().getInstanceInfoSlot(resourceGroupName, name, instanceId, slot); + if (inner != null) { + return new WebSiteInstanceStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceInfoSlotWithResponse( + String resourceGroupName, String name, String instanceId, String slot, Context context) { + Response inner = + this.serviceClient().getInstanceInfoSlotWithResponse(resourceGroupName, name, instanceId, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WebSiteInstanceStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MSDeployStatus getInstanceMsDeployStatusSlot( + String resourceGroupName, String name, String slot, String instanceId) { + MSDeployStatusInner inner = + this.serviceClient().getInstanceMsDeployStatusSlot(resourceGroupName, name, slot, instanceId); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceMsDeployStatusSlotWithResponse( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + Response inner = + this + .serviceClient() + .getInstanceMsDeployStatusSlotWithResponse(resourceGroupName, name, slot, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MSDeployStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MSDeployStatus createInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy) { + MSDeployStatusInner inner = + this + .serviceClient() + .createInstanceMSDeployOperationSlot(resourceGroupName, name, slot, instanceId, mSDeploy); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MSDeployStatus createInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context) { + MSDeployStatusInner inner = + this + .serviceClient() + .createInstanceMSDeployOperationSlot(resourceGroupName, name, slot, instanceId, mSDeploy, context); + if (inner != null) { + return new MSDeployStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public MSDeployLog getInstanceMSDeployLogSlot( + String resourceGroupName, String name, String slot, String instanceId) { + MSDeployLogInner inner = + this.serviceClient().getInstanceMSDeployLogSlot(resourceGroupName, name, slot, instanceId); + if (inner != null) { + return new MSDeployLogImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceMSDeployLogSlotWithResponse( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + Response inner = + this + .serviceClient() + .getInstanceMSDeployLogSlotWithResponse(resourceGroupName, name, slot, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MSDeployLogImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listInstanceProcessesSlot( + String resourceGroupName, String name, String slot, String instanceId) { + PagedIterable inner = + this.serviceClient().listInstanceProcessesSlot(resourceGroupName, name, slot, instanceId); + return Utils.mapPage(inner, inner1 -> new ProcessInfoImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceProcessesSlot( + String resourceGroupName, String name, String slot, String instanceId, Context context) { + PagedIterable inner = + this.serviceClient().listInstanceProcessesSlot(resourceGroupName, name, slot, instanceId, context); + return Utils.mapPage(inner, inner1 -> new ProcessInfoImpl(inner1, this.manager())); + } + + public ProcessInfo getInstanceProcessSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + ProcessInfoInner inner = + this.serviceClient().getInstanceProcessSlot(resourceGroupName, name, processId, slot, instanceId); + if (inner != null) { + return new ProcessInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + Response inner = + this + .serviceClient() + .getInstanceProcessSlotWithResponse(resourceGroupName, name, processId, slot, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ProcessInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteInstanceProcessSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + this.serviceClient().deleteInstanceProcessSlot(resourceGroupName, name, processId, slot, instanceId); + } + + public Response deleteInstanceProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return this + .serviceClient() + .deleteInstanceProcessSlotWithResponse(resourceGroupName, name, processId, slot, instanceId, context); + } + + public InputStream getInstanceProcessDumpSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + return this.serviceClient().getInstanceProcessDumpSlot(resourceGroupName, name, processId, slot, instanceId); + } + + public StreamResponse getInstanceProcessDumpSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + return this + .serviceClient() + .getInstanceProcessDumpSlotWithResponse(resourceGroupName, name, processId, slot, instanceId, context); + } + + public PagedIterable listInstanceProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + PagedIterable inner = + this.serviceClient().listInstanceProcessModulesSlot(resourceGroupName, name, processId, slot, instanceId); + return Utils.mapPage(inner, inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + PagedIterable inner = + this + .serviceClient() + .listInstanceProcessModulesSlot(resourceGroupName, name, processId, slot, instanceId, context); + return Utils.mapPage(inner, inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())); + } + + public ProcessModuleInfo getInstanceProcessModuleSlot( + String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId) { + ProcessModuleInfoInner inner = + this + .serviceClient() + .getInstanceProcessModuleSlot(resourceGroupName, name, processId, baseAddress, slot, instanceId); + if (inner != null) { + return new ProcessModuleInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getInstanceProcessModuleSlotWithResponse( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String slot, + String instanceId, + Context context) { + Response inner = + this + .serviceClient() + .getInstanceProcessModuleSlotWithResponse( + resourceGroupName, name, processId, baseAddress, slot, instanceId, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ProcessModuleInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listInstanceProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId) { + PagedIterable inner = + this.serviceClient().listInstanceProcessThreadsSlot(resourceGroupName, name, processId, slot, instanceId); + return Utils.mapPage(inner, inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())); + } + + public PagedIterable listInstanceProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context) { + PagedIterable inner = + this + .serviceClient() + .listInstanceProcessThreadsSlot(resourceGroupName, name, processId, slot, instanceId, context); + return Utils.mapPage(inner, inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())); + } + + public SiteCloneability isCloneableSlot(String resourceGroupName, String name, String slot) { + SiteCloneabilityInner inner = this.serviceClient().isCloneableSlot(resourceGroupName, name, slot); + if (inner != null) { + return new SiteCloneabilityImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response isCloneableSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().isCloneableSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteCloneabilityImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSiteBackupsSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = this.serviceClient().listSiteBackupsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new BackupItemImpl(inner1, this.manager())); + } + + public PagedIterable listSiteBackupsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listSiteBackupsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new BackupItemImpl(inner1, this.manager())); + } + + public FunctionSecrets listSyncFunctionTriggersSlot(String resourceGroupName, String name, String slot) { + FunctionSecretsInner inner = this.serviceClient().listSyncFunctionTriggersSlot(resourceGroupName, name, slot); + if (inner != null) { + return new FunctionSecretsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listSyncFunctionTriggersSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listSyncFunctionTriggersSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FunctionSecretsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public MigrateMySqlStatus getMigrateMySqlStatusSlot(String resourceGroupName, String name, String slot) { + MigrateMySqlStatusInner inner = this.serviceClient().getMigrateMySqlStatusSlot(resourceGroupName, name, slot); + if (inner != null) { + return new MigrateMySqlStatusImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getMigrateMySqlStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getMigrateMySqlStatusSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new MigrateMySqlStatusImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SwiftVirtualNetwork getSwiftVirtualNetworkConnectionSlot( + String resourceGroupName, String name, String slot) { + SwiftVirtualNetworkInner inner = + this.serviceClient().getSwiftVirtualNetworkConnectionSlot(resourceGroupName, name, slot); + if (inner != null) { + return new SwiftVirtualNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSwiftVirtualNetworkConnectionSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this + .serviceClient() + .getSwiftVirtualNetworkConnectionSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SwiftVirtualNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SwiftVirtualNetwork createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + SwiftVirtualNetworkInner inner = + this + .serviceClient() + .createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( + resourceGroupName, name, slot, connectionEnvelope); + if (inner != null) { + return new SwiftVirtualNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + resourceGroupName, name, slot, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SwiftVirtualNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteSwiftVirtualNetworkSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().deleteSwiftVirtualNetworkSlot(resourceGroupName, name, slot); + } + + public Response deleteSwiftVirtualNetworkSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().deleteSwiftVirtualNetworkSlotWithResponse(resourceGroupName, name, slot, context); + } + + public SwiftVirtualNetwork updateSwiftVirtualNetworkConnectionWithCheckSlot( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope) { + SwiftVirtualNetworkInner inner = + this + .serviceClient() + .updateSwiftVirtualNetworkConnectionWithCheckSlot(resourceGroupName, name, slot, connectionEnvelope); + if (inner != null) { + return new SwiftVirtualNetworkImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + resourceGroupName, name, slot, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SwiftVirtualNetworkImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkFeatures listNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) { + NetworkFeaturesInner inner = this.serviceClient().listNetworkFeaturesSlot(resourceGroupName, name, view, slot); + if (inner != null) { + return new NetworkFeaturesImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listNetworkFeaturesSlotWithResponse( + String resourceGroupName, String name, String view, String slot, Context context) { + Response inner = + this.serviceClient().listNetworkFeaturesSlotWithResponse(resourceGroupName, name, view, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new NetworkFeaturesImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Object getNetworkTraceOperationSlot(String resourceGroupName, String name, String operationId, String slot) { + return this.serviceClient().getNetworkTraceOperationSlot(resourceGroupName, name, operationId, slot); + } + + public Response getNetworkTraceOperationSlotWithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context) { + return this + .serviceClient() + .getNetworkTraceOperationSlotWithResponse(resourceGroupName, name, operationId, slot, context); + } + + public String startWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + return this.serviceClient().startWebSiteNetworkTraceSlot(resourceGroupName, name, slot); + } + + public Response startWebSiteNetworkTraceSlotWithResponse( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return this + .serviceClient() + .startWebSiteNetworkTraceSlotWithResponse( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context); + } + + public Object startWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return this + .serviceClient() + .startWebSiteNetworkTraceOperationSlot( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl); + } + + public Object startWebSiteNetworkTraceOperationSlot(String resourceGroupName, String name, String slot) { + return this.serviceClient().startWebSiteNetworkTraceOperationSlot(resourceGroupName, name, slot); + } + + public Object startWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return this + .serviceClient() + .startWebSiteNetworkTraceOperationSlot( + resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context); + } + + public void stopWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().stopWebSiteNetworkTraceSlot(resourceGroupName, name, slot); + } + + public Response stopWebSiteNetworkTraceSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().stopWebSiteNetworkTraceSlotWithResponse(resourceGroupName, name, slot, context); + } + + public List getNetworkTracesSlot( + String resourceGroupName, String name, String operationId, String slot) { + List inner = + this.serviceClient().getNetworkTracesSlot(resourceGroupName, name, operationId, slot); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new NetworkTraceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> getNetworkTracesSlotWithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context) { + Response> inner = + this.serviceClient().getNetworkTracesSlotWithResponse(resourceGroupName, name, operationId, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new NetworkTraceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public Object getNetworkTraceOperationSlotV2( + String resourceGroupName, String name, String operationId, String slot) { + return this.serviceClient().getNetworkTraceOperationSlotV2(resourceGroupName, name, operationId, slot); + } + + public Response getNetworkTraceOperationSlotV2WithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context) { + return this + .serviceClient() + .getNetworkTraceOperationSlotV2WithResponse(resourceGroupName, name, operationId, slot, context); + } + + public List getNetworkTracesSlotV2( + String resourceGroupName, String name, String operationId, String slot) { + List inner = + this.serviceClient().getNetworkTracesSlotV2(resourceGroupName, name, operationId, slot); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new NetworkTraceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> getNetworkTracesSlotV2WithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context) { + Response> inner = + this + .serviceClient() + .getNetworkTracesSlotV2WithResponse(resourceGroupName, name, operationId, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new NetworkTraceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public void generateNewSitePublishingPasswordSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().generateNewSitePublishingPasswordSlot(resourceGroupName, name, slot); + } + + public Response generateNewSitePublishingPasswordSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this + .serviceClient() + .generateNewSitePublishingPasswordSlotWithResponse(resourceGroupName, name, slot, context); + } + + public PagedIterable listPerfMonCountersSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listPerfMonCountersSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new PerfMonResponseImpl(inner1, this.manager())); + } + + public PagedIterable listPerfMonCountersSlot( + String resourceGroupName, String name, String slot, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listPerfMonCountersSlot(resourceGroupName, name, slot, filter, context); + return Utils.mapPage(inner, inner1 -> new PerfMonResponseImpl(inner1, this.manager())); + } + + public SitePhpErrorLogFlag getSitePhpErrorLogFlagSlot(String resourceGroupName, String name, String slot) { + SitePhpErrorLogFlagInner inner = this.serviceClient().getSitePhpErrorLogFlagSlot(resourceGroupName, name, slot); + if (inner != null) { + return new SitePhpErrorLogFlagImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSitePhpErrorLogFlagSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getSitePhpErrorLogFlagSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SitePhpErrorLogFlagImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PremierAddOn listPremierAddOnsSlot(String resourceGroupName, String name, String slot) { + PremierAddOnInner inner = this.serviceClient().listPremierAddOnsSlot(resourceGroupName, name, slot); + if (inner != null) { + return new PremierAddOnImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response listPremierAddOnsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().listPremierAddOnsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PremierAddOnImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PremierAddOn getPremierAddOnSlot( + String resourceGroupName, String name, String premierAddOnName, String slot) { + PremierAddOnInner inner = + this.serviceClient().getPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot); + if (inner != null) { + return new PremierAddOnImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPremierAddOnSlotWithResponse( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context) { + Response inner = + this + .serviceClient() + .getPremierAddOnSlotWithResponse(resourceGroupName, name, premierAddOnName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PremierAddOnImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PremierAddOn addPremierAddOnSlot( + String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn) { + PremierAddOnInner inner = + this.serviceClient().addPremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, premierAddOn); + if (inner != null) { + return new PremierAddOnImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response addPremierAddOnSlotWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnInner premierAddOn, + Context context) { + Response inner = + this + .serviceClient() + .addPremierAddOnSlotWithResponse( + resourceGroupName, name, premierAddOnName, slot, premierAddOn, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PremierAddOnImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deletePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot) { + this.serviceClient().deletePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot); + } + + public Response deletePremierAddOnSlotWithResponse( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context) { + return this + .serviceClient() + .deletePremierAddOnSlotWithResponse(resourceGroupName, name, premierAddOnName, slot, context); + } + + public PremierAddOn updatePremierAddOnSlot( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn) { + PremierAddOnInner inner = + this.serviceClient().updatePremierAddOnSlot(resourceGroupName, name, premierAddOnName, slot, premierAddOn); + if (inner != null) { + return new PremierAddOnImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updatePremierAddOnSlotWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn, + Context context) { + Response inner = + this + .serviceClient() + .updatePremierAddOnSlotWithResponse( + resourceGroupName, name, premierAddOnName, slot, premierAddOn, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PremierAddOnImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateAccess getPrivateAccessSlot(String resourceGroupName, String name, String slot) { + PrivateAccessInner inner = this.serviceClient().getPrivateAccessSlot(resourceGroupName, name, slot); + if (inner != null) { + return new PrivateAccessImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateAccessSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getPrivateAccessSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateAccessImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateAccess putPrivateAccessVnetSlot( + String resourceGroupName, String name, String slot, PrivateAccessInner access) { + PrivateAccessInner inner = this.serviceClient().putPrivateAccessVnetSlot(resourceGroupName, name, slot, access); + if (inner != null) { + return new PrivateAccessImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response putPrivateAccessVnetSlotWithResponse( + String resourceGroupName, String name, String slot, PrivateAccessInner access, Context context) { + Response inner = + this.serviceClient().putPrivateAccessVnetSlotWithResponse(resourceGroupName, name, slot, access, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateAccessImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable getPrivateEndpointConnectionListSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().getPrivateEndpointConnectionListSlot(resourceGroupName, name, slot); + return Utils + .mapPage(inner, inner1 -> new RemotePrivateEndpointConnectionArmResourceImpl(inner1, this.manager())); + } + + public PagedIterable getPrivateEndpointConnectionListSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().getPrivateEndpointConnectionListSlot(resourceGroupName, name, slot, context); + return Utils + .mapPage(inner, inner1 -> new RemotePrivateEndpointConnectionArmResourceImpl(inner1, this.manager())); + } + + public RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this + .serviceClient() + .getPrivateEndpointConnectionSlot(resourceGroupName, name, privateEndpointConnectionName, slot); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateEndpointConnectionSlotWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + Response inner = + this + .serviceClient() + .getPrivateEndpointConnectionSlotWithResponse( + resourceGroupName, name, privateEndpointConnectionName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new RemotePrivateEndpointConnectionArmResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this + .serviceClient() + .approveOrRejectPrivateEndpointConnectionSlot( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context) { + RemotePrivateEndpointConnectionArmResourceInner inner = + this + .serviceClient() + .approveOrRejectPrivateEndpointConnectionSlot( + resourceGroupName, name, privateEndpointConnectionName, slot, privateEndpointWrapper, context); + if (inner != null) { + return new RemotePrivateEndpointConnectionArmResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Object deletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot) { + return this + .serviceClient() + .deletePrivateEndpointConnectionSlot(resourceGroupName, name, privateEndpointConnectionName, slot); + } + + public Object deletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context) { + return this + .serviceClient() + .deletePrivateEndpointConnectionSlot(resourceGroupName, name, privateEndpointConnectionName, slot, context); + } + + public PrivateLinkResourcesWrapper getPrivateLinkResourcesSlot(String resourceGroupName, String name, String slot) { + PrivateLinkResourcesWrapperInner inner = + this.serviceClient().getPrivateLinkResourcesSlot(resourceGroupName, name, slot); + if (inner != null) { + return new PrivateLinkResourcesWrapperImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPrivateLinkResourcesSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getPrivateLinkResourcesSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PrivateLinkResourcesWrapperImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listProcessesSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = this.serviceClient().listProcessesSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new ProcessInfoImpl(inner1, this.manager())); + } + + public PagedIterable listProcessesSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listProcessesSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new ProcessInfoImpl(inner1, this.manager())); + } + + public ProcessInfo getProcessSlot(String resourceGroupName, String name, String processId, String slot) { + ProcessInfoInner inner = this.serviceClient().getProcessSlot(resourceGroupName, name, processId, slot); + if (inner != null) { + return new ProcessInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context) { + Response inner = + this.serviceClient().getProcessSlotWithResponse(resourceGroupName, name, processId, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ProcessInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteProcessSlot(String resourceGroupName, String name, String processId, String slot) { + this.serviceClient().deleteProcessSlot(resourceGroupName, name, processId, slot); + } + + public Response deleteProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context) { + return this.serviceClient().deleteProcessSlotWithResponse(resourceGroupName, name, processId, slot, context); + } + + public InputStream getProcessDumpSlot(String resourceGroupName, String name, String processId, String slot) { + return this.serviceClient().getProcessDumpSlot(resourceGroupName, name, processId, slot); + } + + public StreamResponse getProcessDumpSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context) { + return this.serviceClient().getProcessDumpSlotWithResponse(resourceGroupName, name, processId, slot, context); + } + + public PagedIterable listProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot) { + PagedIterable inner = + this.serviceClient().listProcessModulesSlot(resourceGroupName, name, processId, slot); + return Utils.mapPage(inner, inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())); + } + + public PagedIterable listProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listProcessModulesSlot(resourceGroupName, name, processId, slot, context); + return Utils.mapPage(inner, inner1 -> new ProcessModuleInfoImpl(inner1, this.manager())); + } + + public ProcessModuleInfo getProcessModuleSlot( + String resourceGroupName, String name, String processId, String baseAddress, String slot) { + ProcessModuleInfoInner inner = + this.serviceClient().getProcessModuleSlot(resourceGroupName, name, processId, baseAddress, slot); + if (inner != null) { + return new ProcessModuleInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getProcessModuleSlotWithResponse( + String resourceGroupName, String name, String processId, String baseAddress, String slot, Context context) { + Response inner = + this + .serviceClient() + .getProcessModuleSlotWithResponse(resourceGroupName, name, processId, baseAddress, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ProcessModuleInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot) { + PagedIterable inner = + this.serviceClient().listProcessThreadsSlot(resourceGroupName, name, processId, slot); + return Utils.mapPage(inner, inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())); + } + + public PagedIterable listProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listProcessThreadsSlot(resourceGroupName, name, processId, slot, context); + return Utils.mapPage(inner, inner1 -> new ProcessThreadInfoImpl(inner1, this.manager())); + } + + public PagedIterable listPublicCertificatesSlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listPublicCertificatesSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new PublicCertificateImpl(inner1, this.manager())); + } + + public PagedIterable listPublicCertificatesSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listPublicCertificatesSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new PublicCertificateImpl(inner1, this.manager())); + } + + public PublicCertificate getPublicCertificateSlot( + String resourceGroupName, String name, String slot, String publicCertificateName) { + PublicCertificateInner inner = + this.serviceClient().getPublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName); + if (inner != null) { + return new PublicCertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getPublicCertificateSlotWithResponse( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context) { + Response inner = + this + .serviceClient() + .getPublicCertificateSlotWithResponse(resourceGroupName, name, slot, publicCertificateName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PublicCertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PublicCertificate createOrUpdatePublicCertificateSlot( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate) { + PublicCertificateInner inner = + this + .serviceClient() + .createOrUpdatePublicCertificateSlot( + resourceGroupName, name, publicCertificateName, slot, publicCertificate); + if (inner != null) { + return new PublicCertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdatePublicCertificateSlotWithResponse( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdatePublicCertificateSlotWithResponse( + resourceGroupName, name, publicCertificateName, slot, publicCertificate, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PublicCertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deletePublicCertificateSlot( + String resourceGroupName, String name, String slot, String publicCertificateName) { + this.serviceClient().deletePublicCertificateSlot(resourceGroupName, name, slot, publicCertificateName); + } + + public Response deletePublicCertificateSlotWithResponse( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context) { + return this + .serviceClient() + .deletePublicCertificateSlotWithResponse(resourceGroupName, name, slot, publicCertificateName, context); + } + + public InputStream listPublishingProfileXmlWithSecretsSlot( + String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions) { + return this + .serviceClient() + .listPublishingProfileXmlWithSecretsSlot(resourceGroupName, name, slot, publishingProfileOptions); + } + + public StreamResponse listPublishingProfileXmlWithSecretsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingProfileOptions publishingProfileOptions, + Context context) { + return this + .serviceClient() + .listPublishingProfileXmlWithSecretsSlotWithResponse( + resourceGroupName, name, slot, publishingProfileOptions, context); + } + + public void resetSlotConfigurationSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().resetSlotConfigurationSlot(resourceGroupName, name, slot); + } + + public Response resetSlotConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().resetSlotConfigurationSlotWithResponse(resourceGroupName, name, slot, context); + } + + public void restartSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().restartSlot(resourceGroupName, name, slot); + } + + public Response restartSlotWithResponse( + String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous, Context context) { + return this + .serviceClient() + .restartSlotWithResponse(resourceGroupName, name, slot, softRestart, synchronous, context); + } + + public void restoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request) { + this.serviceClient().restoreFromBackupBlobSlot(resourceGroupName, name, slot, request); + } + + public void restoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context) { + this.serviceClient().restoreFromBackupBlobSlot(resourceGroupName, name, slot, request, context); + } + + public void restoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest) { + this.serviceClient().restoreFromDeletedAppSlot(resourceGroupName, name, slot, restoreRequest); + } + + public void restoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context) { + this.serviceClient().restoreFromDeletedAppSlot(resourceGroupName, name, slot, restoreRequest, context); + } + + public void restoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest) { + this.serviceClient().restoreSnapshotSlot(resourceGroupName, name, slot, restoreRequest); + } + + public void restoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context) { + this.serviceClient().restoreSnapshotSlot(resourceGroupName, name, slot, restoreRequest, context); + } + + public PagedIterable listSiteExtensionsSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listSiteExtensionsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new SiteExtensionInfoImpl(inner1, this.manager())); + } + + public PagedIterable listSiteExtensionsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listSiteExtensionsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new SiteExtensionInfoImpl(inner1, this.manager())); + } + + public SiteExtensionInfo getSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot) { + SiteExtensionInfoInner inner = + this.serviceClient().getSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot); + if (inner != null) { + return new SiteExtensionInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSiteExtensionSlotWithResponse( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + Response inner = + this + .serviceClient() + .getSiteExtensionSlotWithResponse(resourceGroupName, name, siteExtensionId, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteExtensionInfoImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteExtensionInfo installSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot) { + SiteExtensionInfoInner inner = + this.serviceClient().installSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot); + if (inner != null) { + return new SiteExtensionInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public SiteExtensionInfo installSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + SiteExtensionInfoInner inner = + this.serviceClient().installSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot, context); + if (inner != null) { + return new SiteExtensionInfoImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot) { + this.serviceClient().deleteSiteExtensionSlot(resourceGroupName, name, siteExtensionId, slot); + } + + public Response deleteSiteExtensionSlotWithResponse( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context) { + return this + .serviceClient() + .deleteSiteExtensionSlotWithResponse(resourceGroupName, name, siteExtensionId, slot, context); + } + + public PagedIterable listSlotDifferencesSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + PagedIterable inner = + this.serviceClient().listSlotDifferencesSlot(resourceGroupName, name, slot, slotSwapEntity); + return Utils.mapPage(inner, inner1 -> new SlotDifferenceImpl(inner1, this.manager())); + } + + public PagedIterable listSlotDifferencesSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + PagedIterable inner = + this.serviceClient().listSlotDifferencesSlot(resourceGroupName, name, slot, slotSwapEntity, context); + return Utils.mapPage(inner, inner1 -> new SlotDifferenceImpl(inner1, this.manager())); + } + + public void swapSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) { + this.serviceClient().swapSlot(resourceGroupName, name, slot, slotSwapEntity); + } + + public void swapSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context) { + this.serviceClient().swapSlot(resourceGroupName, name, slot, slotSwapEntity, context); + } + + public PagedIterable listSnapshotsSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = this.serviceClient().listSnapshotsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listSnapshotsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listSnapshotsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listSnapshotsFromDRSecondarySlot( + String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listSnapshotsFromDRSecondarySlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listSnapshotsFromDRSecondarySlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listSnapshotsFromDRSecondarySlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public SiteSourceControl getSourceControlSlot(String resourceGroupName, String name, String slot) { + SiteSourceControlInner inner = this.serviceClient().getSourceControlSlot(resourceGroupName, name, slot); + if (inner != null) { + return new SiteSourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response inner = + this.serviceClient().getSourceControlSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteSourceControlImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteSourceControl createOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + SiteSourceControlInner inner = + this.serviceClient().createOrUpdateSourceControlSlot(resourceGroupName, name, slot, siteSourceControl); + if (inner != null) { + return new SiteSourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public SiteSourceControl createOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + SiteSourceControlInner inner = + this + .serviceClient() + .createOrUpdateSourceControlSlot(resourceGroupName, name, slot, siteSourceControl, context); + if (inner != null) { + return new SiteSourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteSourceControlSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().deleteSourceControlSlot(resourceGroupName, name, slot); + } + + public Response deleteSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, String additionalFlags, Context context) { + return this + .serviceClient() + .deleteSourceControlSlotWithResponse(resourceGroupName, name, slot, additionalFlags, context); + } + + public SiteSourceControl updateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { + SiteSourceControlInner inner = + this.serviceClient().updateSourceControlSlot(resourceGroupName, name, slot, siteSourceControl); + if (inner != null) { + return new SiteSourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context) { + Response inner = + this + .serviceClient() + .updateSourceControlSlotWithResponse(resourceGroupName, name, slot, siteSourceControl, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteSourceControlImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void startSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().startSlot(resourceGroupName, name, slot); + } + + public Response startSlotWithResponse(String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().startSlotWithResponse(resourceGroupName, name, slot, context); + } + + public Object startNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl) { + return this + .serviceClient() + .startNetworkTraceSlot(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl); + } + + public Object startNetworkTraceSlot(String resourceGroupName, String name, String slot) { + return this.serviceClient().startNetworkTraceSlot(resourceGroupName, name, slot); + } + + public Object startNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return this + .serviceClient() + .startNetworkTraceSlot(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, context); + } + + public void stopSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().stopSlot(resourceGroupName, name, slot); + } + + public Response stopSlotWithResponse(String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().stopSlotWithResponse(resourceGroupName, name, slot, context); + } + + public void stopNetworkTraceSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().stopNetworkTraceSlot(resourceGroupName, name, slot); + } + + public Response stopNetworkTraceSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().stopNetworkTraceSlotWithResponse(resourceGroupName, name, slot, context); + } + + public void syncRepositorySlot(String resourceGroupName, String name, String slot) { + this.serviceClient().syncRepositorySlot(resourceGroupName, name, slot); + } + + public Response syncRepositorySlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().syncRepositorySlotWithResponse(resourceGroupName, name, slot, context); + } + + public void syncFunctionTriggersSlot(String resourceGroupName, String name, String slot) { + this.serviceClient().syncFunctionTriggersSlot(resourceGroupName, name, slot); + } + + public Response syncFunctionTriggersSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + return this.serviceClient().syncFunctionTriggersSlotWithResponse(resourceGroupName, name, slot, context); + } + + public PagedIterable listTriggeredWebJobsSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = + this.serviceClient().listTriggeredWebJobsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new TriggeredWebJobImpl(inner1, this.manager())); + } + + public PagedIterable listTriggeredWebJobsSlot( + String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listTriggeredWebJobsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new TriggeredWebJobImpl(inner1, this.manager())); + } + + public TriggeredWebJob getTriggeredWebJobSlot( + String resourceGroupName, String name, String webJobName, String slot) { + TriggeredWebJobInner inner = + this.serviceClient().getTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot); + if (inner != null) { + return new TriggeredWebJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + Response inner = + this.serviceClient().getTriggeredWebJobSlotWithResponse(resourceGroupName, name, webJobName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TriggeredWebJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + this.serviceClient().deleteTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot); + } + + public Response deleteTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return this + .serviceClient() + .deleteTriggeredWebJobSlotWithResponse(resourceGroupName, name, webJobName, slot, context); + } + + public PagedIterable listTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String slot) { + PagedIterable inner = + this.serviceClient().listTriggeredWebJobHistorySlot(resourceGroupName, name, webJobName, slot); + return Utils.mapPage(inner, inner1 -> new TriggeredJobHistoryImpl(inner1, this.manager())); + } + + public PagedIterable listTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + PagedIterable inner = + this.serviceClient().listTriggeredWebJobHistorySlot(resourceGroupName, name, webJobName, slot, context); + return Utils.mapPage(inner, inner1 -> new TriggeredJobHistoryImpl(inner1, this.manager())); + } + + public TriggeredJobHistory getTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String id, String slot) { + TriggeredJobHistoryInner inner = + this.serviceClient().getTriggeredWebJobHistorySlot(resourceGroupName, name, webJobName, id, slot); + if (inner != null) { + return new TriggeredJobHistoryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getTriggeredWebJobHistorySlotWithResponse( + String resourceGroupName, String name, String webJobName, String id, String slot, Context context) { + Response inner = + this + .serviceClient() + .getTriggeredWebJobHistorySlotWithResponse(resourceGroupName, name, webJobName, id, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TriggeredJobHistoryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void runTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + this.serviceClient().runTriggeredWebJobSlot(resourceGroupName, name, webJobName, slot); + } + + public Response runTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + return this + .serviceClient() + .runTriggeredWebJobSlotWithResponse(resourceGroupName, name, webJobName, slot, context); + } + + public PagedIterable listUsagesSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = this.serviceClient().listUsagesSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new CsmUsageQuotaImpl(inner1, this.manager())); + } + + public PagedIterable listUsagesSlot( + String resourceGroupName, String name, String slot, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listUsagesSlot(resourceGroupName, name, slot, filter, context); + return Utils.mapPage(inner, inner1 -> new CsmUsageQuotaImpl(inner1, this.manager())); + } + + public List listVnetConnectionsSlot(String resourceGroupName, String name, String slot) { + List inner = this.serviceClient().listVnetConnectionsSlot(resourceGroupName, name, slot); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new VnetInfoResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> listVnetConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context) { + Response> inner = + this.serviceClient().listVnetConnectionsSlotWithResponse(resourceGroupName, name, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new VnetInfoResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public VnetInfoResource getVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { + VnetInfoResourceInner inner = + this.serviceClient().getVnetConnectionSlot(resourceGroupName, name, vnetName, slot); + if (inner != null) { + return new VnetInfoResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getVnetConnectionSlotWithResponse( + String resourceGroupName, String name, String vnetName, String slot, Context context) { + Response inner = + this.serviceClient().getVnetConnectionSlotWithResponse(resourceGroupName, name, vnetName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetInfoResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { + this.serviceClient().deleteVnetConnectionSlot(resourceGroupName, name, vnetName, slot); + } + + public Response deleteVnetConnectionSlotWithResponse( + String resourceGroupName, String name, String vnetName, String slot, Context context) { + return this + .serviceClient() + .deleteVnetConnectionSlotWithResponse(resourceGroupName, name, vnetName, slot, context); + } + + public VnetGateway getVnetConnectionGatewaySlot( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { + VnetGatewayInner inner = + this.serviceClient().getVnetConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot); + if (inner != null) { + return new VnetGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getVnetConnectionGatewaySlotWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot, Context context) { + Response inner = + this + .serviceClient() + .getVnetConnectionGatewaySlotWithResponse( + resourceGroupName, name, vnetName, gatewayName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listWebJobsSlot(String resourceGroupName, String name, String slot) { + PagedIterable inner = this.serviceClient().listWebJobsSlot(resourceGroupName, name, slot); + return Utils.mapPage(inner, inner1 -> new WebJobImpl(inner1, this.manager())); + } + + public PagedIterable listWebJobsSlot(String resourceGroupName, String name, String slot, Context context) { + PagedIterable inner = this.serviceClient().listWebJobsSlot(resourceGroupName, name, slot, context); + return Utils.mapPage(inner, inner1 -> new WebJobImpl(inner1, this.manager())); + } + + public WebJob getWebJobSlot(String resourceGroupName, String name, String webJobName, String slot) { + WebJobInner inner = this.serviceClient().getWebJobSlot(resourceGroupName, name, webJobName, slot); + if (inner != null) { + return new WebJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context) { + Response inner = + this.serviceClient().getWebJobSlotWithResponse(resourceGroupName, name, webJobName, slot, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WebJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listSlotDifferencesFromProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + PagedIterable inner = + this.serviceClient().listSlotDifferencesFromProduction(resourceGroupName, name, slotSwapEntity); + return Utils.mapPage(inner, inner1 -> new SlotDifferenceImpl(inner1, this.manager())); + } + + public PagedIterable listSlotDifferencesFromProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + PagedIterable inner = + this.serviceClient().listSlotDifferencesFromProduction(resourceGroupName, name, slotSwapEntity, context); + return Utils.mapPage(inner, inner1 -> new SlotDifferenceImpl(inner1, this.manager())); + } + + public void swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) { + this.serviceClient().swapSlotWithProduction(resourceGroupName, name, slotSwapEntity); + } + + public void swapSlotWithProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context) { + this.serviceClient().swapSlotWithProduction(resourceGroupName, name, slotSwapEntity, context); + } + + public PagedIterable listSnapshots(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listSnapshots(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listSnapshots(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listSnapshots(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listSnapshotsFromDRSecondary(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listSnapshotsFromDRSecondary(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public PagedIterable listSnapshotsFromDRSecondary( + String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listSnapshotsFromDRSecondary(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new SnapshotImpl(inner1, this.manager())); + } + + public SiteSourceControl getSourceControl(String resourceGroupName, String name) { + SiteSourceControlInner inner = this.serviceClient().getSourceControl(resourceGroupName, name); + if (inner != null) { + return new SiteSourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getSourceControlWithResponse( + String resourceGroupName, String name, Context context) { + Response inner = + this.serviceClient().getSourceControlWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteSourceControlImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SiteSourceControl createOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + SiteSourceControlInner inner = + this.serviceClient().createOrUpdateSourceControl(resourceGroupName, name, siteSourceControl); + if (inner != null) { + return new SiteSourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public SiteSourceControl createOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + SiteSourceControlInner inner = + this.serviceClient().createOrUpdateSourceControl(resourceGroupName, name, siteSourceControl, context); + if (inner != null) { + return new SiteSourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteSourceControl(String resourceGroupName, String name) { + this.serviceClient().deleteSourceControl(resourceGroupName, name); + } + + public Response deleteSourceControlWithResponse( + String resourceGroupName, String name, String additionalFlags, Context context) { + return this.serviceClient().deleteSourceControlWithResponse(resourceGroupName, name, additionalFlags, context); + } + + public SiteSourceControl updateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { + SiteSourceControlInner inner = + this.serviceClient().updateSourceControl(resourceGroupName, name, siteSourceControl); + if (inner != null) { + return new SiteSourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateSourceControlWithResponse( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context) { + Response inner = + this.serviceClient().updateSourceControlWithResponse(resourceGroupName, name, siteSourceControl, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new SiteSourceControlImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void start(String resourceGroupName, String name) { + this.serviceClient().start(resourceGroupName, name); + } + + public Response startWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().startWithResponse(resourceGroupName, name, context); + } + + public Object startNetworkTrace( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl) { + return this + .serviceClient() + .startNetworkTrace(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl); + } + + public Object startNetworkTrace(String resourceGroupName, String name) { + return this.serviceClient().startNetworkTrace(resourceGroupName, name); + } + + public Object startNetworkTrace( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context) { + return this + .serviceClient() + .startNetworkTrace(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, context); + } + + public void stop(String resourceGroupName, String name) { + this.serviceClient().stop(resourceGroupName, name); + } + + public Response stopWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().stopWithResponse(resourceGroupName, name, context); + } + + public void stopNetworkTrace(String resourceGroupName, String name) { + this.serviceClient().stopNetworkTrace(resourceGroupName, name); + } + + public Response stopNetworkTraceWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().stopNetworkTraceWithResponse(resourceGroupName, name, context); + } + + public void syncRepository(String resourceGroupName, String name) { + this.serviceClient().syncRepository(resourceGroupName, name); + } + + public Response syncRepositoryWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().syncRepositoryWithResponse(resourceGroupName, name, context); + } + + public void syncFunctionTriggers(String resourceGroupName, String name) { + this.serviceClient().syncFunctionTriggers(resourceGroupName, name); + } + + public Response syncFunctionTriggersWithResponse(String resourceGroupName, String name, Context context) { + return this.serviceClient().syncFunctionTriggersWithResponse(resourceGroupName, name, context); + } + + public PagedIterable listTriggeredWebJobs(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listTriggeredWebJobs(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new TriggeredWebJobImpl(inner1, this.manager())); + } + + public PagedIterable listTriggeredWebJobs(String resourceGroupName, String name, Context context) { + PagedIterable inner = + this.serviceClient().listTriggeredWebJobs(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new TriggeredWebJobImpl(inner1, this.manager())); + } + + public TriggeredWebJob getTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + TriggeredWebJobInner inner = this.serviceClient().getTriggeredWebJob(resourceGroupName, name, webJobName); + if (inner != null) { + return new TriggeredWebJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + Response inner = + this.serviceClient().getTriggeredWebJobWithResponse(resourceGroupName, name, webJobName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TriggeredWebJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + this.serviceClient().deleteTriggeredWebJob(resourceGroupName, name, webJobName); + } + + public Response deleteTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return this.serviceClient().deleteTriggeredWebJobWithResponse(resourceGroupName, name, webJobName, context); + } + + public PagedIterable listTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName) { + PagedIterable inner = + this.serviceClient().listTriggeredWebJobHistory(resourceGroupName, name, webJobName); + return Utils.mapPage(inner, inner1 -> new TriggeredJobHistoryImpl(inner1, this.manager())); + } + + public PagedIterable listTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName, Context context) { + PagedIterable inner = + this.serviceClient().listTriggeredWebJobHistory(resourceGroupName, name, webJobName, context); + return Utils.mapPage(inner, inner1 -> new TriggeredJobHistoryImpl(inner1, this.manager())); + } + + public TriggeredJobHistory getTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName, String id) { + TriggeredJobHistoryInner inner = + this.serviceClient().getTriggeredWebJobHistory(resourceGroupName, name, webJobName, id); + if (inner != null) { + return new TriggeredJobHistoryImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getTriggeredWebJobHistoryWithResponse( + String resourceGroupName, String name, String webJobName, String id, Context context) { + Response inner = + this + .serviceClient() + .getTriggeredWebJobHistoryWithResponse(resourceGroupName, name, webJobName, id, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new TriggeredJobHistoryImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void runTriggeredWebJob(String resourceGroupName, String name, String webJobName) { + this.serviceClient().runTriggeredWebJob(resourceGroupName, name, webJobName); + } + + public Response runTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + return this.serviceClient().runTriggeredWebJobWithResponse(resourceGroupName, name, webJobName, context); + } + + public PagedIterable listUsages(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listUsages(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new CsmUsageQuotaImpl(inner1, this.manager())); + } + + public PagedIterable listUsages( + String resourceGroupName, String name, String filter, Context context) { + PagedIterable inner = + this.serviceClient().listUsages(resourceGroupName, name, filter, context); + return Utils.mapPage(inner, inner1 -> new CsmUsageQuotaImpl(inner1, this.manager())); + } + + public List listVnetConnections(String resourceGroupName, String name) { + List inner = this.serviceClient().listVnetConnections(resourceGroupName, name); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new VnetInfoResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public Response> listVnetConnectionsWithResponse( + String resourceGroupName, String name, Context context) { + Response> inner = + this.serviceClient().listVnetConnectionsWithResponse(resourceGroupName, name, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + inner + .getValue() + .stream() + .map(inner1 -> new VnetInfoResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return null; + } + } + + public VnetInfoResource getVnetConnection(String resourceGroupName, String name, String vnetName) { + VnetInfoResourceInner inner = this.serviceClient().getVnetConnection(resourceGroupName, name, vnetName); + if (inner != null) { + return new VnetInfoResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getVnetConnectionWithResponse( + String resourceGroupName, String name, String vnetName, Context context) { + Response inner = + this.serviceClient().getVnetConnectionWithResponse(resourceGroupName, name, vnetName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetInfoResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VnetInfoResource createOrUpdateVnetConnection( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope) { + VnetInfoResourceInner inner = + this.serviceClient().createOrUpdateVnetConnection(resourceGroupName, name, vnetName, connectionEnvelope); + if (inner != null) { + return new VnetInfoResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateVnetConnectionWithResponse( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateVnetConnectionWithResponse( + resourceGroupName, name, vnetName, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetInfoResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteVnetConnection(String resourceGroupName, String name, String vnetName) { + this.serviceClient().deleteVnetConnection(resourceGroupName, name, vnetName); + } + + public Response deleteVnetConnectionWithResponse( + String resourceGroupName, String name, String vnetName, Context context) { + return this.serviceClient().deleteVnetConnectionWithResponse(resourceGroupName, name, vnetName, context); + } + + public VnetInfoResource updateVnetConnection( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope) { + VnetInfoResourceInner inner = + this.serviceClient().updateVnetConnection(resourceGroupName, name, vnetName, connectionEnvelope); + if (inner != null) { + return new VnetInfoResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateVnetConnectionWithResponse( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateVnetConnectionWithResponse(resourceGroupName, name, vnetName, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetInfoResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VnetGateway getVnetConnectionGateway( + String resourceGroupName, String name, String vnetName, String gatewayName) { + VnetGatewayInner inner = + this.serviceClient().getVnetConnectionGateway(resourceGroupName, name, vnetName, gatewayName); + if (inner != null) { + return new VnetGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getVnetConnectionGatewayWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context) { + Response inner = + this + .serviceClient() + .getVnetConnectionGatewayWithResponse(resourceGroupName, name, vnetName, gatewayName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VnetGateway createOrUpdateVnetConnectionGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + VnetGatewayInner inner = + this + .serviceClient() + .createOrUpdateVnetConnectionGateway( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope); + if (inner != null) { + return new VnetGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateVnetConnectionGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateVnetConnectionGatewayWithResponse( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public VnetGateway updateVnetConnectionGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope) { + VnetGatewayInner inner = + this + .serviceClient() + .updateVnetConnectionGateway(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope); + if (inner != null) { + return new VnetGatewayImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateVnetConnectionGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateVnetConnectionGatewayWithResponse( + resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new VnetGatewayImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listWebJobs(String resourceGroupName, String name) { + PagedIterable inner = this.serviceClient().listWebJobs(resourceGroupName, name); + return Utils.mapPage(inner, inner1 -> new WebJobImpl(inner1, this.manager())); + } + + public PagedIterable listWebJobs(String resourceGroupName, String name, Context context) { + PagedIterable inner = this.serviceClient().listWebJobs(resourceGroupName, name, context); + return Utils.mapPage(inner, inner1 -> new WebJobImpl(inner1, this.manager())); + } + + public WebJob getWebJob(String resourceGroupName, String name, String webJobName) { + WebJobInner inner = this.serviceClient().getWebJob(resourceGroupName, name, webJobName); + if (inner != null) { + return new WebJobImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context) { + Response inner = + this.serviceClient().getWebJobWithResponse(resourceGroupName, name, webJobName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new WebJobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Site 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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, 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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, name, context); + } + + public Deployment getDeploymentById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String varId = Utils.getValueFromIdByName(id, "deployments"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + return this.getDeploymentWithResponse(resourceGroupName, name, varId, Context.NONE).getValue(); + } + + public Response getDeploymentByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String varId = Utils.getValueFromIdByName(id, "deployments"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + return this.getDeploymentWithResponse(resourceGroupName, name, varId, context); + } + + public Identifier getDomainOwnershipIdentifierById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String domainOwnershipIdentifierName = Utils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + if (domainOwnershipIdentifierName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'domainOwnershipIdentifiers'.", + id))); + } + return this + .getDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, Context.NONE) + .getValue(); + } + + public Response getDomainOwnershipIdentifierByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String domainOwnershipIdentifierName = Utils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + if (domainOwnershipIdentifierName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'domainOwnershipIdentifiers'.", + id))); + } + return this + .getDomainOwnershipIdentifierWithResponse(resourceGroupName, name, domainOwnershipIdentifierName, context); + } + + public FunctionEnvelope getFunctionById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String functionName = Utils.getValueFromIdByName(id, "functions"); + if (functionName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'functions'.", id))); + } + return this.getFunctionWithResponse(resourceGroupName, name, functionName, Context.NONE).getValue(); + } + + public Response getFunctionByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String functionName = Utils.getValueFromIdByName(id, "functions"); + if (functionName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'functions'.", id))); + } + return this.getFunctionWithResponse(resourceGroupName, name, functionName, context); + } + + public HostnameBinding getHostnameBindingById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String hostname = Utils.getValueFromIdByName(id, "hostNameBindings"); + if (hostname == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostNameBindings'.", id))); + } + return this.getHostnameBindingWithResponse(resourceGroupName, name, hostname, Context.NONE).getValue(); + } + + public Response getHostnameBindingByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String hostname = Utils.getValueFromIdByName(id, "hostNameBindings"); + if (hostname == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostNameBindings'.", id))); + } + return this.getHostnameBindingWithResponse(resourceGroupName, name, hostname, context); + } + + public HybridConnection getHybridConnectionById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "hybridConnectionNamespaces"); + if (namespaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hybridConnectionNamespaces'.", + id))); + } + String relayName = Utils.getValueFromIdByName(id, "relays"); + if (relayName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'relays'.", id))); + } + return this + .getHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, Context.NONE) + .getValue(); + } + + public Response getHybridConnectionByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "hybridConnectionNamespaces"); + if (namespaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hybridConnectionNamespaces'.", + id))); + } + String relayName = Utils.getValueFromIdByName(id, "relays"); + if (relayName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'relays'.", id))); + } + return this.getHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, context); + } + + public RelayServiceConnectionEntity getRelayServiceConnectionById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String entityName = Utils.getValueFromIdByName(id, "hybridconnection"); + if (entityName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hybridconnection'.", id))); + } + return this.getRelayServiceConnectionWithResponse(resourceGroupName, name, entityName, Context.NONE).getValue(); + } + + public Response getRelayServiceConnectionByIdWithResponse( + 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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String entityName = Utils.getValueFromIdByName(id, "hybridconnection"); + if (entityName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hybridconnection'.", id))); + } + return this.getRelayServiceConnectionWithResponse(resourceGroupName, name, entityName, context); + } + + public PremierAddOn getPremierAddOnById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String premierAddOnName = Utils.getValueFromIdByName(id, "premieraddons"); + if (premierAddOnName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'premieraddons'.", id))); + } + return this.getPremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, Context.NONE).getValue(); + } + + public Response getPremierAddOnByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String premierAddOnName = Utils.getValueFromIdByName(id, "premieraddons"); + if (premierAddOnName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'premieraddons'.", id))); + } + return this.getPremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, context); + } + + public PublicCertificate getPublicCertificateById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String publicCertificateName = Utils.getValueFromIdByName(id, "publicCertificates"); + if (publicCertificateName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'publicCertificates'.", id))); + } + return this + .getPublicCertificateWithResponse(resourceGroupName, name, publicCertificateName, Context.NONE) + .getValue(); + } + + public Response getPublicCertificateByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String publicCertificateName = Utils.getValueFromIdByName(id, "publicCertificates"); + if (publicCertificateName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'publicCertificates'.", id))); + } + return this.getPublicCertificateWithResponse(resourceGroupName, name, publicCertificateName, context); + } + + public VnetInfoResource getVnetConnectionSlotById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String vnetName = Utils.getValueFromIdByName(id, "virtualNetworkConnections"); + if (vnetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkConnections'.", + id))); + } + String slot = Utils.getValueFromIdByName(id, "slots"); + if (slot == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slots'.", id))); + } + return this.getVnetConnectionSlotWithResponse(resourceGroupName, name, vnetName, slot, Context.NONE).getValue(); + } + + public Response getVnetConnectionSlotByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String vnetName = Utils.getValueFromIdByName(id, "virtualNetworkConnections"); + if (vnetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkConnections'.", + id))); + } + String slot = Utils.getValueFromIdByName(id, "slots"); + if (slot == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slots'.", id))); + } + return this.getVnetConnectionSlotWithResponse(resourceGroupName, name, vnetName, slot, context); + } + + public VnetGateway getVnetConnectionGatewaySlotById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String vnetName = Utils.getValueFromIdByName(id, "virtualNetworkConnections"); + if (vnetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkConnections'.", + id))); + } + String gatewayName = Utils.getValueFromIdByName(id, "gateways"); + if (gatewayName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id))); + } + String slot = Utils.getValueFromIdByName(id, "slots"); + if (slot == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slots'.", id))); + } + return this + .getVnetConnectionGatewaySlotWithResponse( + resourceGroupName, name, vnetName, gatewayName, slot, Context.NONE) + .getValue(); + } + + public Response getVnetConnectionGatewaySlotByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String vnetName = Utils.getValueFromIdByName(id, "virtualNetworkConnections"); + if (vnetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkConnections'.", + id))); + } + String gatewayName = Utils.getValueFromIdByName(id, "gateways"); + if (gatewayName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'gateways'.", id))); + } + String slot = Utils.getValueFromIdByName(id, "slots"); + if (slot == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slots'.", id))); + } + return this + .getVnetConnectionGatewaySlotWithResponse(resourceGroupName, name, vnetName, gatewayName, slot, 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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + Boolean localDeleteMetrics = null; + Boolean localDeleteEmptyServerFarm = null; + this.deleteWithResponse(resourceGroupName, name, localDeleteMetrics, localDeleteEmptyServerFarm, Context.NONE); + } + + public Response deleteByIdWithResponse( + String id, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, 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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + return this.deleteWithResponse(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, context); + } + + public void deleteDeploymentById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String varId = Utils.getValueFromIdByName(id, "deployments"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + this.deleteDeploymentWithResponse(resourceGroupName, name, varId, Context.NONE); + } + + public Response deleteDeploymentByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String varId = Utils.getValueFromIdByName(id, "deployments"); + if (varId == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'deployments'.", id))); + } + return this.deleteDeploymentWithResponse(resourceGroupName, name, varId, context); + } + + public void deleteDomainOwnershipIdentifierById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String domainOwnershipIdentifierName = Utils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + if (domainOwnershipIdentifierName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'domainOwnershipIdentifiers'.", + id))); + } + this + .deleteDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, Context.NONE); + } + + public Response deleteDomainOwnershipIdentifierByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String domainOwnershipIdentifierName = Utils.getValueFromIdByName(id, "domainOwnershipIdentifiers"); + if (domainOwnershipIdentifierName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'domainOwnershipIdentifiers'.", + id))); + } + return this + .deleteDomainOwnershipIdentifierWithResponse( + resourceGroupName, name, domainOwnershipIdentifierName, context); + } + + public void deleteFunctionById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String functionName = Utils.getValueFromIdByName(id, "functions"); + if (functionName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'functions'.", id))); + } + this.deleteFunctionWithResponse(resourceGroupName, name, functionName, Context.NONE); + } + + public Response deleteFunctionByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String functionName = Utils.getValueFromIdByName(id, "functions"); + if (functionName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'functions'.", id))); + } + return this.deleteFunctionWithResponse(resourceGroupName, name, functionName, context); + } + + public void deleteHostnameBindingById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String hostname = Utils.getValueFromIdByName(id, "hostNameBindings"); + if (hostname == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostNameBindings'.", id))); + } + this.deleteHostnameBindingWithResponse(resourceGroupName, name, hostname, Context.NONE); + } + + public Response deleteHostnameBindingByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String hostname = Utils.getValueFromIdByName(id, "hostNameBindings"); + if (hostname == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hostNameBindings'.", id))); + } + return this.deleteHostnameBindingWithResponse(resourceGroupName, name, hostname, context); + } + + public void deleteHybridConnectionById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "hybridConnectionNamespaces"); + if (namespaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hybridConnectionNamespaces'.", + id))); + } + String relayName = Utils.getValueFromIdByName(id, "relays"); + if (relayName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'relays'.", id))); + } + this.deleteHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, Context.NONE); + } + + public Response deleteHybridConnectionByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String namespaceName = Utils.getValueFromIdByName(id, "hybridConnectionNamespaces"); + if (namespaceName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hybridConnectionNamespaces'.", + id))); + } + String relayName = Utils.getValueFromIdByName(id, "relays"); + if (relayName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'relays'.", id))); + } + return this.deleteHybridConnectionWithResponse(resourceGroupName, name, namespaceName, relayName, context); + } + + public void deleteRelayServiceConnectionById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String entityName = Utils.getValueFromIdByName(id, "hybridconnection"); + if (entityName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hybridconnection'.", id))); + } + this.deleteRelayServiceConnectionWithResponse(resourceGroupName, name, entityName, Context.NONE); + } + + public Response deleteRelayServiceConnectionByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String entityName = Utils.getValueFromIdByName(id, "hybridconnection"); + if (entityName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'hybridconnection'.", id))); + } + return this.deleteRelayServiceConnectionWithResponse(resourceGroupName, name, entityName, context); + } + + public void deletePremierAddOnById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String premierAddOnName = Utils.getValueFromIdByName(id, "premieraddons"); + if (premierAddOnName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'premieraddons'.", id))); + } + this.deletePremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, Context.NONE); + } + + public Response deletePremierAddOnByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String premierAddOnName = Utils.getValueFromIdByName(id, "premieraddons"); + if (premierAddOnName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'premieraddons'.", id))); + } + return this.deletePremierAddOnWithResponse(resourceGroupName, name, premierAddOnName, context); + } + + public void deletePublicCertificateById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String publicCertificateName = Utils.getValueFromIdByName(id, "publicCertificates"); + if (publicCertificateName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'publicCertificates'.", id))); + } + this.deletePublicCertificateWithResponse(resourceGroupName, name, publicCertificateName, Context.NONE); + } + + public Response deletePublicCertificateByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String publicCertificateName = Utils.getValueFromIdByName(id, "publicCertificates"); + if (publicCertificateName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'publicCertificates'.", id))); + } + return this.deletePublicCertificateWithResponse(resourceGroupName, name, publicCertificateName, context); + } + + public void deleteVnetConnectionSlotById(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String vnetName = Utils.getValueFromIdByName(id, "virtualNetworkConnections"); + if (vnetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkConnections'.", + id))); + } + String slot = Utils.getValueFromIdByName(id, "slots"); + if (slot == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slots'.", id))); + } + this.deleteVnetConnectionSlotWithResponse(resourceGroupName, name, vnetName, slot, Context.NONE); + } + + public Response deleteVnetConnectionSlotByIdWithResponse(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 name = Utils.getValueFromIdByName(id, "sites"); + if (name == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sites'.", id))); + } + String vnetName = Utils.getValueFromIdByName(id, "virtualNetworkConnections"); + if (vnetName == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'virtualNetworkConnections'.", + id))); + } + String slot = Utils.getValueFromIdByName(id, "slots"); + if (slot == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'slots'.", id))); + } + return this.deleteVnetConnectionSlotWithResponse(resourceGroupName, name, vnetName, slot, context); + } + + private WebAppsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + public SiteImpl define(String name) { + return new SiteImpl(name, this.manager()); + } + + public DeploymentImpl defineDeployment(String name) { + return new DeploymentImpl(name, this.manager()); + } + + public IdentifierImpl defineDomainOwnershipIdentifier(String name) { + return new IdentifierImpl(name, this.manager()); + } + + public FunctionEnvelopeImpl defineFunction(String name) { + return new FunctionEnvelopeImpl(name, this.manager()); + } + + public HostnameBindingImpl defineHostnameBinding(String name) { + return new HostnameBindingImpl(name, this.manager()); + } + + public HybridConnectionImpl defineHybridConnection(String name) { + return new HybridConnectionImpl(name, this.manager()); + } + + public RelayServiceConnectionEntityImpl defineRelayServiceConnection(String name) { + return new RelayServiceConnectionEntityImpl(name, this.manager()); + } + + public PremierAddOnImpl definePremierAddOn(String name) { + return new PremierAddOnImpl(name, this.manager()); + } + + public PublicCertificateImpl definePublicCertificate(String name) { + return new PublicCertificateImpl(name, this.manager()); + } + + public VnetInfoResourceImpl defineVnetConnectionSlot(String name) { + return new VnetInfoResourceImpl(name, this.manager()); + } + + public VnetGatewayImpl defineVnetConnectionGatewaySlot(String name) { + return new VnetGatewayImpl(name, this.manager()); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebJobImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebJobImpl.java new file mode 100644 index 0000000000000..3dac61f1d26fe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebJobImpl.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.WebJobInner; +import com.azure.resourcemanager.appservice.generated.models.WebJob; +import com.azure.resourcemanager.appservice.generated.models.WebJobType; +import java.util.Collections; +import java.util.Map; + +public final class WebJobImpl implements WebJob { + private WebJobInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + WebJobImpl( + WebJobInner innerObject, com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public String runCommand() { + return this.innerModel().runCommand(); + } + + public String url() { + return this.innerModel().url(); + } + + public String extraInfoUrl() { + return this.innerModel().extraInfoUrl(); + } + + public WebJobType webJobType() { + return this.innerModel().webJobType(); + } + + public String error() { + return this.innerModel().error(); + } + + public Boolean usingSdk() { + return this.innerModel().usingSdk(); + } + + public Map settings() { + Map inner = this.innerModel().settings(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public WebJobInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteInstanceStatusImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteInstanceStatusImpl.java new file mode 100644 index 0000000000000..10d6d4901c3a6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteInstanceStatusImpl.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.appservice.generated.implementation; + +import com.azure.resourcemanager.appservice.generated.fluent.models.WebSiteInstanceStatusInner; +import com.azure.resourcemanager.appservice.generated.models.ContainerInfo; +import com.azure.resourcemanager.appservice.generated.models.SiteRuntimeState; +import com.azure.resourcemanager.appservice.generated.models.WebSiteInstanceStatus; +import java.util.Collections; +import java.util.Map; + +public final class WebSiteInstanceStatusImpl implements WebSiteInstanceStatus { + private WebSiteInstanceStatusInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + WebSiteInstanceStatusImpl( + WebSiteInstanceStatusInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager 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 kind() { + return this.innerModel().kind(); + } + + public SiteRuntimeState state() { + return this.innerModel().state(); + } + + public String statusUrl() { + return this.innerModel().statusUrl(); + } + + public String detectorUrl() { + return this.innerModel().detectorUrl(); + } + + public String consoleUrl() { + return this.innerModel().consoleUrl(); + } + + public String healthCheckUrl() { + return this.innerModel().healthCheckUrl(); + } + + public Map containers() { + Map inner = this.innerModel().containers(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public WebSiteInstanceStatusInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteManagementClientBuilder.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteManagementClientBuilder.java new file mode 100644 index 0000000000000..26917a8efe410 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteManagementClientBuilder.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.serializer.SerializerFactory; +import com.azure.core.util.serializer.SerializerAdapter; +import java.time.Duration; + +/** A builder for creating a new instance of the WebSiteManagementClientImpl type. */ +@ServiceClientBuilder(serviceClients = {WebSiteManagementClientImpl.class}) +public final class WebSiteManagementClientBuilder { + /* + * Your Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + */ + private String subscriptionId; + + /** + * Sets Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @param subscriptionId the subscriptionId value. + * @return the WebSiteManagementClientBuilder. + */ + public WebSiteManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /* + * server parameter + */ + private String endpoint; + + /** + * Sets server parameter. + * + * @param endpoint the endpoint value. + * @return the WebSiteManagementClientBuilder. + */ + public WebSiteManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The environment to connect to + */ + private AzureEnvironment environment; + + /** + * Sets The environment to connect to. + * + * @param environment the environment value. + * @return the WebSiteManagementClientBuilder. + */ + public WebSiteManagementClientBuilder environment(AzureEnvironment environment) { + this.environment = environment; + return this; + } + + /* + * The default poll interval for long-running operation + */ + private Duration defaultPollInterval; + + /** + * Sets The default poll interval for long-running operation. + * + * @param defaultPollInterval the defaultPollInterval value. + * @return the WebSiteManagementClientBuilder. + */ + public WebSiteManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; + return this; + } + + /* + * The HTTP pipeline to send requests through + */ + private HttpPipeline pipeline; + + /** + * Sets The HTTP pipeline to send requests through. + * + * @param pipeline the pipeline value. + * @return the WebSiteManagementClientBuilder. + */ + public WebSiteManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the WebSiteManagementClientBuilder. + */ + public WebSiteManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /** + * Builds an instance of WebSiteManagementClientImpl with the provided parameters. + * + * @return an instance of WebSiteManagementClientImpl. + */ + public WebSiteManagementClientImpl buildClient() { + if (endpoint == null) { + this.endpoint = "https://management.azure.com"; + } + if (environment == null) { + this.environment = AzureEnvironment.AZURE; + } + if (defaultPollInterval == null) { + this.defaultPollInterval = Duration.ofSeconds(30); + } + if (pipeline == null) { + this.pipeline = + new HttpPipelineBuilder() + .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) + .build(); + } + if (serializerAdapter == null) { + this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); + } + WebSiteManagementClientImpl client = + new WebSiteManagementClientImpl( + pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + return client; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteManagementClientImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteManagementClientImpl.java new file mode 100644 index 0000000000000..7030e8a77c309 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WebSiteManagementClientImpl.java @@ -0,0 +1,574 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpResponse; +import com.azure.core.http.rest.Response; +import com.azure.core.management.AzureEnvironment; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.management.polling.PollerFactory; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.AsyncPollResponse; +import com.azure.core.util.polling.LongRunningOperationStatus; +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.appservice.generated.fluent.AppServiceCertificateOrdersClient; +import com.azure.resourcemanager.appservice.generated.fluent.AppServiceEnvironmentsClient; +import com.azure.resourcemanager.appservice.generated.fluent.AppServicePlansClient; +import com.azure.resourcemanager.appservice.generated.fluent.CertificateOrdersDiagnosticsClient; +import com.azure.resourcemanager.appservice.generated.fluent.CertificateRegistrationProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.CertificatesClient; +import com.azure.resourcemanager.appservice.generated.fluent.ContainerAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.ContainerAppsRevisionsClient; +import com.azure.resourcemanager.appservice.generated.fluent.DeletedWebAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.DiagnosticsClient; +import com.azure.resourcemanager.appservice.generated.fluent.DomainRegistrationProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.DomainsClient; +import com.azure.resourcemanager.appservice.generated.fluent.GlobalsClient; +import com.azure.resourcemanager.appservice.generated.fluent.KubeEnvironmentsClient; +import com.azure.resourcemanager.appservice.generated.fluent.ProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.RecommendationsClient; +import com.azure.resourcemanager.appservice.generated.fluent.ResourceHealthMetadatasClient; +import com.azure.resourcemanager.appservice.generated.fluent.ResourceProvidersClient; +import com.azure.resourcemanager.appservice.generated.fluent.StaticSitesClient; +import com.azure.resourcemanager.appservice.generated.fluent.TopLevelDomainsClient; +import com.azure.resourcemanager.appservice.generated.fluent.WebAppsClient; +import com.azure.resourcemanager.appservice.generated.fluent.WebSiteManagementClient; +import java.io.IOException; +import java.lang.reflect.Type; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.Map; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** Initializes a new instance of the WebSiteManagementClientImpl type. */ +@ServiceClient(builder = WebSiteManagementClientBuilder.class) +public final class WebSiteManagementClientImpl implements WebSiteManagementClient { + private final ClientLogger logger = new ClientLogger(WebSiteManagementClientImpl.class); + + /** Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ + private final String subscriptionId; + + /** + * Gets Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + + /** server parameter. */ + private final String endpoint; + + /** + * Gets server parameter. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** Api Version. */ + private final String apiVersion; + + /** + * Gets Api Version. + * + * @return the apiVersion value. + */ + public String getApiVersion() { + return this.apiVersion; + } + + /** The HTTP pipeline to send requests through. */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** The serializer to serialize an object into a string. */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** The default poll interval for long-running operation. */ + private final Duration defaultPollInterval; + + /** + * Gets The default poll interval for long-running operation. + * + * @return the defaultPollInterval value. + */ + public Duration getDefaultPollInterval() { + return this.defaultPollInterval; + } + + /** The AppServiceCertificateOrdersClient object to access its operations. */ + private final AppServiceCertificateOrdersClient appServiceCertificateOrders; + + /** + * Gets the AppServiceCertificateOrdersClient object to access its operations. + * + * @return the AppServiceCertificateOrdersClient object. + */ + public AppServiceCertificateOrdersClient getAppServiceCertificateOrders() { + return this.appServiceCertificateOrders; + } + + /** The CertificateOrdersDiagnosticsClient object to access its operations. */ + private final CertificateOrdersDiagnosticsClient certificateOrdersDiagnostics; + + /** + * Gets the CertificateOrdersDiagnosticsClient object to access its operations. + * + * @return the CertificateOrdersDiagnosticsClient object. + */ + public CertificateOrdersDiagnosticsClient getCertificateOrdersDiagnostics() { + return this.certificateOrdersDiagnostics; + } + + /** The CertificateRegistrationProvidersClient object to access its operations. */ + private final CertificateRegistrationProvidersClient certificateRegistrationProviders; + + /** + * Gets the CertificateRegistrationProvidersClient object to access its operations. + * + * @return the CertificateRegistrationProvidersClient object. + */ + public CertificateRegistrationProvidersClient getCertificateRegistrationProviders() { + return this.certificateRegistrationProviders; + } + + /** The DomainsClient object to access its operations. */ + private final DomainsClient domains; + + /** + * Gets the DomainsClient object to access its operations. + * + * @return the DomainsClient object. + */ + public DomainsClient getDomains() { + return this.domains; + } + + /** The TopLevelDomainsClient object to access its operations. */ + private final TopLevelDomainsClient topLevelDomains; + + /** + * Gets the TopLevelDomainsClient object to access its operations. + * + * @return the TopLevelDomainsClient object. + */ + public TopLevelDomainsClient getTopLevelDomains() { + return this.topLevelDomains; + } + + /** The DomainRegistrationProvidersClient object to access its operations. */ + private final DomainRegistrationProvidersClient domainRegistrationProviders; + + /** + * Gets the DomainRegistrationProvidersClient object to access its operations. + * + * @return the DomainRegistrationProvidersClient object. + */ + public DomainRegistrationProvidersClient getDomainRegistrationProviders() { + return this.domainRegistrationProviders; + } + + /** The AppServiceEnvironmentsClient object to access its operations. */ + private final AppServiceEnvironmentsClient appServiceEnvironments; + + /** + * Gets the AppServiceEnvironmentsClient object to access its operations. + * + * @return the AppServiceEnvironmentsClient object. + */ + public AppServiceEnvironmentsClient getAppServiceEnvironments() { + return this.appServiceEnvironments; + } + + /** The AppServicePlansClient object to access its operations. */ + private final AppServicePlansClient appServicePlans; + + /** + * Gets the AppServicePlansClient object to access its operations. + * + * @return the AppServicePlansClient object. + */ + public AppServicePlansClient getAppServicePlans() { + return this.appServicePlans; + } + + /** The CertificatesClient object to access its operations. */ + private final CertificatesClient certificates; + + /** + * Gets the CertificatesClient object to access its operations. + * + * @return the CertificatesClient object. + */ + public CertificatesClient getCertificates() { + return this.certificates; + } + + /** The ContainerAppsClient object to access its operations. */ + private final ContainerAppsClient containerApps; + + /** + * Gets the ContainerAppsClient object to access its operations. + * + * @return the ContainerAppsClient object. + */ + public ContainerAppsClient getContainerApps() { + return this.containerApps; + } + + /** The ContainerAppsRevisionsClient object to access its operations. */ + private final ContainerAppsRevisionsClient containerAppsRevisions; + + /** + * Gets the ContainerAppsRevisionsClient object to access its operations. + * + * @return the ContainerAppsRevisionsClient object. + */ + public ContainerAppsRevisionsClient getContainerAppsRevisions() { + return this.containerAppsRevisions; + } + + /** The DeletedWebAppsClient object to access its operations. */ + private final DeletedWebAppsClient deletedWebApps; + + /** + * Gets the DeletedWebAppsClient object to access its operations. + * + * @return the DeletedWebAppsClient object. + */ + public DeletedWebAppsClient getDeletedWebApps() { + return this.deletedWebApps; + } + + /** The DiagnosticsClient object to access its operations. */ + private final DiagnosticsClient diagnostics; + + /** + * Gets the DiagnosticsClient object to access its operations. + * + * @return the DiagnosticsClient object. + */ + public DiagnosticsClient getDiagnostics() { + return this.diagnostics; + } + + /** The GlobalsClient object to access its operations. */ + private final GlobalsClient globals; + + /** + * Gets the GlobalsClient object to access its operations. + * + * @return the GlobalsClient object. + */ + public GlobalsClient getGlobals() { + return this.globals; + } + + /** The KubeEnvironmentsClient object to access its operations. */ + private final KubeEnvironmentsClient kubeEnvironments; + + /** + * Gets the KubeEnvironmentsClient object to access its operations. + * + * @return the KubeEnvironmentsClient object. + */ + public KubeEnvironmentsClient getKubeEnvironments() { + return this.kubeEnvironments; + } + + /** The ProvidersClient object to access its operations. */ + private final ProvidersClient providers; + + /** + * Gets the ProvidersClient object to access its operations. + * + * @return the ProvidersClient object. + */ + public ProvidersClient getProviders() { + return this.providers; + } + + /** The RecommendationsClient object to access its operations. */ + private final RecommendationsClient recommendations; + + /** + * Gets the RecommendationsClient object to access its operations. + * + * @return the RecommendationsClient object. + */ + public RecommendationsClient getRecommendations() { + return this.recommendations; + } + + /** The ResourceHealthMetadatasClient object to access its operations. */ + private final ResourceHealthMetadatasClient resourceHealthMetadatas; + + /** + * Gets the ResourceHealthMetadatasClient object to access its operations. + * + * @return the ResourceHealthMetadatasClient object. + */ + public ResourceHealthMetadatasClient getResourceHealthMetadatas() { + return this.resourceHealthMetadatas; + } + + /** The ResourceProvidersClient object to access its operations. */ + private final ResourceProvidersClient resourceProviders; + + /** + * Gets the ResourceProvidersClient object to access its operations. + * + * @return the ResourceProvidersClient object. + */ + public ResourceProvidersClient getResourceProviders() { + return this.resourceProviders; + } + + /** The StaticSitesClient object to access its operations. */ + private final StaticSitesClient staticSites; + + /** + * Gets the StaticSitesClient object to access its operations. + * + * @return the StaticSitesClient object. + */ + public StaticSitesClient getStaticSites() { + return this.staticSites; + } + + /** The WebAppsClient object to access its operations. */ + private final WebAppsClient webApps; + + /** + * Gets the WebAppsClient object to access its operations. + * + * @return the WebAppsClient object. + */ + public WebAppsClient getWebApps() { + return this.webApps; + } + + /** + * Initializes an instance of WebSiteManagementClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param defaultPollInterval The default poll interval for long-running operation. + * @param environment The Azure environment. + * @param subscriptionId Your Azure subscription ID. This is a GUID-formatted string (e.g. + * 00000000-0000-0000-0000-000000000000). + * @param endpoint server parameter. + */ + WebSiteManagementClientImpl( + HttpPipeline httpPipeline, + SerializerAdapter serializerAdapter, + Duration defaultPollInterval, + AzureEnvironment environment, + String subscriptionId, + String endpoint) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.defaultPollInterval = defaultPollInterval; + this.subscriptionId = subscriptionId; + this.endpoint = endpoint; + this.apiVersion = "2021-03-01"; + this.appServiceCertificateOrders = new AppServiceCertificateOrdersClientImpl(this); + this.certificateOrdersDiagnostics = new CertificateOrdersDiagnosticsClientImpl(this); + this.certificateRegistrationProviders = new CertificateRegistrationProvidersClientImpl(this); + this.domains = new DomainsClientImpl(this); + this.topLevelDomains = new TopLevelDomainsClientImpl(this); + this.domainRegistrationProviders = new DomainRegistrationProvidersClientImpl(this); + this.appServiceEnvironments = new AppServiceEnvironmentsClientImpl(this); + this.appServicePlans = new AppServicePlansClientImpl(this); + this.certificates = new CertificatesClientImpl(this); + this.containerApps = new ContainerAppsClientImpl(this); + this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); + this.deletedWebApps = new DeletedWebAppsClientImpl(this); + this.diagnostics = new DiagnosticsClientImpl(this); + this.globals = new GlobalsClientImpl(this); + this.kubeEnvironments = new KubeEnvironmentsClientImpl(this); + this.providers = new ProvidersClientImpl(this); + this.recommendations = new RecommendationsClientImpl(this); + this.resourceHealthMetadatas = new ResourceHealthMetadatasClientImpl(this); + this.resourceProviders = new ResourceProvidersClientImpl(this); + this.staticSites = new StaticSitesClientImpl(this); + this.webApps = new WebAppsClientImpl(this); + } + + /** + * Gets default client context. + * + * @return the default client context. + */ + public Context getContext() { + return Context.NONE; + } + + /** + * Merges default client context with provided context. + * + * @param context the context to be merged with default client context. + * @return the merged context. + */ + public Context mergeContext(Context context) { + for (Map.Entry entry : this.getContext().getValues().entrySet()) { + context = context.addData(entry.getKey(), entry.getValue()); + } + return context; + } + + /** + * Gets long running operation result. + * + * @param activationResponse the response of activation operation. + * @param httpPipeline the http pipeline. + * @param pollResultType type of poll result. + * @param finalResultType type of final result. + * @param context the context shared by all requests. + * @param type of poll result. + * @param type of final result. + * @return poller flux for poll result and final result. + */ + public PollerFlux, U> getLroResult( + Mono>> activationResponse, + HttpPipeline httpPipeline, + Type pollResultType, + Type finalResultType, + Context context) { + return PollerFactory + .create( + serializerAdapter, + httpPipeline, + pollResultType, + finalResultType, + defaultPollInterval, + activationResponse, + context); + } + + /** + * Gets the final result, or an error, based on last async poll response. + * + * @param response the last async poll response. + * @param type of poll result. + * @param type of final result. + * @return the final result, or an error. + */ + public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { + if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { + String errorMessage; + ManagementError managementError = null; + HttpResponse errorResponse = null; + PollResult.Error lroError = response.getValue().getError(); + if (lroError != null) { + errorResponse = + new HttpResponseImpl( + lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + + errorMessage = response.getValue().getError().getMessage(); + String errorBody = response.getValue().getError().getResponseBody(); + if (errorBody != null) { + // try to deserialize error body to ManagementError + try { + managementError = + this + .getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + if (managementError.getCode() == null || managementError.getMessage() == null) { + managementError = null; + } + } catch (IOException | RuntimeException ioe) { + logger.logThrowableAsWarning(ioe); + } + } + } else { + // fallback to default error message + errorMessage = "Long running operation failed."; + } + if (managementError == null) { + // fallback to default ManagementError + managementError = new ManagementError(response.getStatus().toString(), errorMessage); + } + return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); + } else { + return response.getFinalResult(); + } + } + + private static final class HttpResponseImpl extends HttpResponse { + private final int statusCode; + + private final byte[] responseBody; + + private final HttpHeaders httpHeaders; + + HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { + super(null); + this.statusCode = statusCode; + this.httpHeaders = httpHeaders; + this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); + } + + public int getStatusCode() { + return statusCode; + } + + public String getHeaderValue(String s) { + return httpHeaders.getValue(s); + } + + public HttpHeaders getHeaders() { + return httpHeaders; + } + + public Flux getBody() { + return Flux.just(ByteBuffer.wrap(responseBody)); + } + + public Mono getBodyAsByteArray() { + return Mono.just(responseBody); + } + + public Mono getBodyAsString() { + return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); + } + + public Mono getBodyAsString(Charset charset) { + return Mono.just(new String(responseBody, charset)); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WorkerPoolResourceImpl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WorkerPoolResourceImpl.java new file mode 100644 index 0000000000000..b7683573036f5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/WorkerPoolResourceImpl.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.implementation; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.WorkerPoolResourceInner; +import com.azure.resourcemanager.appservice.generated.models.ComputeModeOptions; +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.azure.resourcemanager.appservice.generated.models.WorkerPoolResource; +import java.util.Collections; +import java.util.List; + +public final class WorkerPoolResourceImpl + implements WorkerPoolResource, WorkerPoolResource.Definition, WorkerPoolResource.Update { + private WorkerPoolResourceInner innerObject; + + private final com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String kind() { + return this.innerModel().kind(); + } + + public SkuDescription sku() { + return this.innerModel().sku(); + } + + public Integer workerSizeId() { + return this.innerModel().workerSizeId(); + } + + public ComputeModeOptions computeMode() { + return this.innerModel().computeMode(); + } + + public String workerSize() { + return this.innerModel().workerSize(); + } + + public Integer workerCount() { + return this.innerModel().workerCount(); + } + + public List instanceNames() { + List inner = this.innerModel().instanceNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public WorkerPoolResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appservice.generated.AppServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String name; + + private String workerPoolName; + + public WorkerPoolResourceImpl withExistingHostingEnvironment(String resourceGroupName, String name) { + this.resourceGroupName = resourceGroupName; + this.name = name; + return this; + } + + public WorkerPoolResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.innerModel(), Context.NONE); + return this; + } + + public WorkerPoolResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .createOrUpdateWorkerPool(resourceGroupName, name, workerPoolName, this.innerModel(), context); + return this; + } + + WorkerPoolResourceImpl( + String name, com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = new WorkerPoolResourceInner(); + this.serviceManager = serviceManager; + this.workerPoolName = name; + } + + public WorkerPoolResourceImpl update() { + return this; + } + + public WorkerPoolResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .updateWorkerPoolWithResponse(resourceGroupName, name, workerPoolName, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public WorkerPoolResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .updateWorkerPoolWithResponse(resourceGroupName, name, workerPoolName, this.innerModel(), context) + .getValue(); + return this; + } + + WorkerPoolResourceImpl( + WorkerPoolResourceInner innerObject, + com.azure.resourcemanager.appservice.generated.AppServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.name = Utils.getValueFromIdByName(innerObject.id(), "hostingEnvironments"); + this.workerPoolName = Utils.getValueFromIdByName(innerObject.id(), "workerPools"); + } + + public WorkerPoolResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .getWorkerPoolWithResponse(resourceGroupName, name, workerPoolName, Context.NONE) + .getValue(); + return this; + } + + public WorkerPoolResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getAppServiceEnvironments() + .getWorkerPoolWithResponse(resourceGroupName, name, workerPoolName, context) + .getValue(); + return this; + } + + public WorkerPoolResourceImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + + public WorkerPoolResourceImpl withSku(SkuDescription sku) { + this.innerModel().withSku(sku); + return this; + } + + public WorkerPoolResourceImpl withWorkerSizeId(Integer workerSizeId) { + this.innerModel().withWorkerSizeId(workerSizeId); + return this; + } + + public WorkerPoolResourceImpl withComputeMode(ComputeModeOptions computeMode) { + this.innerModel().withComputeMode(computeMode); + return this; + } + + public WorkerPoolResourceImpl withWorkerSize(String workerSize) { + this.innerModel().withWorkerSize(workerSize); + return this; + } + + public WorkerPoolResourceImpl withWorkerCount(Integer workerCount) { + this.innerModel().withWorkerCount(workerCount); + return this; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/package-info.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/package-info.java new file mode 100644 index 0000000000000..3f486fa000edb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/implementation/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the implementations for WebSiteManagementClient. WebSite Management Client. */ +package com.azure.resourcemanager.appservice.generated.implementation; diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AbnormalTimePeriod.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AbnormalTimePeriod.java new file mode 100644 index 0000000000000..9a612831bcf44 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AbnormalTimePeriod.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Class representing Abnormal Time Period identified in diagnosis. */ +@Fluent +public final class AbnormalTimePeriod { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AbnormalTimePeriod.class); + + /* + * Start time of the downtime + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * End time of the downtime + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * List of Possible Cause of downtime + */ + @JsonProperty(value = "events") + private List events; + + /* + * List of proposed solutions + */ + @JsonProperty(value = "solutions") + private List solutions; + + /** + * Get the startTime property: Start time of the downtime. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time of the downtime. + * + * @param startTime the startTime value to set. + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: End time of the downtime. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time of the downtime. + * + * @param endTime the endTime value to set. + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the events property: List of Possible Cause of downtime. + * + * @return the events value. + */ + public List events() { + return this.events; + } + + /** + * Set the events property: List of Possible Cause of downtime. + * + * @param events the events value to set. + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withEvents(List events) { + this.events = events; + return this; + } + + /** + * Get the solutions property: List of proposed solutions. + * + * @return the solutions value. + */ + public List solutions() { + return this.solutions; + } + + /** + * Set the solutions property: List of proposed solutions. + * + * @param solutions the solutions value to set. + * @return the AbnormalTimePeriod object itself. + */ + public AbnormalTimePeriod withSolutions(List solutions) { + this.solutions = solutions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (events() != null) { + events().forEach(e -> e.validate()); + } + if (solutions() != null) { + solutions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ActiveRevisionsMode.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ActiveRevisionsMode.java new file mode 100644 index 0000000000000..cbcd8bc653409 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ActiveRevisionsMode.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ActiveRevisionsMode. */ +public final class ActiveRevisionsMode extends ExpandableStringEnum { + /** Static value multiple for ActiveRevisionsMode. */ + public static final ActiveRevisionsMode MULTIPLE = fromString("multiple"); + + /** Static value single for ActiveRevisionsMode. */ + public static final ActiveRevisionsMode SINGLE = fromString("single"); + + /** + * Creates or finds a ActiveRevisionsMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding ActiveRevisionsMode. + */ + @JsonCreator + public static ActiveRevisionsMode fromString(String name) { + return fromString(name, ActiveRevisionsMode.class); + } + + /** @return known ActiveRevisionsMode values. */ + public static Collection values() { + return values(ActiveRevisionsMode.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Address.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Address.java new file mode 100644 index 0000000000000..021387f3c1961 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Address.java @@ -0,0 +1,203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Address information for domain registration. */ +@Fluent +public final class Address { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Address.class); + + /* + * First line of an Address. + */ + @JsonProperty(value = "address1", required = true) + private String address1; + + /* + * The second line of the Address. Optional. + */ + @JsonProperty(value = "address2") + private String address2; + + /* + * The city for the address. + */ + @JsonProperty(value = "city", required = true) + private String city; + + /* + * The country for the address. + */ + @JsonProperty(value = "country", required = true) + private String country; + + /* + * The postal code for the address. + */ + @JsonProperty(value = "postalCode", required = true) + private String postalCode; + + /* + * The state or province for the address. + */ + @JsonProperty(value = "state", required = true) + private String state; + + /** + * Get the address1 property: First line of an Address. + * + * @return the address1 value. + */ + public String address1() { + return this.address1; + } + + /** + * Set the address1 property: First line of an Address. + * + * @param address1 the address1 value to set. + * @return the Address object itself. + */ + public Address withAddress1(String address1) { + this.address1 = address1; + return this; + } + + /** + * Get the address2 property: The second line of the Address. Optional. + * + * @return the address2 value. + */ + public String address2() { + return this.address2; + } + + /** + * Set the address2 property: The second line of the Address. Optional. + * + * @param address2 the address2 value to set. + * @return the Address object itself. + */ + public Address withAddress2(String address2) { + this.address2 = address2; + return this; + } + + /** + * Get the city property: The city for the address. + * + * @return the city value. + */ + public String city() { + return this.city; + } + + /** + * Set the city property: The city for the address. + * + * @param city the city value to set. + * @return the Address object itself. + */ + public Address withCity(String city) { + this.city = city; + return this; + } + + /** + * Get the country property: The country for the address. + * + * @return the country value. + */ + public String country() { + return this.country; + } + + /** + * Set the country property: The country for the address. + * + * @param country the country value to set. + * @return the Address object itself. + */ + public Address withCountry(String country) { + this.country = country; + return this; + } + + /** + * Get the postalCode property: The postal code for the address. + * + * @return the postalCode value. + */ + public String postalCode() { + return this.postalCode; + } + + /** + * Set the postalCode property: The postal code for the address. + * + * @param postalCode the postalCode value to set. + * @return the Address object itself. + */ + public Address withPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * Get the state property: The state or province for the address. + * + * @return the state value. + */ + public String state() { + return this.state; + } + + /** + * Set the state property: The state or province for the address. + * + * @param state the state value to set. + * @return the Address object itself. + */ + public Address withState(String state) { + this.state = state; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (address1() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property address1 in model Address")); + } + if (city() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property city in model Address")); + } + if (country() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property country in model Address")); + } + if (postalCode() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property postalCode in model Address")); + } + if (state() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property state in model Address")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AddressResponse.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AddressResponse.java new file mode 100644 index 0000000000000..f142f0ed879ce --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AddressResponse.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AddressResponseInner; +import java.util.List; + +/** An immutable client-side representation of AddressResponse. */ +public interface AddressResponse { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the serviceIpAddress property: Main public virtual IP. + * + * @return the serviceIpAddress value. + */ + String serviceIpAddress(); + + /** + * Gets the internalIpAddress property: Virtual Network internal IP address of the App Service Environment if it is + * in internal load-balancing mode. + * + * @return the internalIpAddress value. + */ + String internalIpAddress(); + + /** + * Gets the outboundIpAddresses property: IP addresses appearing on outbound connections. + * + * @return the outboundIpAddresses value. + */ + List outboundIpAddresses(); + + /** + * Gets the vipMappings property: Additional virtual IPs. + * + * @return the vipMappings value. + */ + List vipMappings(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.AddressResponseInner object. + * + * @return the inner object. + */ + AddressResponseInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AllowedAudiencesValidation.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AllowedAudiencesValidation.java new file mode 100644 index 0000000000000..2b530172e6fa9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AllowedAudiencesValidation.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the Allowed Audiences validation flow. */ +@Fluent +public final class AllowedAudiencesValidation { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AllowedAudiencesValidation.class); + + /* + * The configuration settings of the allowed list of audiences from which + * to validate the JWT token. + */ + @JsonProperty(value = "allowedAudiences") + private List allowedAudiences; + + /** + * Get the allowedAudiences property: The configuration settings of the allowed list of audiences from which to + * validate the JWT token. + * + * @return the allowedAudiences value. + */ + public List allowedAudiences() { + return this.allowedAudiences; + } + + /** + * Set the allowedAudiences property: The configuration settings of the allowed list of audiences from which to + * validate the JWT token. + * + * @param allowedAudiences the allowedAudiences value to set. + * @return the AllowedAudiencesValidation object itself. + */ + public AllowedAudiencesValidation withAllowedAudiences(List allowedAudiences) { + this.allowedAudiences = allowedAudiences; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AllowedPrincipals.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AllowedPrincipals.java new file mode 100644 index 0000000000000..1897df43a7559 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AllowedPrincipals.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the Azure Active Directory allowed principals. */ +@Fluent +public final class AllowedPrincipals { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AllowedPrincipals.class); + + /* + * The list of the allowed groups. + */ + @JsonProperty(value = "groups") + private List groups; + + /* + * The list of the allowed identities. + */ + @JsonProperty(value = "identities") + private List identities; + + /** + * Get the groups property: The list of the allowed groups. + * + * @return the groups value. + */ + public List groups() { + return this.groups; + } + + /** + * Set the groups property: The list of the allowed groups. + * + * @param groups the groups value to set. + * @return the AllowedPrincipals object itself. + */ + public AllowedPrincipals withGroups(List groups) { + this.groups = groups; + return this; + } + + /** + * Get the identities property: The list of the allowed identities. + * + * @return the identities value. + */ + public List identities() { + return this.identities; + } + + /** + * Set the identities property: The list of the allowed identities. + * + * @param identities the identities value to set. + * @return the AllowedPrincipals object itself. + */ + public AllowedPrincipals withIdentities(List identities) { + this.identities = identities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AnalysisData.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AnalysisData.java new file mode 100644 index 0000000000000..901429e2563ef --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AnalysisData.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinition; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Class Representing Detector Evidence used for analysis. */ +@Fluent +public final class AnalysisData { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AnalysisData.class); + + /* + * Name of the Detector + */ + @JsonProperty(value = "source") + private String source; + + /* + * Detector Definition + */ + @JsonProperty(value = "detectorDefinition") + private DetectorDefinition detectorDefinition; + + /* + * Source Metrics + */ + @JsonProperty(value = "metrics") + private List metrics; + + /* + * Additional Source Data + */ + @JsonProperty(value = "data") + private List> data; + + /* + * Detector Meta Data + */ + @JsonProperty(value = "detectorMetaData") + private ResponseMetadata detectorMetadata; + + /** + * Get the source property: Name of the Detector. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Name of the Detector. + * + * @param source the source value to set. + * @return the AnalysisData object itself. + */ + public AnalysisData withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the detectorDefinition property: Detector Definition. + * + * @return the detectorDefinition value. + */ + public DetectorDefinition detectorDefinition() { + return this.detectorDefinition; + } + + /** + * Set the detectorDefinition property: Detector Definition. + * + * @param detectorDefinition the detectorDefinition value to set. + * @return the AnalysisData object itself. + */ + public AnalysisData withDetectorDefinition(DetectorDefinition detectorDefinition) { + this.detectorDefinition = detectorDefinition; + return this; + } + + /** + * Get the metrics property: Source Metrics. + * + * @return the metrics value. + */ + public List metrics() { + return this.metrics; + } + + /** + * Set the metrics property: Source Metrics. + * + * @param metrics the metrics value to set. + * @return the AnalysisData object itself. + */ + public AnalysisData withMetrics(List metrics) { + this.metrics = metrics; + return this; + } + + /** + * Get the data property: Additional Source Data. + * + * @return the data value. + */ + public List> data() { + return this.data; + } + + /** + * Set the data property: Additional Source Data. + * + * @param data the data value to set. + * @return the AnalysisData object itself. + */ + public AnalysisData withData(List> data) { + this.data = data; + return this; + } + + /** + * Get the detectorMetadata property: Detector Meta Data. + * + * @return the detectorMetadata value. + */ + public ResponseMetadata detectorMetadata() { + return this.detectorMetadata; + } + + /** + * Set the detectorMetadata property: Detector Meta Data. + * + * @param detectorMetadata the detectorMetadata value to set. + * @return the AnalysisData object itself. + */ + public AnalysisData withDetectorMetadata(ResponseMetadata detectorMetadata) { + this.detectorMetadata = detectorMetadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (detectorDefinition() != null) { + detectorDefinition().validate(); + } + if (metrics() != null) { + metrics().forEach(e -> e.validate()); + } + if (data() != null) { + data().forEach(e -> e.forEach(e1 -> e1.validate())); + } + if (detectorMetadata() != null) { + detectorMetadata().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AnalysisDefinition.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AnalysisDefinition.java new file mode 100644 index 0000000000000..4e3cbba86e5d1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AnalysisDefinition.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AnalysisDefinitionInner; + +/** An immutable client-side representation of AnalysisDefinition. */ +public interface AnalysisDefinition { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the description property: Description of the Analysis. + * + * @return the description value. + */ + String description(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.AnalysisDefinitionInner object. + * + * @return the inner object. + */ + AnalysisDefinitionInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiDefinitionInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiDefinitionInfo.java new file mode 100644 index 0000000000000..318b02bb27654 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiDefinitionInfo.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information about the formal API definition for the app. */ +@Fluent +public final class ApiDefinitionInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiDefinitionInfo.class); + + /* + * The URL of the API definition. + */ + @JsonProperty(value = "url") + private String url; + + /** + * Get the url property: The URL of the API definition. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The URL of the API definition. + * + * @param url the url value to set. + * @return the ApiDefinitionInfo object itself. + */ + public ApiDefinitionInfo withUrl(String url) { + this.url = url; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiKVReference.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiKVReference.java new file mode 100644 index 0000000000000..09f6a4a500c6a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiKVReference.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ApiKVReferenceInner; + +/** An immutable client-side representation of ApiKVReference. */ +public interface ApiKVReference { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the reference property: The reference property. + * + * @return the reference value. + */ + String reference(); + + /** + * Gets the status property: The status property. + * + * @return the status value. + */ + ResolveStatus status(); + + /** + * Gets the vaultName property: The vaultName property. + * + * @return the vaultName value. + */ + String vaultName(); + + /** + * Gets the secretName property: The secretName property. + * + * @return the secretName value. + */ + String secretName(); + + /** + * Gets the secretVersion property: The secretVersion property. + * + * @return the secretVersion value. + */ + String secretVersion(); + + /** + * Gets the identityType property: Managed service identity. + * + * @return the identityType value. + */ + ManagedServiceIdentity identityType(); + + /** + * Gets the details property: The details property. + * + * @return the details value. + */ + String details(); + + /** + * Gets the source property: The source property. + * + * @return the source value. + */ + ConfigReferenceSource source(); + + /** + * Gets the activeVersion property: The activeVersion property. + * + * @return the activeVersion value. + */ + String activeVersion(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ApiKVReferenceInner object. + * + * @return the inner object. + */ + ApiKVReferenceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiKVReferenceCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiKVReferenceCollection.java new file mode 100644 index 0000000000000..b8bf037399d44 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiKVReferenceCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApiKVReferenceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ApiKVReferenceCollection model. */ +@Fluent +public final class ApiKVReferenceCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiKVReferenceCollection.class); + + /* + * 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; + + /** + * 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 ApiKVReferenceCollection object itself. + */ + public ApiKVReferenceCollection 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 ApiKVReferenceCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiManagementConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiManagementConfig.java new file mode 100644 index 0000000000000..193d0ebd257fd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApiManagementConfig.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure API management (APIM) configuration linked to the app. */ +@Fluent +public final class ApiManagementConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApiManagementConfig.class); + + /* + * APIM-Api Identifier. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the id property: APIM-Api Identifier. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: APIM-Api Identifier. + * + * @param id the id value to set. + * @return the ApiManagementConfig object itself. + */ + public ApiManagementConfig withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppInsightsWebAppStackSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppInsightsWebAppStackSettings.java new file mode 100644 index 0000000000000..c2b509b75a30c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppInsightsWebAppStackSettings.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** App Insights Web App stack settings. */ +@Immutable +public final class AppInsightsWebAppStackSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppInsightsWebAppStackSettings.class); + + /* + * true if remote Application Insights is supported for the + * stack; otherwise, false. + */ + @JsonProperty(value = "isSupported", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isSupported; + + /* + * true if Application Insights is disabled by default for the + * stack; otherwise, false. + */ + @JsonProperty(value = "isDefaultOff", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultOff; + + /** + * Get the isSupported property: <code>true</code> if remote Application Insights is supported for the + * stack; otherwise, <code>false</code>. + * + * @return the isSupported value. + */ + public Boolean isSupported() { + return this.isSupported; + } + + /** + * Get the isDefaultOff property: <code>true</code> if Application Insights is disabled by default for + * the stack; otherwise, <code>false</code>. + * + * @return the isDefaultOff value. + */ + public Boolean isDefaultOff() { + return this.isDefaultOff; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppLogsConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppLogsConfiguration.java new file mode 100644 index 0000000000000..da5798483231a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppLogsConfiguration.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The AppLogsConfiguration model. */ +@Fluent +public final class AppLogsConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppLogsConfiguration.class); + + /* + * The destination property. + */ + @JsonProperty(value = "destination") + private String destination; + + /* + * The logAnalyticsConfiguration property. + */ + @JsonProperty(value = "logAnalyticsConfiguration") + private LogAnalyticsConfiguration logAnalyticsConfiguration; + + /** + * Get the destination property: The destination property. + * + * @return the destination value. + */ + public String destination() { + return this.destination; + } + + /** + * Set the destination property: The destination property. + * + * @param destination the destination value to set. + * @return the AppLogsConfiguration object itself. + */ + public AppLogsConfiguration withDestination(String destination) { + this.destination = destination; + return this; + } + + /** + * Get the logAnalyticsConfiguration property: The logAnalyticsConfiguration property. + * + * @return the logAnalyticsConfiguration value. + */ + public LogAnalyticsConfiguration logAnalyticsConfiguration() { + return this.logAnalyticsConfiguration; + } + + /** + * Set the logAnalyticsConfiguration property: The logAnalyticsConfiguration property. + * + * @param logAnalyticsConfiguration the logAnalyticsConfiguration value to set. + * @return the AppLogsConfiguration object itself. + */ + public AppLogsConfiguration withLogAnalyticsConfiguration(LogAnalyticsConfiguration logAnalyticsConfiguration) { + this.logAnalyticsConfiguration = logAnalyticsConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logAnalyticsConfiguration() != null) { + logAnalyticsConfiguration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppRegistration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppRegistration.java new file mode 100644 index 0000000000000..96ef526588766 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppRegistration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the app registration for providers that have app ids and app secrets. */ +@Fluent +public final class AppRegistration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppRegistration.class); + + /* + * The App ID of the app used for login. + */ + @JsonProperty(value = "appId") + private String appId; + + /* + * The app setting name that contains the app secret. + */ + @JsonProperty(value = "appSecretSettingName") + private String appSecretSettingName; + + /** + * Get the appId property: The App ID of the app used for login. + * + * @return the appId value. + */ + public String appId() { + return this.appId; + } + + /** + * Set the appId property: The App ID of the app used for login. + * + * @param appId the appId value to set. + * @return the AppRegistration object itself. + */ + public AppRegistration withAppId(String appId) { + this.appId = appId; + return this; + } + + /** + * Get the appSecretSettingName property: The app setting name that contains the app secret. + * + * @return the appSecretSettingName value. + */ + public String appSecretSettingName() { + return this.appSecretSettingName; + } + + /** + * Set the appSecretSettingName property: The app setting name that contains the app secret. + * + * @param appSecretSettingName the appSecretSettingName value to set. + * @return the AppRegistration object itself. + */ + public AppRegistration withAppSecretSettingName(String appSecretSettingName) { + this.appSecretSettingName = appSecretSettingName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateCollection.java new file mode 100644 index 0000000000000..99af74820c0ec --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of certificate order certificates. */ +@Fluent +public final class AppServiceCertificateCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificateCollection.class); + + /* + * 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; + + /** + * 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 AppServiceCertificateCollection object itself. + */ + public AppServiceCertificateCollection 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 AppServiceCertificateCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrder.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrder.java new file mode 100644 index 0000000000000..3ee0aea4dfaae --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrder.java @@ -0,0 +1,615 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificate; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateOrderInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of AppServiceCertificateOrder. */ +public interface AppServiceCertificateOrder { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the certificates property: State of the Key Vault secret. + * + * @return the certificates value. + */ + Map certificates(); + + /** + * Gets the distinguishedName property: Certificate distinguished name. + * + * @return the distinguishedName value. + */ + String distinguishedName(); + + /** + * Gets the domainVerificationToken property: Domain verification token. + * + * @return the domainVerificationToken value. + */ + String domainVerificationToken(); + + /** + * Gets the validityInYears property: Duration in years (must be 1). + * + * @return the validityInYears value. + */ + Integer validityInYears(); + + /** + * Gets the keySize property: Certificate key size. + * + * @return the keySize value. + */ + Integer keySize(); + + /** + * Gets the productType property: Certificate product type. + * + * @return the productType value. + */ + CertificateProductType productType(); + + /** + * Gets the autoRenew property: <code>true</code> if the certificate should be automatically renewed + * when it expires; otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + Boolean autoRenew(); + + /** + * Gets the provisioningState property: Status of certificate order. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: Current order status. + * + * @return the status value. + */ + CertificateOrderStatus status(); + + /** + * Gets the signedCertificate property: Signed certificate. + * + * @return the signedCertificate value. + */ + CertificateDetails signedCertificate(); + + /** + * Gets the csr property: Last CSR that was created for this order. + * + * @return the csr value. + */ + String csr(); + + /** + * Gets the intermediate property: Intermediate certificate. + * + * @return the intermediate value. + */ + CertificateDetails intermediate(); + + /** + * Gets the root property: Root certificate. + * + * @return the root value. + */ + CertificateDetails root(); + + /** + * Gets the serialNumber property: Current serial number of the certificate. + * + * @return the serialNumber value. + */ + String serialNumber(); + + /** + * Gets the lastCertificateIssuanceTime property: Certificate last issuance time. + * + * @return the lastCertificateIssuanceTime value. + */ + OffsetDateTime lastCertificateIssuanceTime(); + + /** + * Gets the expirationTime property: Certificate expiration time. + * + * @return the expirationTime value. + */ + OffsetDateTime expirationTime(); + + /** + * Gets the isPrivateKeyExternal property: <code>true</code> if private key is external; otherwise, + * <code>false</code>. + * + * @return the isPrivateKeyExternal value. + */ + Boolean isPrivateKeyExternal(); + + /** + * Gets the appServiceCertificateNotRenewableReasons property: Reasons why App Service Certificate is not renewable + * at the current moment. + * + * @return the appServiceCertificateNotRenewableReasons value. + */ + List + appServiceCertificateNotRenewableReasons(); + + /** + * Gets the nextAutoRenewalTimestamp property: Time stamp when the certificate would be auto renewed next. + * + * @return the nextAutoRenewalTimestamp value. + */ + OffsetDateTime nextAutoRenewalTimestamp(); + + /** + * Gets the contact property: Contact info. + * + * @return the contact value. + */ + CertificateOrderContact contact(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateOrderInner + * object. + * + * @return the inner object. + */ + AppServiceCertificateOrderInner innerModel(); + + /** The entirety of the AppServiceCertificateOrder definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The AppServiceCertificateOrder definition stages. */ + interface DefinitionStages { + /** The first stage of the AppServiceCertificateOrder definition. */ + interface Blank extends WithLocation { + } + /** The stage of the AppServiceCertificateOrder 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 AppServiceCertificateOrder definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the AppServiceCertificateOrder definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithKind, + DefinitionStages.WithCertificates, + DefinitionStages.WithDistinguishedName, + DefinitionStages.WithValidityInYears, + DefinitionStages.WithKeySize, + DefinitionStages.WithProductType, + DefinitionStages.WithAutoRenew, + DefinitionStages.WithCsr { + /** + * Executes the create request. + * + * @return the created resource. + */ + AppServiceCertificateOrder create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AppServiceCertificateOrder create(Context context); + } + /** The stage of the AppServiceCertificateOrder 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 AppServiceCertificateOrder definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the AppServiceCertificateOrder definition allowing to specify certificates. */ + interface WithCertificates { + /** + * Specifies the certificates property: State of the Key Vault secret.. + * + * @param certificates State of the Key Vault secret. + * @return the next definition stage. + */ + WithCreate withCertificates(Map certificates); + } + /** The stage of the AppServiceCertificateOrder definition allowing to specify distinguishedName. */ + interface WithDistinguishedName { + /** + * Specifies the distinguishedName property: Certificate distinguished name.. + * + * @param distinguishedName Certificate distinguished name. + * @return the next definition stage. + */ + WithCreate withDistinguishedName(String distinguishedName); + } + /** The stage of the AppServiceCertificateOrder definition allowing to specify validityInYears. */ + interface WithValidityInYears { + /** + * Specifies the validityInYears property: Duration in years (must be 1).. + * + * @param validityInYears Duration in years (must be 1). + * @return the next definition stage. + */ + WithCreate withValidityInYears(Integer validityInYears); + } + /** The stage of the AppServiceCertificateOrder definition allowing to specify keySize. */ + interface WithKeySize { + /** + * Specifies the keySize property: Certificate key size.. + * + * @param keySize Certificate key size. + * @return the next definition stage. + */ + WithCreate withKeySize(Integer keySize); + } + /** The stage of the AppServiceCertificateOrder definition allowing to specify productType. */ + interface WithProductType { + /** + * Specifies the productType property: Certificate product type.. + * + * @param productType Certificate product type. + * @return the next definition stage. + */ + WithCreate withProductType(CertificateProductType productType); + } + /** The stage of the AppServiceCertificateOrder definition allowing to specify autoRenew. */ + interface WithAutoRenew { + /** + * Specifies the autoRenew property: <code>true</code> if the certificate should be + * automatically renewed when it expires; otherwise, <code>false</code>.. + * + * @param autoRenew <code>true</code> if the certificate should be automatically renewed when it + * expires; otherwise, <code>false</code>. + * @return the next definition stage. + */ + WithCreate withAutoRenew(Boolean autoRenew); + } + /** The stage of the AppServiceCertificateOrder definition allowing to specify csr. */ + interface WithCsr { + /** + * Specifies the csr property: Last CSR that was created for this order.. + * + * @param csr Last CSR that was created for this order. + * @return the next definition stage. + */ + WithCreate withCsr(String csr); + } + } + /** + * Begins update for the AppServiceCertificateOrder resource. + * + * @return the stage of resource update. + */ + AppServiceCertificateOrder.Update update(); + + /** The template for AppServiceCertificateOrder update. */ + interface Update extends UpdateStages.WithKind, UpdateStages.WithCertificates, UpdateStages.WithAutoRenew { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AppServiceCertificateOrder apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AppServiceCertificateOrder apply(Context context); + } + /** The AppServiceCertificateOrder update stages. */ + interface UpdateStages { + /** The stage of the AppServiceCertificateOrder update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the AppServiceCertificateOrder update allowing to specify certificates. */ + interface WithCertificates { + /** + * Specifies the certificates property: State of the Key Vault secret.. + * + * @param certificates State of the Key Vault secret. + * @return the next definition stage. + */ + Update withCertificates(Map certificates); + } + /** The stage of the AppServiceCertificateOrder update allowing to specify autoRenew. */ + interface WithAutoRenew { + /** + * Specifies the autoRenew property: <code>true</code> if the certificate should be + * automatically renewed when it expires; otherwise, <code>false</code>.. + * + * @param autoRenew <code>true</code> if the certificate should be automatically renewed when it + * expires; otherwise, <code>false</code>. + * @return the next definition stage. + */ + Update withAutoRenew(Boolean autoRenew); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AppServiceCertificateOrder refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AppServiceCertificateOrder refresh(Context context); + + /** + * Description for Reissue an existing certificate order. + * + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 reissue(ReissueCertificateOrderRequest reissueCertificateOrderRequest); + + /** + * Description for Reissue an existing certificate order. + * + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response reissueWithResponse(ReissueCertificateOrderRequest reissueCertificateOrderRequest, Context context); + + /** + * Description for Renew an existing certificate order. + * + * @param renewCertificateOrderRequest Renew parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 renew(RenewCertificateOrderRequest renewCertificateOrderRequest); + + /** + * Description for Renew an existing certificate order. + * + * @param renewCertificateOrderRequest Renew parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response renewWithResponse(RenewCertificateOrderRequest renewCertificateOrderRequest, Context context); + + /** + * Description for Resend certificate email. + * + * @throws com.azure.resourcemanager.appservice.generated.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 resendEmail(); + + /** + * Description for Resend certificate email. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resendEmailWithResponse(Context context); + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param nameIdentifier Email address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resendRequestEmails(NameIdentifierInner nameIdentifier); + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param nameIdentifier Email address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resendRequestEmailsWithResponse(NameIdentifierInner nameIdentifier, Context context); + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param siteSealRequest Site seal request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site seal. + */ + SiteSeal retrieveSiteSeal(SiteSealRequest siteSealRequest); + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param siteSealRequest Site seal request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site seal. + */ + Response retrieveSiteSealWithResponse(SiteSealRequest siteSealRequest, Context context); + + /** + * Description for Verify domain ownership for this certificate order. + * + * @throws com.azure.resourcemanager.appservice.generated.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 verifyDomainOwnership(); + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response verifyDomainOwnershipWithResponse(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderCollection.java new file mode 100644 index 0000000000000..919c937df42c6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateOrderInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of certificate orders. */ +@Fluent +public final class AppServiceCertificateOrderCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificateOrderCollection.class); + + /* + * 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; + + /** + * 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 AppServiceCertificateOrderCollection object itself. + */ + public AppServiceCertificateOrderCollection 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 AppServiceCertificateOrderCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPatchResource.java new file mode 100644 index 0000000000000..8538980581faf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPatchResource.java @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificate; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateOrderPatchResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** ARM resource for a certificate order that is purchased through Azure. */ +@Fluent +public final class AppServiceCertificateOrderPatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificateOrderPatchResource.class); + + /* + * AppServiceCertificateOrderPatchResource resource specific properties + */ + @JsonProperty(value = "properties") + private AppServiceCertificateOrderPatchResourceProperties innerProperties; + + /** + * Get the innerProperties property: AppServiceCertificateOrderPatchResource resource specific properties. + * + * @return the innerProperties value. + */ + private AppServiceCertificateOrderPatchResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public AppServiceCertificateOrderPatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the certificates property: State of the Key Vault secret. + * + * @return the certificates value. + */ + public Map certificates() { + return this.innerProperties() == null ? null : this.innerProperties().certificates(); + } + + /** + * Set the certificates property: State of the Key Vault secret. + * + * @param certificates the certificates value to set. + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withCertificates(Map certificates) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderPatchResourceProperties(); + } + this.innerProperties().withCertificates(certificates); + return this; + } + + /** + * Get the distinguishedName property: Certificate distinguished name. + * + * @return the distinguishedName value. + */ + public String distinguishedName() { + return this.innerProperties() == null ? null : this.innerProperties().distinguishedName(); + } + + /** + * Set the distinguishedName property: Certificate distinguished name. + * + * @param distinguishedName the distinguishedName value to set. + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withDistinguishedName(String distinguishedName) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderPatchResourceProperties(); + } + this.innerProperties().withDistinguishedName(distinguishedName); + return this; + } + + /** + * Get the domainVerificationToken property: Domain verification token. + * + * @return the domainVerificationToken value. + */ + public String domainVerificationToken() { + return this.innerProperties() == null ? null : this.innerProperties().domainVerificationToken(); + } + + /** + * Get the validityInYears property: Duration in years (must be 1). + * + * @return the validityInYears value. + */ + public Integer validityInYears() { + return this.innerProperties() == null ? null : this.innerProperties().validityInYears(); + } + + /** + * Set the validityInYears property: Duration in years (must be 1). + * + * @param validityInYears the validityInYears value to set. + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withValidityInYears(Integer validityInYears) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderPatchResourceProperties(); + } + this.innerProperties().withValidityInYears(validityInYears); + return this; + } + + /** + * Get the keySize property: Certificate key size. + * + * @return the keySize value. + */ + public Integer keySize() { + return this.innerProperties() == null ? null : this.innerProperties().keySize(); + } + + /** + * Set the keySize property: Certificate key size. + * + * @param keySize the keySize value to set. + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withKeySize(Integer keySize) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderPatchResourceProperties(); + } + this.innerProperties().withKeySize(keySize); + return this; + } + + /** + * Get the productType property: Certificate product type. + * + * @return the productType value. + */ + public CertificateProductType productType() { + return this.innerProperties() == null ? null : this.innerProperties().productType(); + } + + /** + * Set the productType property: Certificate product type. + * + * @param productType the productType value to set. + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withProductType(CertificateProductType productType) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderPatchResourceProperties(); + } + this.innerProperties().withProductType(productType); + return this; + } + + /** + * Get the autoRenew property: <code>true</code> if the certificate should be automatically renewed when + * it expires; otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + public Boolean autoRenew() { + return this.innerProperties() == null ? null : this.innerProperties().autoRenew(); + } + + /** + * Set the autoRenew property: <code>true</code> if the certificate should be automatically renewed when + * it expires; otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set. + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withAutoRenew(Boolean autoRenew) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderPatchResourceProperties(); + } + this.innerProperties().withAutoRenew(autoRenew); + return this; + } + + /** + * Get the provisioningState property: Status of certificate order. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: Current order status. + * + * @return the status value. + */ + public CertificateOrderStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the signedCertificate property: Signed certificate. + * + * @return the signedCertificate value. + */ + public CertificateDetails signedCertificate() { + return this.innerProperties() == null ? null : this.innerProperties().signedCertificate(); + } + + /** + * Get the csr property: Last CSR that was created for this order. + * + * @return the csr value. + */ + public String csr() { + return this.innerProperties() == null ? null : this.innerProperties().csr(); + } + + /** + * Set the csr property: Last CSR that was created for this order. + * + * @param csr the csr value to set. + * @return the AppServiceCertificateOrderPatchResource object itself. + */ + public AppServiceCertificateOrderPatchResource withCsr(String csr) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificateOrderPatchResourceProperties(); + } + this.innerProperties().withCsr(csr); + return this; + } + + /** + * Get the intermediate property: Intermediate certificate. + * + * @return the intermediate value. + */ + public CertificateDetails intermediate() { + return this.innerProperties() == null ? null : this.innerProperties().intermediate(); + } + + /** + * Get the root property: Root certificate. + * + * @return the root value. + */ + public CertificateDetails root() { + return this.innerProperties() == null ? null : this.innerProperties().root(); + } + + /** + * Get the serialNumber property: Current serial number of the certificate. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.innerProperties() == null ? null : this.innerProperties().serialNumber(); + } + + /** + * Get the lastCertificateIssuanceTime property: Certificate last issuance time. + * + * @return the lastCertificateIssuanceTime value. + */ + public OffsetDateTime lastCertificateIssuanceTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastCertificateIssuanceTime(); + } + + /** + * Get the expirationTime property: Certificate expiration time. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().expirationTime(); + } + + /** + * Get the isPrivateKeyExternal property: <code>true</code> if private key is external; otherwise, + * <code>false</code>. + * + * @return the isPrivateKeyExternal value. + */ + public Boolean isPrivateKeyExternal() { + return this.innerProperties() == null ? null : this.innerProperties().isPrivateKeyExternal(); + } + + /** + * Get the appServiceCertificateNotRenewableReasons property: Reasons why App Service Certificate is not renewable + * at the current moment. + * + * @return the appServiceCertificateNotRenewableReasons value. + */ + public List + appServiceCertificateNotRenewableReasons() { + return this.innerProperties() == null + ? null + : this.innerProperties().appServiceCertificateNotRenewableReasons(); + } + + /** + * Get the nextAutoRenewalTimestamp property: Time stamp when the certificate would be auto renewed next. + * + * @return the nextAutoRenewalTimestamp value. + */ + public OffsetDateTime nextAutoRenewalTimestamp() { + return this.innerProperties() == null ? null : this.innerProperties().nextAutoRenewalTimestamp(); + } + + /** + * Get the contact property: Contact info. + * + * @return the contact value. + */ + public CertificateOrderContact contact() { + return this.innerProperties() == null ? null : this.innerProperties().contact(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem.java new file mode 100644 index 0000000000000..1345230f81fcf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem. */ +public final class AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem + extends ExpandableStringEnum< + AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem> { + /** + * Static value RegistrationStatusNotSupportedForRenewal for + * AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem. + */ + public static final AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem + REGISTRATION_STATUS_NOT_SUPPORTED_FOR_RENEWAL = fromString("RegistrationStatusNotSupportedForRenewal"); + + /** + * Static value ExpirationNotInRenewalTimeRange for + * AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem. + */ + public static final AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem + EXPIRATION_NOT_IN_RENEWAL_TIME_RANGE = fromString("ExpirationNotInRenewalTimeRange"); + + /** + * Static value SubscriptionNotActive for + * AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem. + */ + public static final AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem + SUBSCRIPTION_NOT_ACTIVE = fromString("SubscriptionNotActive"); + + /** + * Creates or finds a AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem + * from its string representation. + * + * @param name a name to look for. + * @return the corresponding + * AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem. + */ + @JsonCreator + public static AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem + fromString(String name) { + return fromString( + name, AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem.class); + } + + /** + * @return known AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem + * values. + */ + public static Collection< + AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem> + values() { + return values( + AppServiceCertificateOrderPatchResourcePropertiesAppServiceCertificateNotRenewableReasonsItem.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem.java new file mode 100644 index 0000000000000..6ca21b1d42dee --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem. */ +public final class AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem + extends ExpandableStringEnum { + /** + * Static value RegistrationStatusNotSupportedForRenewal for + * AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem. + */ + public static final AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem + REGISTRATION_STATUS_NOT_SUPPORTED_FOR_RENEWAL = fromString("RegistrationStatusNotSupportedForRenewal"); + + /** + * Static value ExpirationNotInRenewalTimeRange for + * AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem. + */ + public static final AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem + EXPIRATION_NOT_IN_RENEWAL_TIME_RANGE = fromString("ExpirationNotInRenewalTimeRange"); + + /** + * Static value SubscriptionNotActive for + * AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem. + */ + public static final AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem + SUBSCRIPTION_NOT_ACTIVE = fromString("SubscriptionNotActive"); + + /** + * Creates or finds a AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem from its + * string representation. + * + * @param name a name to look for. + * @return the corresponding AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem. + */ + @JsonCreator + public static AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem fromString( + String name) { + return fromString(name, AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem.class); + } + + /** @return known AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem values. */ + public static Collection + values() { + return values(AppServiceCertificateOrderPropertiesAppServiceCertificateNotRenewableReasonsItem.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrders.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrders.java new file mode 100644 index 0000000000000..2aa569439aab7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateOrders.java @@ -0,0 +1,595 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.AppServiceCertificateOrderInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import java.util.List; + +/** Resource collection API of AppServiceCertificateOrders. */ +public interface AppServiceCertificateOrders { + /** + * Description for List all certificate orders in a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate orders. + */ + PagedIterable list(); + + /** + * Description for List all certificate orders in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate orders. + */ + PagedIterable list(Context context); + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validatePurchaseInformation(AppServiceCertificateOrderInner appServiceCertificateOrder); + + /** + * Description for Validate information for a certificate order. + * + * @param appServiceCertificateOrder Information for a certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response validatePurchaseInformationWithResponse( + AppServiceCertificateOrderInner appServiceCertificateOrder, Context context); + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate orders. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get certificate orders in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate orders. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + AppServiceCertificateOrder getByResourceGroup(String resourceGroupName, String certificateOrderName); + + /** + * Description for Get a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order.. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 certificateOrderName); + + /** + * Description for Delete an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse(String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate order certificates. + */ + PagedIterable listCertificates( + String resourceGroupName, String certificateOrderName); + + /** + * Description for List all certificates associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 certificate order certificates. + */ + PagedIterable listCertificates( + String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + AppServiceCertificateResource getCertificate(String resourceGroupName, String certificateOrderName, String name); + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + Response getCertificateWithResponse( + String resourceGroupName, String certificateOrderName, String name, Context context); + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteCertificate(String resourceGroupName, String certificateOrderName, String name); + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteCertificateWithResponse( + String resourceGroupName, String certificateOrderName, String name, Context context); + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 reissue( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest); + + /** + * Description for Reissue an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param reissueCertificateOrderRequest Parameters for the reissue. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response reissueWithResponse( + String resourceGroupName, + String certificateOrderName, + ReissueCertificateOrderRequest reissueCertificateOrderRequest, + Context context); + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 renew( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest); + + /** + * Description for Renew an existing certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param renewCertificateOrderRequest Renew parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response renewWithResponse( + String resourceGroupName, + String certificateOrderName, + RenewCertificateOrderRequest renewCertificateOrderRequest, + Context context); + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resendEmail(String resourceGroupName, String certificateOrderName); + + /** + * Description for Resend certificate email. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resendEmailWithResponse(String resourceGroupName, String certificateOrderName, Context context); + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resendRequestEmails(String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier); + + /** + * Resend domain verification ownership email containing steps on how to verify a domain for a given certificate + * order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param nameIdentifier Email address. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resendRequestEmailsWithResponse( + String resourceGroupName, String certificateOrderName, NameIdentifierInner nameIdentifier, Context context); + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site seal. + */ + SiteSeal retrieveSiteSeal(String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest); + + /** + * This method is used to obtain the site seal information for an issued certificate. A site seal is a graphic that + * the certificate purchaser can embed on their web site to show their visitors information about their SSL + * certificate. If a web site visitor clicks on the site seal image, a pop-up page is displayed that contains + * detailed information about the SSL certificate. The site seal token is used to link the site seal graphic image + * to the appropriate certificate details pop-up page display when a user clicks on the site seal. The site seal + * images are expected to be static images and hosted by the reseller, to minimize delays for customer page load + * times. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param siteSealRequest Site seal request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return site seal. + */ + Response retrieveSiteSealWithResponse( + String resourceGroupName, String certificateOrderName, SiteSealRequest siteSealRequest, Context context); + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 verifyDomainOwnership(String resourceGroupName, String certificateOrderName); + + /** + * Description for Verify domain ownership for this certificate order. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response verifyDomainOwnershipWithResponse( + String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + List retrieveCertificateActions(String resourceGroupName, String name); + + /** + * Description for Retrieve the list of certificate actions. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateOrderAction. + */ + Response> retrieveCertificateActionsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + List retrieveCertificateEmailHistory(String resourceGroupName, String name); + + /** + * Description for Retrieve email history. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate order. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of CertificateEmail. + */ + Response> retrieveCertificateEmailHistoryWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Get a certificate order. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + AppServiceCertificateOrder getById(String id); + + /** + * Description for Get a certificate order. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate purchase order. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Get the certificate associated with a certificate order. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + AppServiceCertificateResource getCertificateById(String id); + + /** + * Description for Get the certificate associated with a certificate order. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return key Vault container ARM resource for a certificate that is purchased through Azure. + */ + Response getCertificateByIdWithResponse(String id, Context context); + + /** + * Description for Delete an existing certificate order. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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); + + /** + * Description for Delete an existing certificate order. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteCertificateById(String id); + + /** + * Description for Delete the certificate associated with a certificate order. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteCertificateByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AppServiceCertificateOrder resource. + * + * @param name resource name. + * @return the first stage of the new AppServiceCertificateOrder definition. + */ + AppServiceCertificateOrder.DefinitionStages.Blank define(String name); + + /** + * Begins definition for a new AppServiceCertificateResource resource. + * + * @param name resource name. + * @return the first stage of the new AppServiceCertificateResource definition. + */ + AppServiceCertificateResource.DefinitionStages.Blank defineCertificate(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificatePatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificatePatchResource.java new file mode 100644 index 0000000000000..d3de217c28bb3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificatePatchResource.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificate; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Key Vault container ARM resource for a certificate that is purchased through Azure. */ +@Fluent +public final class AppServiceCertificatePatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceCertificatePatchResource.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private AppServiceCertificate innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private AppServiceCertificate innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public AppServiceCertificatePatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the keyVaultId property: Key Vault resource Id. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultId(); + } + + /** + * Set the keyVaultId property: Key Vault resource Id. + * + * @param keyVaultId the keyVaultId value to set. + * @return the AppServiceCertificatePatchResource object itself. + */ + public AppServiceCertificatePatchResource withKeyVaultId(String keyVaultId) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificate(); + } + this.innerProperties().withKeyVaultId(keyVaultId); + return this; + } + + /** + * Get the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultSecretName(); + } + + /** + * Set the keyVaultSecretName property: Key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the AppServiceCertificatePatchResource object itself. + */ + public AppServiceCertificatePatchResource withKeyVaultSecretName(String keyVaultSecretName) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceCertificate(); + } + this.innerProperties().withKeyVaultSecretName(keyVaultSecretName); + return this; + } + + /** + * Get the provisioningState property: Status of the Key Vault secret. + * + * @return the provisioningState value. + */ + public KeyVaultSecretStatus provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateResource.java new file mode 100644 index 0000000000000..955c17f55604a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceCertificateResource.java @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateResourceInner; +import java.util.Map; + +/** An immutable client-side representation of AppServiceCertificateResource. */ +public interface AppServiceCertificateResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the keyVaultId property: Key Vault resource Id. + * + * @return the keyVaultId value. + */ + String keyVaultId(); + + /** + * Gets the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + String keyVaultSecretName(); + + /** + * Gets the provisioningState property: Status of the Key Vault secret. + * + * @return the provisioningState value. + */ + KeyVaultSecretStatus provisioningState(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceCertificateResourceInner + * object. + * + * @return the inner object. + */ + AppServiceCertificateResourceInner innerModel(); + + /** The entirety of the AppServiceCertificateResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithCreate { + } + /** The AppServiceCertificateResource definition stages. */ + interface DefinitionStages { + /** The first stage of the AppServiceCertificateResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the AppServiceCertificateResource 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. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + /** The stage of the AppServiceCertificateResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, certificateOrderName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName Name of the certificate order. + * @return the next definition stage. + */ + WithCreate withExistingCertificateOrder(String resourceGroupName, String certificateOrderName); + } + /** + * The stage of the AppServiceCertificateResource definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithKind, + DefinitionStages.WithKeyVaultId, + DefinitionStages.WithKeyVaultSecretName { + /** + * Executes the create request. + * + * @return the created resource. + */ + AppServiceCertificateResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AppServiceCertificateResource create(Context context); + } + /** The stage of the AppServiceCertificateResource 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 AppServiceCertificateResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the AppServiceCertificateResource definition allowing to specify keyVaultId. */ + interface WithKeyVaultId { + /** + * Specifies the keyVaultId property: Key Vault resource Id.. + * + * @param keyVaultId Key Vault resource Id. + * @return the next definition stage. + */ + WithCreate withKeyVaultId(String keyVaultId); + } + /** The stage of the AppServiceCertificateResource definition allowing to specify keyVaultSecretName. */ + interface WithKeyVaultSecretName { + /** + * Specifies the keyVaultSecretName property: Key Vault secret name.. + * + * @param keyVaultSecretName Key Vault secret name. + * @return the next definition stage. + */ + WithCreate withKeyVaultSecretName(String keyVaultSecretName); + } + } + /** + * Begins update for the AppServiceCertificateResource resource. + * + * @return the stage of resource update. + */ + AppServiceCertificateResource.Update update(); + + /** The template for AppServiceCertificateResource update. */ + interface Update extends UpdateStages.WithKind, UpdateStages.WithKeyVaultId, UpdateStages.WithKeyVaultSecretName { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AppServiceCertificateResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AppServiceCertificateResource apply(Context context); + } + /** The AppServiceCertificateResource update stages. */ + interface UpdateStages { + /** The stage of the AppServiceCertificateResource update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the AppServiceCertificateResource update allowing to specify keyVaultId. */ + interface WithKeyVaultId { + /** + * Specifies the keyVaultId property: Key Vault resource Id.. + * + * @param keyVaultId Key Vault resource Id. + * @return the next definition stage. + */ + Update withKeyVaultId(String keyVaultId); + } + /** The stage of the AppServiceCertificateResource update allowing to specify keyVaultSecretName. */ + interface WithKeyVaultSecretName { + /** + * Specifies the keyVaultSecretName property: Key Vault secret name.. + * + * @param keyVaultSecretName Key Vault secret name. + * @return the next definition stage. + */ + Update withKeyVaultSecretName(String keyVaultSecretName); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AppServiceCertificateResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AppServiceCertificateResource refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentCollection.java new file mode 100644 index 0000000000000..b8e7d470d8955 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironmentResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of App Service Environments. */ +@Fluent +public final class AppServiceEnvironmentCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceEnvironmentCollection.class); + + /* + * 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; + + /** + * 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 AppServiceEnvironmentCollection object itself. + */ + public AppServiceEnvironmentCollection 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 AppServiceEnvironmentCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentPatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentPatchResource.java new file mode 100644 index 0000000000000..f97c5ac16a962 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentPatchResource.java @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironment; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** ARM resource for a app service environment. */ +@Fluent +public final class AppServiceEnvironmentPatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServiceEnvironmentPatchResource.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private AppServiceEnvironment innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private AppServiceEnvironment innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public AppServiceEnvironmentPatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the App Service Environment. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the status property: Current status of the App Service Environment. + * + * @return the status value. + */ + public HostingEnvironmentStatus status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the virtualNetwork property: Description of the Virtual Network. + * + * @return the virtualNetwork value. + */ + public VirtualNetworkProfile virtualNetwork() { + return this.innerProperties() == null ? null : this.innerProperties().virtualNetwork(); + } + + /** + * Set the virtualNetwork property: Description of the Virtual Network. + * + * @param virtualNetwork the virtualNetwork value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withVirtualNetwork(VirtualNetworkProfile virtualNetwork) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withVirtualNetwork(virtualNetwork); + return this; + } + + /** + * Get the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the Virtual Network + * for the App Service Environment. + * + * @return the internalLoadBalancingMode value. + */ + public LoadBalancingMode internalLoadBalancingMode() { + return this.innerProperties() == null ? null : this.innerProperties().internalLoadBalancingMode(); + } + + /** + * Set the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the Virtual Network + * for the App Service Environment. + * + * @param internalLoadBalancingMode the internalLoadBalancingMode value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withInternalLoadBalancingMode( + LoadBalancingMode internalLoadBalancingMode) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withInternalLoadBalancingMode(internalLoadBalancingMode); + return this; + } + + /** + * Get the multiSize property: Front-end VM size, e.g. "Medium", "Large". + * + * @return the multiSize value. + */ + public String multiSize() { + return this.innerProperties() == null ? null : this.innerProperties().multiSize(); + } + + /** + * Set the multiSize property: Front-end VM size, e.g. "Medium", "Large". + * + * @param multiSize the multiSize value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withMultiSize(String multiSize) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withMultiSize(multiSize); + return this; + } + + /** + * Get the multiRoleCount property: Number of front-end instances. + * + * @return the multiRoleCount value. + */ + public Integer multiRoleCount() { + return this.innerProperties() == null ? null : this.innerProperties().multiRoleCount(); + } + + /** + * Get the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service Environment. + * + * @return the ipsslAddressCount value. + */ + public Integer ipsslAddressCount() { + return this.innerProperties() == null ? null : this.innerProperties().ipsslAddressCount(); + } + + /** + * Set the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service Environment. + * + * @param ipsslAddressCount the ipsslAddressCount value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withIpsslAddressCount(Integer ipsslAddressCount) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withIpsslAddressCount(ipsslAddressCount); + return this; + } + + /** + * Get the dnsSuffix property: DNS suffix of the App Service Environment. + * + * @return the dnsSuffix value. + */ + public String dnsSuffix() { + return this.innerProperties() == null ? null : this.innerProperties().dnsSuffix(); + } + + /** + * Set the dnsSuffix property: DNS suffix of the App Service Environment. + * + * @param dnsSuffix the dnsSuffix value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withDnsSuffix(String dnsSuffix) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withDnsSuffix(dnsSuffix); + return this; + } + + /** + * Get the maximumNumberOfMachines property: Maximum number of VMs in the App Service Environment. + * + * @return the maximumNumberOfMachines value. + */ + public Integer maximumNumberOfMachines() { + return this.innerProperties() == null ? null : this.innerProperties().maximumNumberOfMachines(); + } + + /** + * Get the frontEndScaleFactor property: Scale factor for front-ends. + * + * @return the frontEndScaleFactor value. + */ + public Integer frontEndScaleFactor() { + return this.innerProperties() == null ? null : this.innerProperties().frontEndScaleFactor(); + } + + /** + * Set the frontEndScaleFactor property: Scale factor for front-ends. + * + * @param frontEndScaleFactor the frontEndScaleFactor value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withFrontEndScaleFactor(Integer frontEndScaleFactor) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withFrontEndScaleFactor(frontEndScaleFactor); + return this; + } + + /** + * Get the suspended property: <code>true</code> if the App Service Environment is suspended; otherwise, + * <code>false</code>. The environment can be suspended, e.g. when the management endpoint is no longer + * available (most likely because NSG blocked the incoming traffic). + * + * @return the suspended value. + */ + public Boolean suspended() { + return this.innerProperties() == null ? null : this.innerProperties().suspended(); + } + + /** + * Get the clusterSettings property: Custom settings for changing the behavior of the App Service Environment. + * + * @return the clusterSettings value. + */ + public List clusterSettings() { + return this.innerProperties() == null ? null : this.innerProperties().clusterSettings(); + } + + /** + * Set the clusterSettings property: Custom settings for changing the behavior of the App Service Environment. + * + * @param clusterSettings the clusterSettings value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withClusterSettings(List clusterSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withClusterSettings(clusterSettings); + return this; + } + + /** + * Get the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @return the userWhitelistedIpRanges value. + */ + public List userWhitelistedIpRanges() { + return this.innerProperties() == null ? null : this.innerProperties().userWhitelistedIpRanges(); + } + + /** + * Set the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @param userWhitelistedIpRanges the userWhitelistedIpRanges value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withUserWhitelistedIpRanges(List userWhitelistedIpRanges) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withUserWhitelistedIpRanges(userWhitelistedIpRanges); + return this; + } + + /** + * Get the hasLinuxWorkers property: Flag that displays whether an ASE has linux workers or not. + * + * @return the hasLinuxWorkers value. + */ + public Boolean hasLinuxWorkers() { + return this.innerProperties() == null ? null : this.innerProperties().hasLinuxWorkers(); + } + + /** + * Get the dedicatedHostCount property: Dedicated Host Count. + * + * @return the dedicatedHostCount value. + */ + public Integer dedicatedHostCount() { + return this.innerProperties() == null ? null : this.innerProperties().dedicatedHostCount(); + } + + /** + * Set the dedicatedHostCount property: Dedicated Host Count. + * + * @param dedicatedHostCount the dedicatedHostCount value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withDedicatedHostCount(Integer dedicatedHostCount) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withDedicatedHostCount(dedicatedHostCount); + return this; + } + + /** + * Get the zoneRedundant property: Whether or not this App Service Environment is zone-redundant. + * + * @return the zoneRedundant value. + */ + public Boolean zoneRedundant() { + return this.innerProperties() == null ? null : this.innerProperties().zoneRedundant(); + } + + /** + * Set the zoneRedundant property: Whether or not this App Service Environment is zone-redundant. + * + * @param zoneRedundant the zoneRedundant value to set. + * @return the AppServiceEnvironmentPatchResource object itself. + */ + public AppServiceEnvironmentPatchResource withZoneRedundant(Boolean zoneRedundant) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServiceEnvironment(); + } + this.innerProperties().withZoneRedundant(zoneRedundant); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentResource.java new file mode 100644 index 0000000000000..37ee8585b5552 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironmentResource.java @@ -0,0 +1,649 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironmentResourceInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of AppServiceEnvironmentResource. */ +public interface AppServiceEnvironmentResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the provisioningState property: Provisioning state of the App Service Environment. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the status property: Current status of the App Service Environment. + * + * @return the status value. + */ + HostingEnvironmentStatus status(); + + /** + * Gets the virtualNetwork property: Description of the Virtual Network. + * + * @return the virtualNetwork value. + */ + VirtualNetworkProfile virtualNetwork(); + + /** + * Gets the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the Virtual Network + * for the App Service Environment. + * + * @return the internalLoadBalancingMode value. + */ + LoadBalancingMode internalLoadBalancingMode(); + + /** + * Gets the multiSize property: Front-end VM size, e.g. "Medium", "Large". + * + * @return the multiSize value. + */ + String multiSize(); + + /** + * Gets the multiRoleCount property: Number of front-end instances. + * + * @return the multiRoleCount value. + */ + Integer multiRoleCount(); + + /** + * Gets the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service Environment. + * + * @return the ipsslAddressCount value. + */ + Integer ipsslAddressCount(); + + /** + * Gets the dnsSuffix property: DNS suffix of the App Service Environment. + * + * @return the dnsSuffix value. + */ + String dnsSuffix(); + + /** + * Gets the maximumNumberOfMachines property: Maximum number of VMs in the App Service Environment. + * + * @return the maximumNumberOfMachines value. + */ + Integer maximumNumberOfMachines(); + + /** + * Gets the frontEndScaleFactor property: Scale factor for front-ends. + * + * @return the frontEndScaleFactor value. + */ + Integer frontEndScaleFactor(); + + /** + * Gets the suspended property: <code>true</code> if the App Service Environment is suspended; + * otherwise, <code>false</code>. The environment can be suspended, e.g. when the management endpoint is + * no longer available (most likely because NSG blocked the incoming traffic). + * + * @return the suspended value. + */ + Boolean suspended(); + + /** + * Gets the clusterSettings property: Custom settings for changing the behavior of the App Service Environment. + * + * @return the clusterSettings value. + */ + List clusterSettings(); + + /** + * Gets the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @return the userWhitelistedIpRanges value. + */ + List userWhitelistedIpRanges(); + + /** + * Gets the hasLinuxWorkers property: Flag that displays whether an ASE has linux workers or not. + * + * @return the hasLinuxWorkers value. + */ + Boolean hasLinuxWorkers(); + + /** + * Gets the dedicatedHostCount property: Dedicated Host Count. + * + * @return the dedicatedHostCount value. + */ + Integer dedicatedHostCount(); + + /** + * Gets the zoneRedundant property: Whether or not this App Service Environment is zone-redundant. + * + * @return the zoneRedundant value. + */ + Boolean zoneRedundant(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironmentResourceInner + * object. + * + * @return the inner object. + */ + AppServiceEnvironmentResourceInner innerModel(); + + /** The entirety of the AppServiceEnvironmentResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The AppServiceEnvironmentResource definition stages. */ + interface DefinitionStages { + /** The first stage of the AppServiceEnvironmentResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the AppServiceEnvironmentResource 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 AppServiceEnvironmentResource definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the AppServiceEnvironmentResource definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithKind, + DefinitionStages.WithVirtualNetwork, + DefinitionStages.WithInternalLoadBalancingMode, + DefinitionStages.WithMultiSize, + DefinitionStages.WithIpsslAddressCount, + DefinitionStages.WithDnsSuffix, + DefinitionStages.WithFrontEndScaleFactor, + DefinitionStages.WithClusterSettings, + DefinitionStages.WithUserWhitelistedIpRanges, + DefinitionStages.WithDedicatedHostCount, + DefinitionStages.WithZoneRedundant { + /** + * Executes the create request. + * + * @return the created resource. + */ + AppServiceEnvironmentResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AppServiceEnvironmentResource create(Context context); + } + /** The stage of the AppServiceEnvironmentResource 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 AppServiceEnvironmentResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify virtualNetwork. */ + interface WithVirtualNetwork { + /** + * Specifies the virtualNetwork property: Description of the Virtual Network.. + * + * @param virtualNetwork Description of the Virtual Network. + * @return the next definition stage. + */ + WithCreate withVirtualNetwork(VirtualNetworkProfile virtualNetwork); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify internalLoadBalancingMode. */ + interface WithInternalLoadBalancingMode { + /** + * Specifies the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the + * Virtual Network for the App Service Environment.. + * + * @param internalLoadBalancingMode Specifies which endpoints to serve internally in the Virtual Network for + * the App Service Environment. + * @return the next definition stage. + */ + WithCreate withInternalLoadBalancingMode(LoadBalancingMode internalLoadBalancingMode); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify multiSize. */ + interface WithMultiSize { + /** + * Specifies the multiSize property: Front-end VM size, e.g. "Medium", "Large".. + * + * @param multiSize Front-end VM size, e.g. "Medium", "Large". + * @return the next definition stage. + */ + WithCreate withMultiSize(String multiSize); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify ipsslAddressCount. */ + interface WithIpsslAddressCount { + /** + * Specifies the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service + * Environment.. + * + * @param ipsslAddressCount Number of IP SSL addresses reserved for the App Service Environment. + * @return the next definition stage. + */ + WithCreate withIpsslAddressCount(Integer ipsslAddressCount); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify dnsSuffix. */ + interface WithDnsSuffix { + /** + * Specifies the dnsSuffix property: DNS suffix of the App Service Environment.. + * + * @param dnsSuffix DNS suffix of the App Service Environment. + * @return the next definition stage. + */ + WithCreate withDnsSuffix(String dnsSuffix); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify frontEndScaleFactor. */ + interface WithFrontEndScaleFactor { + /** + * Specifies the frontEndScaleFactor property: Scale factor for front-ends.. + * + * @param frontEndScaleFactor Scale factor for front-ends. + * @return the next definition stage. + */ + WithCreate withFrontEndScaleFactor(Integer frontEndScaleFactor); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify clusterSettings. */ + interface WithClusterSettings { + /** + * Specifies the clusterSettings property: Custom settings for changing the behavior of the App Service + * Environment.. + * + * @param clusterSettings Custom settings for changing the behavior of the App Service Environment. + * @return the next definition stage. + */ + WithCreate withClusterSettings(List clusterSettings); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify userWhitelistedIpRanges. */ + interface WithUserWhitelistedIpRanges { + /** + * Specifies the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @param userWhitelistedIpRanges User added ip ranges to whitelist on ASE db. + * @return the next definition stage. + */ + WithCreate withUserWhitelistedIpRanges(List userWhitelistedIpRanges); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify dedicatedHostCount. */ + interface WithDedicatedHostCount { + /** + * Specifies the dedicatedHostCount property: Dedicated Host Count. + * + * @param dedicatedHostCount Dedicated Host Count. + * @return the next definition stage. + */ + WithCreate withDedicatedHostCount(Integer dedicatedHostCount); + } + /** The stage of the AppServiceEnvironmentResource definition allowing to specify zoneRedundant. */ + interface WithZoneRedundant { + /** + * Specifies the zoneRedundant property: Whether or not this App Service Environment is zone-redundant.. + * + * @param zoneRedundant Whether or not this App Service Environment is zone-redundant. + * @return the next definition stage. + */ + WithCreate withZoneRedundant(Boolean zoneRedundant); + } + } + /** + * Begins update for the AppServiceEnvironmentResource resource. + * + * @return the stage of resource update. + */ + AppServiceEnvironmentResource.Update update(); + + /** The template for AppServiceEnvironmentResource update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithVirtualNetwork, + UpdateStages.WithInternalLoadBalancingMode, + UpdateStages.WithMultiSize, + UpdateStages.WithIpsslAddressCount, + UpdateStages.WithDnsSuffix, + UpdateStages.WithFrontEndScaleFactor, + UpdateStages.WithClusterSettings, + UpdateStages.WithUserWhitelistedIpRanges, + UpdateStages.WithDedicatedHostCount, + UpdateStages.WithZoneRedundant { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AppServiceEnvironmentResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AppServiceEnvironmentResource apply(Context context); + } + /** The AppServiceEnvironmentResource update stages. */ + interface UpdateStages { + /** The stage of the AppServiceEnvironmentResource update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify virtualNetwork. */ + interface WithVirtualNetwork { + /** + * Specifies the virtualNetwork property: Description of the Virtual Network.. + * + * @param virtualNetwork Description of the Virtual Network. + * @return the next definition stage. + */ + Update withVirtualNetwork(VirtualNetworkProfile virtualNetwork); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify internalLoadBalancingMode. */ + interface WithInternalLoadBalancingMode { + /** + * Specifies the internalLoadBalancingMode property: Specifies which endpoints to serve internally in the + * Virtual Network for the App Service Environment.. + * + * @param internalLoadBalancingMode Specifies which endpoints to serve internally in the Virtual Network for + * the App Service Environment. + * @return the next definition stage. + */ + Update withInternalLoadBalancingMode(LoadBalancingMode internalLoadBalancingMode); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify multiSize. */ + interface WithMultiSize { + /** + * Specifies the multiSize property: Front-end VM size, e.g. "Medium", "Large".. + * + * @param multiSize Front-end VM size, e.g. "Medium", "Large". + * @return the next definition stage. + */ + Update withMultiSize(String multiSize); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify ipsslAddressCount. */ + interface WithIpsslAddressCount { + /** + * Specifies the ipsslAddressCount property: Number of IP SSL addresses reserved for the App Service + * Environment.. + * + * @param ipsslAddressCount Number of IP SSL addresses reserved for the App Service Environment. + * @return the next definition stage. + */ + Update withIpsslAddressCount(Integer ipsslAddressCount); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify dnsSuffix. */ + interface WithDnsSuffix { + /** + * Specifies the dnsSuffix property: DNS suffix of the App Service Environment.. + * + * @param dnsSuffix DNS suffix of the App Service Environment. + * @return the next definition stage. + */ + Update withDnsSuffix(String dnsSuffix); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify frontEndScaleFactor. */ + interface WithFrontEndScaleFactor { + /** + * Specifies the frontEndScaleFactor property: Scale factor for front-ends.. + * + * @param frontEndScaleFactor Scale factor for front-ends. + * @return the next definition stage. + */ + Update withFrontEndScaleFactor(Integer frontEndScaleFactor); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify clusterSettings. */ + interface WithClusterSettings { + /** + * Specifies the clusterSettings property: Custom settings for changing the behavior of the App Service + * Environment.. + * + * @param clusterSettings Custom settings for changing the behavior of the App Service Environment. + * @return the next definition stage. + */ + Update withClusterSettings(List clusterSettings); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify userWhitelistedIpRanges. */ + interface WithUserWhitelistedIpRanges { + /** + * Specifies the userWhitelistedIpRanges property: User added ip ranges to whitelist on ASE db. + * + * @param userWhitelistedIpRanges User added ip ranges to whitelist on ASE db. + * @return the next definition stage. + */ + Update withUserWhitelistedIpRanges(List userWhitelistedIpRanges); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify dedicatedHostCount. */ + interface WithDedicatedHostCount { + /** + * Specifies the dedicatedHostCount property: Dedicated Host Count. + * + * @param dedicatedHostCount Dedicated Host Count. + * @return the next definition stage. + */ + Update withDedicatedHostCount(Integer dedicatedHostCount); + } + /** The stage of the AppServiceEnvironmentResource update allowing to specify zoneRedundant. */ + interface WithZoneRedundant { + /** + * Specifies the zoneRedundant property: Whether or not this App Service Environment is zone-redundant.. + * + * @param zoneRedundant Whether or not this App Service Environment is zone-redundant. + * @return the next definition stage. + */ + Update withZoneRedundant(Boolean zoneRedundant); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AppServiceEnvironmentResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AppServiceEnvironmentResource refresh(Context context); + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable changeVnet(VirtualNetworkProfile vnetInfo); + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param vnetInfo Details for the new virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable changeVnet(VirtualNetworkProfile vnetInfo, Context context); + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @throws com.azure.resourcemanager.appservice.generated.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 reboot(); + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response rebootWithResponse(Context context); + + /** + * Description for Resume an App Service Environment. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable resume(); + + /** + * Description for Resume an App Service Environment. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable resume(Context context); + + /** + * Description for Suspend an App Service Environment. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable suspend(); + + /** + * Description for Suspend an App Service Environment. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable suspend(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironments.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironments.java new file mode 100644 index 0000000000000..cc07956738625 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServiceEnvironments.java @@ -0,0 +1,1266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.AseV3NetworkingConfigurationInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.WorkerPoolResourceInner; +import java.util.List; + +/** Resource collection API of AppServiceEnvironments. */ +public interface AppServiceEnvironments { + /** + * Description for Get all App Service Environments for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Environments. + */ + PagedIterable list(); + + /** + * Description for Get all App Service Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Environments. + */ + PagedIterable list(Context context); + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Environments. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all App Service Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Environments. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + AppServiceEnvironmentResource getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Get the properties of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name, Boolean forceDelete); + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name, Boolean forceDelete, Context context); + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 stamp capacities. + */ + PagedIterable listCapacities(String resourceGroupName, String name); + + /** + * Description for Get the used, available, and total worker capacity an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 stamp capacities. + */ + PagedIterable listCapacities(String resourceGroupName, String name, Context context); + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes main public IP address and any extra virtual IPs. + */ + AddressResponse getVipInfo(String resourceGroupName, String name); + + /** + * Description for Get IP addresses assigned to an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes main public IP address and any extra virtual IPs. + */ + Response getVipInfoWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable changeVnet(String resourceGroupName, String name, VirtualNetworkProfile vnetInfo); + + /** + * Description for Move an App Service Environment to a different VNET. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param vnetInfo Details for the new virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable changeVnet( + String resourceGroupName, String name, VirtualNetworkProfile vnetInfo, Context context); + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + AseV3NetworkingConfiguration getAseV3NetworkingConfiguration(String resourceGroupName, String name); + + /** + * Description for Get networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + Response getAseV3NetworkingConfigurationWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + AseV3NetworkingConfiguration updateAseNetworkingConfiguration( + String resourceGroupName, String name, AseV3NetworkingConfigurationInner aseNetworkingConfiguration); + + /** + * Description for Update networking configuration of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param aseNetworkingConfiguration Full view of networking configuration for an ASE. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return full view of networking configuration for an ASE. + */ + Response updateAseNetworkingConfigurationWithResponse( + String resourceGroupName, + String name, + AseV3NetworkingConfigurationInner aseNetworkingConfiguration, + Context context); + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of HostingEnvironmentDiagnostics. + */ + List listDiagnostics(String resourceGroupName, String name); + + /** + * Description for Get diagnostic information for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of HostingEnvironmentDiagnostics. + */ + Response> listDiagnosticsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 for an App Service Environment. + */ + HostingEnvironmentDiagnostics getDiagnosticsItem(String resourceGroupName, String name, String diagnosticsName); + + /** + * Description for Get a diagnostics item for an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param diagnosticsName Name of the diagnostics item. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 for an App Service Environment. + */ + Response getDiagnosticsItemWithResponse( + String resourceGroupName, String name, String diagnosticsName, Context context); + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Inbound Environment Endpoints. + */ + PagedIterable getInboundNetworkDependenciesEndpoints( + String resourceGroupName, String name); + + /** + * Description for Get the network endpoints of all inbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Inbound Environment Endpoints. + */ + PagedIterable getInboundNetworkDependenciesEndpoints( + String resourceGroupName, String name, Context context); + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 worker pools. + */ + PagedIterable listMultiRolePools(String resourceGroupName, String name); + + /** + * Description for Get all multi-role pools. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 worker pools. + */ + PagedIterable listMultiRolePools(String resourceGroupName, String name, Context context); + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + WorkerPoolResource getMultiRolePool(String resourceGroupName, String name); + + /** + * Description for Get properties of a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + Response getMultiRolePoolWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + WorkerPoolResource createOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + WorkerPoolResource createOrUpdateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + WorkerPoolResource updateMultiRolePool( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope); + + /** + * Description for Create or update a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param multiRolePoolEnvelope Properties of the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + Response updateMultiRolePoolWithResponse( + String resourceGroupName, String name, WorkerPoolResourceInner multiRolePoolEnvelope, Context context); + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + PagedIterable listMultiRolePoolInstanceMetricDefinitions( + String resourceGroupName, String name, String instance); + + /** + * Description for Get metric definitions for a specific instance of a multi-role pool of an App Service + * Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param instance Name of the instance in the multi-role pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + PagedIterable listMultiRolePoolInstanceMetricDefinitions( + String resourceGroupName, String name, String instance, Context context); + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + PagedIterable listMultiRoleMetricDefinitions(String resourceGroupName, String name); + + /** + * Description for Get metric definitions for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + PagedIterable listMultiRoleMetricDefinitions( + String resourceGroupName, String name, Context context); + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + PagedIterable listMultiRolePoolSkus(String resourceGroupName, String name); + + /** + * Description for Get available SKUs for scaling a multi-role pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + PagedIterable listMultiRolePoolSkus(String resourceGroupName, String name, Context context); + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 usages. + */ + PagedIterable listMultiRoleUsages(String resourceGroupName, String name); + + /** + * Description for Get usage metrics for a multi-role pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 usages. + */ + PagedIterable listMultiRoleUsages(String resourceGroupName, String name, Context context); + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Operation. + */ + List listOperations(String resourceGroupName, String name); + + /** + * Description for List all currently running operations on the App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Operation. + */ + Response> listOperationsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Outbound Environment Endpoints. + */ + PagedIterable getOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String name); + + /** + * Description for Get the network endpoints of all outbound dependencies of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Outbound Environment Endpoints. + */ + PagedIterable getOutboundNetworkDependenciesEndpoints( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name); + + /** + * Description for Gets the list of private endpoints associated with a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + PrivateLinkResourcesWrapper getPrivateLinkResources(String resourceGroupName, String name); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 reboot(String resourceGroupName, String name); + + /** + * Description for Reboot all machines in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response rebootWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable resume(String resourceGroupName, String name); + + /** + * Description for Resume an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable resume(String resourceGroupName, String name, Context context); + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + PagedIterable listAppServicePlans(String resourceGroupName, String name); + + /** + * Description for Get all App Service plans in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + PagedIterable listAppServicePlans(String resourceGroupName, String name, Context context); + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable listWebApps(String resourceGroupName, String name); + + /** + * Description for Get all apps in an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param propertiesToInclude Comma separated list of app properties to include. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable listWebApps(String resourceGroupName, String name, String propertiesToInclude, Context context); + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable suspend(String resourceGroupName, String name); + + /** + * Description for Suspend an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable suspend(String resourceGroupName, String name, Context context); + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + PagedIterable listUsages(String resourceGroupName, String name); + + /** + * Description for Get global usage metrics of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + PagedIterable listUsages(String resourceGroupName, String name, String filter, Context context); + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 worker pools. + */ + PagedIterable listWorkerPools(String resourceGroupName, String name); + + /** + * Description for Get all worker pools of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 worker pools. + */ + PagedIterable listWorkerPools(String resourceGroupName, String name, Context context); + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + WorkerPoolResource getWorkerPool(String resourceGroupName, String name, String workerPoolName); + + /** + * Description for Get properties of a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + Response getWorkerPoolWithResponse( + String resourceGroupName, String name, String workerPoolName, Context context); + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + PagedIterable listWorkerPoolInstanceMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, String instance); + + /** + * Description for Get metric definitions for a specific instance of a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param instance Name of the instance in the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + PagedIterable listWorkerPoolInstanceMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, String instance, Context context); + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + PagedIterable listWebWorkerMetricDefinitions( + String resourceGroupName, String name, String workerPoolName); + + /** + * Description for Get metric definitions for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metric definitions. + */ + PagedIterable listWebWorkerMetricDefinitions( + String resourceGroupName, String name, String workerPoolName, Context context); + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + PagedIterable listWorkerPoolSkus(String resourceGroupName, String name, String workerPoolName); + + /** + * Description for Get available SKUs for scaling a worker pool. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + PagedIterable listWorkerPoolSkus( + String resourceGroupName, String name, String workerPoolName, Context context); + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 usages. + */ + PagedIterable listWebWorkerUsages(String resourceGroupName, String name, String workerPoolName); + + /** + * Description for Get usage metrics for a worker pool of an App Service Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @param workerPoolName Name of the worker pool. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 usages. + */ + PagedIterable listWebWorkerUsages( + String resourceGroupName, String name, String workerPoolName, Context context); + + /** + * Description for Get the properties of an App Service Environment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + AppServiceEnvironmentResource getById(String id); + + /** + * Description for Get the properties of an App Service Environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service Environment ARM resource. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnectionById(String id); + + /** + * Description for Gets a private endpoint connection. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + Response getPrivateEndpointConnectionByIdWithResponse( + String id, Context context); + + /** + * Description for Get properties of a worker pool. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + WorkerPoolResource getWorkerPoolById(String id); + + /** + * Description for Get properties of a worker pool. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return worker pool of an App Service Environment ARM resource. + */ + Response getWorkerPoolByIdWithResponse(String id, Context context); + + /** + * Description for Delete an App Service Environment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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); + + /** + * Description for Delete an App Service Environment. + * + * @param id the resource ID. + * @param forceDelete Specify <code>true</code> to force the deletion even if the App Service + * Environment contains resources. The default is <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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, Boolean forceDelete, Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnectionById(String id); + + /** + * Description for Deletes a private endpoint connection. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnectionByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AppServiceEnvironmentResource resource. + * + * @param name resource name. + * @return the first stage of the new AppServiceEnvironmentResource definition. + */ + AppServiceEnvironmentResource.DefinitionStages.Blank define(String name); + + /** + * Begins definition for a new RemotePrivateEndpointConnectionArmResource resource. + * + * @param name resource name. + * @return the first stage of the new RemotePrivateEndpointConnectionArmResource definition. + */ + RemotePrivateEndpointConnectionArmResource.DefinitionStages.Blank defineRemotePrivateEndpointConnectionArmResource( + String name); + + /** + * Begins definition for a new WorkerPoolResource resource. + * + * @param name resource name. + * @return the first stage of the new WorkerPoolResource definition. + */ + WorkerPoolResource.DefinitionStages.Blank defineWorkerPool(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlan.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlan.java new file mode 100644 index 0000000000000..81644e3099467 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlan.java @@ -0,0 +1,767 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner; +import java.time.OffsetDateTime; +import java.util.Map; + +/** An immutable client-side representation of AppServicePlan. */ +public interface AppServicePlan { + /** + * 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 sku property: Description of a SKU for a scalable resource. + * + * @return the sku value. + */ + SkuDescription sku(); + + /** + * Gets the extendedLocation property: Extended Location. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @return the workerTierName value. + */ + String workerTierName(); + + /** + * Gets the status property: App Service plan status. + * + * @return the status value. + */ + StatusOptions status(); + + /** + * Gets the subscription property: App Service plan subscription. + * + * @return the subscription value. + */ + String subscription(); + + /** + * Gets the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * Gets the maximumNumberOfWorkers property: Maximum number of instances that can be assigned to this App Service + * plan. + * + * @return the maximumNumberOfWorkers value. + */ + Integer maximumNumberOfWorkers(); + + /** + * Gets the geoRegion property: Geographical location for the App Service plan. + * + * @return the geoRegion value. + */ + String geoRegion(); + + /** + * Gets the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @return the perSiteScaling value. + */ + Boolean perSiteScaling(); + + /** + * Gets the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @return the elasticScaleEnabled value. + */ + Boolean elasticScaleEnabled(); + + /** + * Gets the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @return the maximumElasticWorkerCount value. + */ + Integer maximumElasticWorkerCount(); + + /** + * Gets the numberOfSites property: Number of apps assigned to this App Service plan. + * + * @return the numberOfSites value. + */ + Integer numberOfSites(); + + /** + * Gets the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @return the isSpot value. + */ + Boolean isSpot(); + + /** + * Gets the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @return the spotExpirationTime value. + */ + OffsetDateTime spotExpirationTime(); + + /** + * Gets the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @return the freeOfferExpirationTime value. + */ + OffsetDateTime freeOfferExpirationTime(); + + /** + * Gets the resourceGroup property: Resource group of the App Service plan. + * + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * Gets the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the reserved value. + */ + Boolean reserved(); + + /** + * Gets the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * Gets the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * Gets the targetWorkerCount property: Scaling worker count. + * + * @return the targetWorkerCount value. + */ + Integer targetWorkerCount(); + + /** + * Gets the targetWorkerSizeId property: Scaling worker size ID. + * + * @return the targetWorkerSizeId value. + */ + Integer targetWorkerSizeId(); + + /** + * Gets the provisioningState property: Provisioning state of the App Service Plan. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @return the kubeEnvironmentProfile value. + */ + KubeEnvironmentProfile kubeEnvironmentProfile(); + + /** + * Gets the zoneRedundant property: If <code>true</code>, this App Service Plan will perform + * availability zone balancing. If <code>false</code>, this App Service Plan will not perform + * availability zone balancing. + * + * @return the zoneRedundant value. + */ + Boolean zoneRedundant(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner object. + * + * @return the inner object. + */ + AppServicePlanInner innerModel(); + + /** The entirety of the AppServicePlan definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The AppServicePlan definition stages. */ + interface DefinitionStages { + /** The first stage of the AppServicePlan definition. */ + interface Blank extends WithLocation { + } + /** The stage of the AppServicePlan 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 AppServicePlan definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the AppServicePlan 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.WithSku, + DefinitionStages.WithExtendedLocation, + DefinitionStages.WithKind, + DefinitionStages.WithWorkerTierName, + DefinitionStages.WithHostingEnvironmentProfile, + DefinitionStages.WithPerSiteScaling, + DefinitionStages.WithElasticScaleEnabled, + DefinitionStages.WithMaximumElasticWorkerCount, + DefinitionStages.WithIsSpot, + DefinitionStages.WithSpotExpirationTime, + DefinitionStages.WithFreeOfferExpirationTime, + DefinitionStages.WithReserved, + DefinitionStages.WithIsXenon, + DefinitionStages.WithHyperV, + DefinitionStages.WithTargetWorkerCount, + DefinitionStages.WithTargetWorkerSizeId, + DefinitionStages.WithKubeEnvironmentProfile, + DefinitionStages.WithZoneRedundant { + /** + * Executes the create request. + * + * @return the created resource. + */ + AppServicePlan create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AppServicePlan create(Context context); + } + /** The stage of the AppServicePlan 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 AppServicePlan definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Description of a SKU for a scalable resource.. + * + * @param sku Description of a SKU for a scalable resource. + * @return the next definition stage. + */ + WithCreate withSku(SkuDescription sku); + } + /** The stage of the AppServicePlan definition allowing to specify extendedLocation. */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: Extended Location.. + * + * @param extendedLocation Extended Location. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + /** The stage of the AppServicePlan definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the AppServicePlan definition allowing to specify workerTierName. */ + interface WithWorkerTierName { + /** + * Specifies the workerTierName property: Target worker tier assigned to the App Service plan.. + * + * @param workerTierName Target worker tier assigned to the App Service plan. + * @return the next definition stage. + */ + WithCreate withWorkerTierName(String workerTierName); + } + /** The stage of the AppServicePlan definition allowing to specify hostingEnvironmentProfile. */ + interface WithHostingEnvironmentProfile { + /** + * Specifies the hostingEnvironmentProfile property: Specification for the App Service Environment to use + * for the App Service plan.. + * + * @param hostingEnvironmentProfile Specification for the App Service Environment to use for the App Service + * plan. + * @return the next definition stage. + */ + WithCreate withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile); + } + /** The stage of the AppServicePlan definition allowing to specify perSiteScaling. */ + interface WithPerSiteScaling { + /** + * Specifies the perSiteScaling property: If <code>true</code>, apps assigned to this App + * Service plan can be scaled independently. If <code>false</code>, apps assigned to this App + * Service plan will scale to all instances of the plan.. + * + * @param perSiteScaling If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will + * scale to all instances of the plan. + * @return the next definition stage. + */ + WithCreate withPerSiteScaling(Boolean perSiteScaling); + } + /** The stage of the AppServicePlan definition allowing to specify elasticScaleEnabled. */ + interface WithElasticScaleEnabled { + /** + * Specifies the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will + * scale as if the ServerFarm was ElasticPremium sku. + * + * @param elasticScaleEnabled ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * @return the next definition stage. + */ + WithCreate withElasticScaleEnabled(Boolean elasticScaleEnabled); + } + /** The stage of the AppServicePlan definition allowing to specify maximumElasticWorkerCount. */ + interface WithMaximumElasticWorkerCount { + /** + * Specifies the maximumElasticWorkerCount property: Maximum number of total workers allowed for this + * ElasticScaleEnabled App Service Plan. + * + * @param maximumElasticWorkerCount Maximum number of total workers allowed for this ElasticScaleEnabled App + * Service Plan. + * @return the next definition stage. + */ + WithCreate withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount); + } + /** The stage of the AppServicePlan definition allowing to specify isSpot. */ + interface WithIsSpot { + /** + * Specifies the isSpot property: If <code>true</code>, this App Service Plan owns spot + * instances.. + * + * @param isSpot If <code>true</code>, this App Service Plan owns spot instances. + * @return the next definition stage. + */ + WithCreate withIsSpot(Boolean isSpot); + } + /** The stage of the AppServicePlan definition allowing to specify spotExpirationTime. */ + interface WithSpotExpirationTime { + /** + * Specifies the spotExpirationTime property: The time when the server farm expires. Valid only if it is a + * spot server farm.. + * + * @param spotExpirationTime The time when the server farm expires. Valid only if it is a spot server farm. + * @return the next definition stage. + */ + WithCreate withSpotExpirationTime(OffsetDateTime spotExpirationTime); + } + /** The stage of the AppServicePlan definition allowing to specify freeOfferExpirationTime. */ + interface WithFreeOfferExpirationTime { + /** + * Specifies the freeOfferExpirationTime property: The time when the server farm free offer expires.. + * + * @param freeOfferExpirationTime The time when the server farm free offer expires. + * @return the next definition stage. + */ + WithCreate withFreeOfferExpirationTime(OffsetDateTime freeOfferExpirationTime); + } + /** The stage of the AppServicePlan definition allowing to specify reserved. */ + interface WithReserved { + /** + * Specifies the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise.. + * + * @param reserved If Linux app service plan <code>true</code>, <code>false</code> + * otherwise. + * @return the next definition stage. + */ + WithCreate withReserved(Boolean reserved); + } + /** The stage of the AppServicePlan definition allowing to specify isXenon. */ + interface WithIsXenon { + /** + * Specifies the isXenon property: Obsolete: If Hyper-V container app service plan + * <code>true</code>, <code>false</code> otherwise.. + * + * @param isXenon Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * @return the next definition stage. + */ + WithCreate withIsXenon(Boolean isXenon); + } + /** The stage of the AppServicePlan definition allowing to specify hyperV. */ + interface WithHyperV { + /** + * Specifies the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise.. + * + * @param hyperV If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * @return the next definition stage. + */ + WithCreate withHyperV(Boolean hyperV); + } + /** The stage of the AppServicePlan definition allowing to specify targetWorkerCount. */ + interface WithTargetWorkerCount { + /** + * Specifies the targetWorkerCount property: Scaling worker count.. + * + * @param targetWorkerCount Scaling worker count. + * @return the next definition stage. + */ + WithCreate withTargetWorkerCount(Integer targetWorkerCount); + } + /** The stage of the AppServicePlan definition allowing to specify targetWorkerSizeId. */ + interface WithTargetWorkerSizeId { + /** + * Specifies the targetWorkerSizeId property: Scaling worker size ID.. + * + * @param targetWorkerSizeId Scaling worker size ID. + * @return the next definition stage. + */ + WithCreate withTargetWorkerSizeId(Integer targetWorkerSizeId); + } + /** The stage of the AppServicePlan definition allowing to specify kubeEnvironmentProfile. */ + interface WithKubeEnvironmentProfile { + /** + * Specifies the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for + * the App Service plan.. + * + * @param kubeEnvironmentProfile Specification for the Kubernetes Environment to use for the App Service + * plan. + * @return the next definition stage. + */ + WithCreate withKubeEnvironmentProfile(KubeEnvironmentProfile kubeEnvironmentProfile); + } + /** The stage of the AppServicePlan definition allowing to specify zoneRedundant. */ + interface WithZoneRedundant { + /** + * Specifies the zoneRedundant property: If <code>true</code>, this App Service Plan will + * perform availability zone balancing. If <code>false</code>, this App Service Plan will not + * perform availability zone balancing.. + * + * @param zoneRedundant If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform + * availability zone balancing. + * @return the next definition stage. + */ + WithCreate withZoneRedundant(Boolean zoneRedundant); + } + } + /** + * Begins update for the AppServicePlan resource. + * + * @return the stage of resource update. + */ + AppServicePlan.Update update(); + + /** The template for AppServicePlan update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithWorkerTierName, + UpdateStages.WithPerSiteScaling, + UpdateStages.WithElasticScaleEnabled, + UpdateStages.WithMaximumElasticWorkerCount, + UpdateStages.WithIsSpot, + UpdateStages.WithSpotExpirationTime, + UpdateStages.WithFreeOfferExpirationTime, + UpdateStages.WithTargetWorkerCount, + UpdateStages.WithTargetWorkerSizeId, + UpdateStages.WithKubeEnvironmentProfile, + UpdateStages.WithZoneRedundant { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AppServicePlan apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AppServicePlan apply(Context context); + } + /** The AppServicePlan update stages. */ + interface UpdateStages { + /** The stage of the AppServicePlan update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the AppServicePlan update allowing to specify workerTierName. */ + interface WithWorkerTierName { + /** + * Specifies the workerTierName property: Target worker tier assigned to the App Service plan.. + * + * @param workerTierName Target worker tier assigned to the App Service plan. + * @return the next definition stage. + */ + Update withWorkerTierName(String workerTierName); + } + /** The stage of the AppServicePlan update allowing to specify perSiteScaling. */ + interface WithPerSiteScaling { + /** + * Specifies the perSiteScaling property: If <code>true</code>, apps assigned to this App + * Service plan can be scaled independently. If <code>false</code>, apps assigned to this App + * Service plan will scale to all instances of the plan.. + * + * @param perSiteScaling If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will + * scale to all instances of the plan. + * @return the next definition stage. + */ + Update withPerSiteScaling(Boolean perSiteScaling); + } + /** The stage of the AppServicePlan update allowing to specify elasticScaleEnabled. */ + interface WithElasticScaleEnabled { + /** + * Specifies the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will + * scale as if the ServerFarm was ElasticPremium sku. + * + * @param elasticScaleEnabled ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * @return the next definition stage. + */ + Update withElasticScaleEnabled(Boolean elasticScaleEnabled); + } + /** The stage of the AppServicePlan update allowing to specify maximumElasticWorkerCount. */ + interface WithMaximumElasticWorkerCount { + /** + * Specifies the maximumElasticWorkerCount property: Maximum number of total workers allowed for this + * ElasticScaleEnabled App Service Plan. + * + * @param maximumElasticWorkerCount Maximum number of total workers allowed for this ElasticScaleEnabled App + * Service Plan. + * @return the next definition stage. + */ + Update withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount); + } + /** The stage of the AppServicePlan update allowing to specify isSpot. */ + interface WithIsSpot { + /** + * Specifies the isSpot property: If <code>true</code>, this App Service Plan owns spot + * instances.. + * + * @param isSpot If <code>true</code>, this App Service Plan owns spot instances. + * @return the next definition stage. + */ + Update withIsSpot(Boolean isSpot); + } + /** The stage of the AppServicePlan update allowing to specify spotExpirationTime. */ + interface WithSpotExpirationTime { + /** + * Specifies the spotExpirationTime property: The time when the server farm expires. Valid only if it is a + * spot server farm.. + * + * @param spotExpirationTime The time when the server farm expires. Valid only if it is a spot server farm. + * @return the next definition stage. + */ + Update withSpotExpirationTime(OffsetDateTime spotExpirationTime); + } + /** The stage of the AppServicePlan update allowing to specify freeOfferExpirationTime. */ + interface WithFreeOfferExpirationTime { + /** + * Specifies the freeOfferExpirationTime property: The time when the server farm free offer expires.. + * + * @param freeOfferExpirationTime The time when the server farm free offer expires. + * @return the next definition stage. + */ + Update withFreeOfferExpirationTime(OffsetDateTime freeOfferExpirationTime); + } + /** The stage of the AppServicePlan update allowing to specify targetWorkerCount. */ + interface WithTargetWorkerCount { + /** + * Specifies the targetWorkerCount property: Scaling worker count.. + * + * @param targetWorkerCount Scaling worker count. + * @return the next definition stage. + */ + Update withTargetWorkerCount(Integer targetWorkerCount); + } + /** The stage of the AppServicePlan update allowing to specify targetWorkerSizeId. */ + interface WithTargetWorkerSizeId { + /** + * Specifies the targetWorkerSizeId property: Scaling worker size ID.. + * + * @param targetWorkerSizeId Scaling worker size ID. + * @return the next definition stage. + */ + Update withTargetWorkerSizeId(Integer targetWorkerSizeId); + } + /** The stage of the AppServicePlan update allowing to specify kubeEnvironmentProfile. */ + interface WithKubeEnvironmentProfile { + /** + * Specifies the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for + * the App Service plan.. + * + * @param kubeEnvironmentProfile Specification for the Kubernetes Environment to use for the App Service + * plan. + * @return the next definition stage. + */ + Update withKubeEnvironmentProfile(KubeEnvironmentProfile kubeEnvironmentProfile); + } + /** The stage of the AppServicePlan update allowing to specify zoneRedundant. */ + interface WithZoneRedundant { + /** + * Specifies the zoneRedundant property: If <code>true</code>, this App Service Plan will + * perform availability zone balancing. If <code>false</code>, this App Service Plan will not + * perform availability zone balancing.. + * + * @param zoneRedundant If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform + * availability zone balancing. + * @return the next definition stage. + */ + Update withZoneRedundant(Boolean zoneRedundant); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AppServicePlan refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AppServicePlan refresh(Context context); + + /** + * Description for Restart all apps in an App Service plan. + * + * @throws com.azure.resourcemanager.appservice.generated.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 restartWebApps(); + + /** + * Description for Restart all apps in an App Service plan. + * + * @param softRestart Specify <code>true</code> to perform a soft restart, applies the configuration + * settings and restarts the apps if necessary. The default is <code>false</code>, which always + * restarts and reprovisions the apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response restartWebAppsWithResponse(Boolean softRestart, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanCollection.java new file mode 100644 index 0000000000000..1f7095e872720 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of App Service plans. */ +@Fluent +public final class AppServicePlanCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServicePlanCollection.class); + + /* + * 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; + + /** + * 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 AppServicePlanCollection object itself. + */ + public AppServicePlanCollection 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 AppServicePlanCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanPatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanPatchResource.java new file mode 100644 index 0000000000000..a99099c178401 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanPatchResource.java @@ -0,0 +1,487 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServicePlanPatchResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** ARM resource for a app service plan. */ +@Fluent +public final class AppServicePlanPatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppServicePlanPatchResource.class); + + /* + * AppServicePlanPatchResource resource specific properties + */ + @JsonProperty(value = "properties") + private AppServicePlanPatchResourceProperties innerProperties; + + /** + * Get the innerProperties property: AppServicePlanPatchResource resource specific properties. + * + * @return the innerProperties value. + */ + private AppServicePlanPatchResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public AppServicePlanPatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @return the workerTierName value. + */ + public String workerTierName() { + return this.innerProperties() == null ? null : this.innerProperties().workerTierName(); + } + + /** + * Set the workerTierName property: Target worker tier assigned to the App Service plan. + * + * @param workerTierName the workerTierName value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withWorkerTierName(String workerTierName) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withWorkerTierName(workerTierName); + return this; + } + + /** + * Get the status property: App Service plan status. + * + * @return the status value. + */ + public StatusOptions status() { + return this.innerProperties() == null ? null : this.innerProperties().status(); + } + + /** + * Get the subscription property: App Service plan subscription. + * + * @return the subscription value. + */ + public String subscription() { + return this.innerProperties() == null ? null : this.innerProperties().subscription(); + } + + /** + * Get the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerProperties() == null ? null : this.innerProperties().hostingEnvironmentProfile(); + } + + /** + * Set the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the App + * Service plan. + * + * @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withHostingEnvironmentProfile( + HostingEnvironmentProfile hostingEnvironmentProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withHostingEnvironmentProfile(hostingEnvironmentProfile); + return this; + } + + /** + * Get the maximumNumberOfWorkers property: Maximum number of instances that can be assigned to this App Service + * plan. + * + * @return the maximumNumberOfWorkers value. + */ + public Integer maximumNumberOfWorkers() { + return this.innerProperties() == null ? null : this.innerProperties().maximumNumberOfWorkers(); + } + + /** + * Get the geoRegion property: Geographical location for the App Service plan. + * + * @return the geoRegion value. + */ + public String geoRegion() { + return this.innerProperties() == null ? null : this.innerProperties().geoRegion(); + } + + /** + * Get the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @return the perSiteScaling value. + */ + public Boolean perSiteScaling() { + return this.innerProperties() == null ? null : this.innerProperties().perSiteScaling(); + } + + /** + * Set the perSiteScaling property: If <code>true</code>, apps assigned to this App Service plan can be + * scaled independently. If <code>false</code>, apps assigned to this App Service plan will scale to all + * instances of the plan. + * + * @param perSiteScaling the perSiteScaling value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withPerSiteScaling(Boolean perSiteScaling) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withPerSiteScaling(perSiteScaling); + return this; + } + + /** + * Get the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @return the elasticScaleEnabled value. + */ + public Boolean elasticScaleEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().elasticScaleEnabled(); + } + + /** + * Set the elasticScaleEnabled property: ServerFarm supports ElasticScale. Apps in this plan will scale as if the + * ServerFarm was ElasticPremium sku. + * + * @param elasticScaleEnabled the elasticScaleEnabled value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withElasticScaleEnabled(Boolean elasticScaleEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withElasticScaleEnabled(elasticScaleEnabled); + return this; + } + + /** + * Get the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @return the maximumElasticWorkerCount value. + */ + public Integer maximumElasticWorkerCount() { + return this.innerProperties() == null ? null : this.innerProperties().maximumElasticWorkerCount(); + } + + /** + * Set the maximumElasticWorkerCount property: Maximum number of total workers allowed for this ElasticScaleEnabled + * App Service Plan. + * + * @param maximumElasticWorkerCount the maximumElasticWorkerCount value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withMaximumElasticWorkerCount(Integer maximumElasticWorkerCount) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withMaximumElasticWorkerCount(maximumElasticWorkerCount); + return this; + } + + /** + * Get the numberOfSites property: Number of apps assigned to this App Service plan. + * + * @return the numberOfSites value. + */ + public Integer numberOfSites() { + return this.innerProperties() == null ? null : this.innerProperties().numberOfSites(); + } + + /** + * Get the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @return the isSpot value. + */ + public Boolean isSpot() { + return this.innerProperties() == null ? null : this.innerProperties().isSpot(); + } + + /** + * Set the isSpot property: If <code>true</code>, this App Service Plan owns spot instances. + * + * @param isSpot the isSpot value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withIsSpot(Boolean isSpot) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withIsSpot(isSpot); + return this; + } + + /** + * Get the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @return the spotExpirationTime value. + */ + public OffsetDateTime spotExpirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().spotExpirationTime(); + } + + /** + * Set the spotExpirationTime property: The time when the server farm expires. Valid only if it is a spot server + * farm. + * + * @param spotExpirationTime the spotExpirationTime value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withSpotExpirationTime(OffsetDateTime spotExpirationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withSpotExpirationTime(spotExpirationTime); + return this; + } + + /** + * Get the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @return the freeOfferExpirationTime value. + */ + public OffsetDateTime freeOfferExpirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().freeOfferExpirationTime(); + } + + /** + * Set the freeOfferExpirationTime property: The time when the server farm free offer expires. + * + * @param freeOfferExpirationTime the freeOfferExpirationTime value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withFreeOfferExpirationTime(OffsetDateTime freeOfferExpirationTime) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withFreeOfferExpirationTime(freeOfferExpirationTime); + return this; + } + + /** + * Get the resourceGroup property: Resource group of the App Service plan. + * + * @return the resourceGroup value. + */ + public String resourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().resourceGroup(); + } + + /** + * Get the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the reserved value. + */ + public Boolean reserved() { + return this.innerProperties() == null ? null : this.innerProperties().reserved(); + } + + /** + * Set the reserved property: If Linux app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param reserved the reserved value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withReserved(Boolean reserved) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withReserved(reserved); + return this; + } + + /** + * Get the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.innerProperties() == null ? null : this.innerProperties().isXenon(); + } + + /** + * Set the isXenon property: Obsolete: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param isXenon the isXenon value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withIsXenon(Boolean isXenon) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withIsXenon(isXenon); + return this; + } + + /** + * Get the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @return the hyperV value. + */ + public Boolean hyperV() { + return this.innerProperties() == null ? null : this.innerProperties().hyperV(); + } + + /** + * Set the hyperV property: If Hyper-V container app service plan <code>true</code>, + * <code>false</code> otherwise. + * + * @param hyperV the hyperV value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withHyperV(Boolean hyperV) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withHyperV(hyperV); + return this; + } + + /** + * Get the targetWorkerCount property: Scaling worker count. + * + * @return the targetWorkerCount value. + */ + public Integer targetWorkerCount() { + return this.innerProperties() == null ? null : this.innerProperties().targetWorkerCount(); + } + + /** + * Set the targetWorkerCount property: Scaling worker count. + * + * @param targetWorkerCount the targetWorkerCount value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withTargetWorkerCount(Integer targetWorkerCount) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withTargetWorkerCount(targetWorkerCount); + return this; + } + + /** + * Get the targetWorkerSizeId property: Scaling worker size ID. + * + * @return the targetWorkerSizeId value. + */ + public Integer targetWorkerSizeId() { + return this.innerProperties() == null ? null : this.innerProperties().targetWorkerSizeId(); + } + + /** + * Set the targetWorkerSizeId property: Scaling worker size ID. + * + * @param targetWorkerSizeId the targetWorkerSizeId value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withTargetWorkerSizeId(Integer targetWorkerSizeId) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withTargetWorkerSizeId(targetWorkerSizeId); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the App Service Plan. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @return the kubeEnvironmentProfile value. + */ + public KubeEnvironmentProfile kubeEnvironmentProfile() { + return this.innerProperties() == null ? null : this.innerProperties().kubeEnvironmentProfile(); + } + + /** + * Set the kubeEnvironmentProfile property: Specification for the Kubernetes Environment to use for the App Service + * plan. + * + * @param kubeEnvironmentProfile the kubeEnvironmentProfile value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withKubeEnvironmentProfile(KubeEnvironmentProfile kubeEnvironmentProfile) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withKubeEnvironmentProfile(kubeEnvironmentProfile); + return this; + } + + /** + * Get the zoneRedundant property: If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform availability zone + * balancing. + * + * @return the zoneRedundant value. + */ + public Boolean zoneRedundant() { + return this.innerProperties() == null ? null : this.innerProperties().zoneRedundant(); + } + + /** + * Set the zoneRedundant property: If <code>true</code>, this App Service Plan will perform availability + * zone balancing. If <code>false</code>, this App Service Plan will not perform availability zone + * balancing. + * + * @param zoneRedundant the zoneRedundant value to set. + * @return the AppServicePlanPatchResource object itself. + */ + public AppServicePlanPatchResource withZoneRedundant(Boolean zoneRedundant) { + if (this.innerProperties() == null) { + this.innerProperties = new AppServicePlanPatchResourceProperties(); + } + this.innerProperties().withZoneRedundant(zoneRedundant); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanRestrictions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanRestrictions.java new file mode 100644 index 0000000000000..873981d6edd47 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlanRestrictions.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for AppServicePlanRestrictions. */ +public enum AppServicePlanRestrictions { + /** Enum value None. */ + NONE("None"), + + /** Enum value Free. */ + FREE("Free"), + + /** Enum value Shared. */ + SHARED("Shared"), + + /** Enum value Basic. */ + BASIC("Basic"), + + /** Enum value Standard. */ + STANDARD("Standard"), + + /** Enum value Premium. */ + PREMIUM("Premium"); + + /** The actual serialized value for a AppServicePlanRestrictions instance. */ + private final String value; + + AppServicePlanRestrictions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AppServicePlanRestrictions instance. + * + * @param value the serialized value to parse. + * @return the parsed AppServicePlanRestrictions object, or null if unable to parse. + */ + @JsonCreator + public static AppServicePlanRestrictions fromString(String value) { + AppServicePlanRestrictions[] items = AppServicePlanRestrictions.values(); + for (AppServicePlanRestrictions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlans.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlans.java new file mode 100644 index 0000000000000..ff8a9929171e1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppServicePlans.java @@ -0,0 +1,778 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.VnetGatewayInner; +import java.util.List; + +/** Resource collection API of AppServicePlans. */ +public interface AppServicePlans { + /** + * Description for Get all App Service plans for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + PagedIterable list(); + + /** + * Description for Get all App Service plans for a subscription. + * + * @param detailed Specify <code>true</code> to return all App Service plan properties. The default is + * <code>false</code>, which returns a subset of the properties. Retrieval of all properties may + * increase the API latency. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + PagedIterable list(Boolean detailed, Context context); + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all App Service plans in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service plans. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @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 app Service plan. + */ + AppServicePlan getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Get an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @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 app Service plan. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + List listCapabilities(String resourceGroupName, String name); + + /** + * Description for List all capabilities of an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Capability. + */ + Response> listCapabilitiesWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + HybridConnection getHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Retrieve a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + Response getHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Delete a Hybrid Connection in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Service Bus namespace. + * @param relayName Name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + HybridConnectionKey listHybridConnectionKeys( + String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Get the send key name and value of a Hybrid Connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName The name of the Service Bus namespace. + * @param relayName The name of the Service Bus relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection key contract. + */ + Response listHybridConnectionKeysWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resources. + */ + PagedIterable listWebAppsByHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Get all apps that use a Hybrid Connection in an App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param namespaceName Name of the Hybrid Connection namespace. + * @param relayName Name of the Hybrid Connection relay. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resources. + */ + PagedIterable listWebAppsByHybridConnection( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + HybridConnectionLimits getHybridConnectionPlanLimit(String resourceGroupName, String name); + + /** + * Description for Get the maximum number of Hybrid Connections allowed in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection limits contract. + */ + Response getHybridConnectionPlanLimitWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + PagedIterable listHybridConnections(String resourceGroupName, String name); + + /** + * Description for Retrieve all Hybrid Connections in use in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + PagedIterable listHybridConnections(String resourceGroupName, String name, Context context); + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restartWebApps(String resourceGroupName, String name); + + /** + * Description for Restart all apps in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param softRestart Specify <code>true</code> to perform a soft restart, applies the configuration + * settings and restarts the apps if necessary. The default is <code>false</code>, which always + * restarts and reprovisions the apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response restartWebAppsWithResponse( + String resourceGroupName, String name, Boolean softRestart, Context context); + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable listWebApps(String resourceGroupName, String name); + + /** + * Description for Get all apps associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param skipToken Skip to a web app in the list of webapps associated with app service plan. If specified, the + * resulting list will contain web apps starting from (including) the skipToken. Otherwise, the resulting list + * contains web apps from the start of the list. + * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running. + * @param top List page size. If specified, results are paged. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable listWebApps( + String resourceGroupName, String name, String skipToken, String filter, String top, Context context); + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object getServerFarmSkus(String resourceGroupName, String name); + + /** + * Description for Gets all selectable SKUs for a given App Service Plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Response getServerFarmSkusWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + PagedIterable listUsages(String resourceGroupName, String name); + + /** + * Description for Gets server farm usage information. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of App Service Plan. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2'). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + PagedIterable listUsages(String resourceGroupName, String name, String filter, Context context); + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + List listVnets(String resourceGroupName, String name); + + /** + * Description for Get all Virtual Networks associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + Response> listVnetsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @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 virtual Network information ARM resource. + */ + VnetInfoResource getVnetFromServerFarm(String resourceGroupName, String name, String vnetName); + + /** + * Description for Get a Virtual Network associated with an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @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 virtual Network information ARM resource. + */ + Response getVnetFromServerFarmWithResponse( + String resourceGroupName, String name, String vnetName, Context context); + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + VnetGateway getVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName); + + /** + * Description for Get a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + Response getVnetGatewayWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context); + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + VnetGateway updateVnetGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope); + + /** + * Description for Update a Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Only the 'primary' gateway is supported. + * @param connectionEnvelope Definition of the gateway. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + Response updateVnetGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context); + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + List listRoutesForVnet(String resourceGroupName, String name, String vnetName); + + /** + * Description for Get all routes that are associated with a Virtual Network in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetRoute. + */ + Response> listRoutesForVnetWithResponse( + String resourceGroupName, String name, String vnetName, Context context); + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @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 array of VnetRoute. + */ + List getRouteForVnet(String resourceGroupName, String name, String vnetName, String routeName); + + /** + * Description for Get a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @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 array of VnetRoute. + */ + Response> getRouteForVnetWithResponse( + String resourceGroupName, String name, String vnetName, String routeName, Context context); + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName); + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @param routeName Name of the Virtual Network route. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteVnetRouteWithResponse( + String resourceGroupName, String name, String vnetName, String routeName, Context context); + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 rebootWorker(String resourceGroupName, String name, String workerName); + + /** + * Description for Reboot a worker machine in an App Service plan. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param workerName Name of worker machine, which typically starts with RD. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response rebootWorkerWithResponse(String resourceGroupName, String name, String workerName, Context context); + + /** + * Description for Get an App Service plan. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + AppServicePlan getById(String id); + + /** + * Description for Get an App Service plan. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return app Service plan. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Delete an App Service plan. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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); + + /** + * Description for Delete an App Service plan. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVnetRouteById(String id); + + /** + * Description for Delete a Virtual Network route in an App Service plan. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteVnetRouteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AppServicePlan resource. + * + * @param name resource name. + * @return the first stage of the new AppServicePlan definition. + */ + AppServicePlan.DefinitionStages.Blank define(String name); + + /** + * Begins definition for a new VnetRoute resource. + * + * @param name resource name. + * @return the first stage of the new VnetRoute definition. + */ + VnetRoute.DefinitionStages.Blank defineVnetRoute(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Apple.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Apple.java new file mode 100644 index 0000000000000..d3d456eb4ff1f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Apple.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the Apple provider. */ +@Fluent +public final class Apple { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Apple.class); + + /* + * false if the Apple provider should not be enabled despite + * the set registration; otherwise, true. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The configuration settings of the Apple registration. + */ + @JsonProperty(value = "registration") + private AppleRegistration registration; + + /* + * The configuration settings of the login flow. + */ + @JsonProperty(value = "login") + private LoginScopes login; + + /** + * Get the enabled property: <code>false</code> if the Apple provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the Apple provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the Apple object itself. + */ + public Apple withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the Apple registration. + * + * @return the registration value. + */ + public AppleRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the Apple registration. + * + * @param registration the registration value to set. + * @return the Apple object itself. + */ + public Apple withRegistration(AppleRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Get the login property: The configuration settings of the login flow. + * + * @return the login value. + */ + public LoginScopes login() { + return this.login; + } + + /** + * Set the login property: The configuration settings of the login flow. + * + * @param login the login value to set. + * @return the Apple object itself. + */ + public Apple withLogin(LoginScopes login) { + this.login = login; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + if (login() != null) { + login().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppleRegistration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppleRegistration.java new file mode 100644 index 0000000000000..0b2d84c5ee960 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AppleRegistration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the registration for the Apple provider. */ +@Fluent +public final class AppleRegistration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AppleRegistration.class); + + /* + * The Client ID of the app used for login. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The app setting name that contains the client secret. + */ + @JsonProperty(value = "clientSecretSettingName") + private String clientSecretSettingName; + + /** + * Get the clientId property: The Client ID of the app used for login. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The Client ID of the app used for login. + * + * @param clientId the clientId value to set. + * @return the AppleRegistration object itself. + */ + public AppleRegistration withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecretSettingName property: The app setting name that contains the client secret. + * + * @return the clientSecretSettingName value. + */ + public String clientSecretSettingName() { + return this.clientSecretSettingName; + } + + /** + * Set the clientSecretSettingName property: The app setting name that contains the client secret. + * + * @param clientSecretSettingName the clientSecretSettingName value to set. + * @return the AppleRegistration object itself. + */ + public AppleRegistration withClientSecretSettingName(String clientSecretSettingName) { + this.clientSecretSettingName = clientSecretSettingName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationLogsConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationLogsConfig.java new file mode 100644 index 0000000000000..6cd9c48fd1163 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationLogsConfig.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Application logs configuration. */ +@Fluent +public final class ApplicationLogsConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationLogsConfig.class); + + /* + * Application logs to file system configuration. + */ + @JsonProperty(value = "fileSystem") + private FileSystemApplicationLogsConfig fileSystem; + + /* + * Application logs to azure table storage configuration. + */ + @JsonProperty(value = "azureTableStorage") + private AzureTableStorageApplicationLogsConfig azureTableStorage; + + /* + * Application logs to blob storage configuration. + */ + @JsonProperty(value = "azureBlobStorage") + private AzureBlobStorageApplicationLogsConfig azureBlobStorage; + + /** + * Get the fileSystem property: Application logs to file system configuration. + * + * @return the fileSystem value. + */ + public FileSystemApplicationLogsConfig fileSystem() { + return this.fileSystem; + } + + /** + * Set the fileSystem property: Application logs to file system configuration. + * + * @param fileSystem the fileSystem value to set. + * @return the ApplicationLogsConfig object itself. + */ + public ApplicationLogsConfig withFileSystem(FileSystemApplicationLogsConfig fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Get the azureTableStorage property: Application logs to azure table storage configuration. + * + * @return the azureTableStorage value. + */ + public AzureTableStorageApplicationLogsConfig azureTableStorage() { + return this.azureTableStorage; + } + + /** + * Set the azureTableStorage property: Application logs to azure table storage configuration. + * + * @param azureTableStorage the azureTableStorage value to set. + * @return the ApplicationLogsConfig object itself. + */ + public ApplicationLogsConfig withAzureTableStorage(AzureTableStorageApplicationLogsConfig azureTableStorage) { + this.azureTableStorage = azureTableStorage; + return this; + } + + /** + * Get the azureBlobStorage property: Application logs to blob storage configuration. + * + * @return the azureBlobStorage value. + */ + public AzureBlobStorageApplicationLogsConfig azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set the azureBlobStorage property: Application logs to blob storage configuration. + * + * @param azureBlobStorage the azureBlobStorage value to set. + * @return the ApplicationLogsConfig object itself. + */ + public ApplicationLogsConfig withAzureBlobStorage(AzureBlobStorageApplicationLogsConfig azureBlobStorage) { + this.azureBlobStorage = azureBlobStorage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fileSystem() != null) { + fileSystem().validate(); + } + if (azureTableStorage() != null) { + azureTableStorage().validate(); + } + if (azureBlobStorage() != null) { + azureBlobStorage().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationStackCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationStackCollection.java new file mode 100644 index 0000000000000..c2a0c57f708d2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationStackCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApplicationStackResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Application Stacks. */ +@Fluent +public final class ApplicationStackCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ApplicationStackCollection.class); + + /* + * 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; + + /** + * 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 ApplicationStackCollection object itself. + */ + public ApplicationStackCollection 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 ApplicationStackCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationStackResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationStackResource.java new file mode 100644 index 0000000000000..0ae651a1073a4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ApplicationStackResource.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ApplicationStack; +import com.azure.resourcemanager.appservice.generated.fluent.models.ApplicationStackResourceInner; +import java.util.List; + +/** An immutable client-side representation of ApplicationStackResource. */ +public interface ApplicationStackResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the namePropertiesName property: Application stack name. + * + * @return the namePropertiesName value. + */ + String namePropertiesName(); + + /** + * Gets the display property: Application stack display name. + * + * @return the display value. + */ + String display(); + + /** + * Gets the dependency property: Application stack dependency. + * + * @return the dependency value. + */ + String dependency(); + + /** + * Gets the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + List majorVersions(); + + /** + * Gets the frameworks property: List of frameworks associated with application stack. + * + * @return the frameworks value. + */ + List frameworks(); + + /** + * Gets the isDeprecated property: <code>true</code> if this is the stack is deprecated; otherwise, + * <code>false</code>. + * + * @return the isDeprecated value. + */ + List isDeprecated(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ApplicationStackResourceInner object. + * + * @return the inner object. + */ + ApplicationStackResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArcConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArcConfiguration.java new file mode 100644 index 0000000000000..66a5dba6c58a4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArcConfiguration.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ArcConfiguration model. */ +@Fluent +public final class ArcConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArcConfiguration.class); + + /* + * The artifactsStorageType property. + */ + @JsonProperty(value = "artifactsStorageType") + private StorageType artifactsStorageType; + + /* + * The artifactStorageClassName property. + */ + @JsonProperty(value = "artifactStorageClassName") + private String artifactStorageClassName; + + /* + * The artifactStorageMountPath property. + */ + @JsonProperty(value = "artifactStorageMountPath") + private String artifactStorageMountPath; + + /* + * The artifactStorageNodeName property. + */ + @JsonProperty(value = "artifactStorageNodeName") + private String artifactStorageNodeName; + + /* + * The artifactStorageAccessMode property. + */ + @JsonProperty(value = "artifactStorageAccessMode") + private String artifactStorageAccessMode; + + /* + * The frontEndServiceConfiguration property. + */ + @JsonProperty(value = "frontEndServiceConfiguration") + private FrontEndConfiguration frontEndServiceConfiguration; + + /* + * The kubeConfig property. + */ + @JsonProperty(value = "kubeConfig") + private String kubeConfig; + + /** + * Get the artifactsStorageType property: The artifactsStorageType property. + * + * @return the artifactsStorageType value. + */ + public StorageType artifactsStorageType() { + return this.artifactsStorageType; + } + + /** + * Set the artifactsStorageType property: The artifactsStorageType property. + * + * @param artifactsStorageType the artifactsStorageType value to set. + * @return the ArcConfiguration object itself. + */ + public ArcConfiguration withArtifactsStorageType(StorageType artifactsStorageType) { + this.artifactsStorageType = artifactsStorageType; + return this; + } + + /** + * Get the artifactStorageClassName property: The artifactStorageClassName property. + * + * @return the artifactStorageClassName value. + */ + public String artifactStorageClassName() { + return this.artifactStorageClassName; + } + + /** + * Set the artifactStorageClassName property: The artifactStorageClassName property. + * + * @param artifactStorageClassName the artifactStorageClassName value to set. + * @return the ArcConfiguration object itself. + */ + public ArcConfiguration withArtifactStorageClassName(String artifactStorageClassName) { + this.artifactStorageClassName = artifactStorageClassName; + return this; + } + + /** + * Get the artifactStorageMountPath property: The artifactStorageMountPath property. + * + * @return the artifactStorageMountPath value. + */ + public String artifactStorageMountPath() { + return this.artifactStorageMountPath; + } + + /** + * Set the artifactStorageMountPath property: The artifactStorageMountPath property. + * + * @param artifactStorageMountPath the artifactStorageMountPath value to set. + * @return the ArcConfiguration object itself. + */ + public ArcConfiguration withArtifactStorageMountPath(String artifactStorageMountPath) { + this.artifactStorageMountPath = artifactStorageMountPath; + return this; + } + + /** + * Get the artifactStorageNodeName property: The artifactStorageNodeName property. + * + * @return the artifactStorageNodeName value. + */ + public String artifactStorageNodeName() { + return this.artifactStorageNodeName; + } + + /** + * Set the artifactStorageNodeName property: The artifactStorageNodeName property. + * + * @param artifactStorageNodeName the artifactStorageNodeName value to set. + * @return the ArcConfiguration object itself. + */ + public ArcConfiguration withArtifactStorageNodeName(String artifactStorageNodeName) { + this.artifactStorageNodeName = artifactStorageNodeName; + return this; + } + + /** + * Get the artifactStorageAccessMode property: The artifactStorageAccessMode property. + * + * @return the artifactStorageAccessMode value. + */ + public String artifactStorageAccessMode() { + return this.artifactStorageAccessMode; + } + + /** + * Set the artifactStorageAccessMode property: The artifactStorageAccessMode property. + * + * @param artifactStorageAccessMode the artifactStorageAccessMode value to set. + * @return the ArcConfiguration object itself. + */ + public ArcConfiguration withArtifactStorageAccessMode(String artifactStorageAccessMode) { + this.artifactStorageAccessMode = artifactStorageAccessMode; + return this; + } + + /** + * Get the frontEndServiceConfiguration property: The frontEndServiceConfiguration property. + * + * @return the frontEndServiceConfiguration value. + */ + public FrontEndConfiguration frontEndServiceConfiguration() { + return this.frontEndServiceConfiguration; + } + + /** + * Set the frontEndServiceConfiguration property: The frontEndServiceConfiguration property. + * + * @param frontEndServiceConfiguration the frontEndServiceConfiguration value to set. + * @return the ArcConfiguration object itself. + */ + public ArcConfiguration withFrontEndServiceConfiguration(FrontEndConfiguration frontEndServiceConfiguration) { + this.frontEndServiceConfiguration = frontEndServiceConfiguration; + return this; + } + + /** + * Get the kubeConfig property: The kubeConfig property. + * + * @return the kubeConfig value. + */ + public String kubeConfig() { + return this.kubeConfig; + } + + /** + * Set the kubeConfig property: The kubeConfig property. + * + * @param kubeConfig the kubeConfig value to set. + * @return the ArcConfiguration object itself. + */ + public ArcConfiguration withKubeConfig(String kubeConfig) { + this.kubeConfig = kubeConfig; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (frontEndServiceConfiguration() != null) { + frontEndServiceConfiguration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArmIdWrapper.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArmIdWrapper.java new file mode 100644 index 0000000000000..e45b7888ab8a9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArmIdWrapper.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A wrapper for an ARM resource id. */ +@Immutable +public final class ArmIdWrapper { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmIdWrapper.class); + + /* + * The id property. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArmPlan.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArmPlan.java new file mode 100644 index 0000000000000..7d9242ccfb115 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ArmPlan.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The plan object in Azure Resource Manager, represents a marketplace plan. */ +@Fluent +public final class ArmPlan { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ArmPlan.class); + + /* + * The name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The publisher. + */ + @JsonProperty(value = "publisher") + private String publisher; + + /* + * The product. + */ + @JsonProperty(value = "product") + private String product; + + /* + * The promotion code. + */ + @JsonProperty(value = "promotionCode") + private String promotionCode; + + /* + * Version of product. + */ + @JsonProperty(value = "version") + private String version; + + /** + * Get the name property: The name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name. + * + * @param name the name value to set. + * @return the ArmPlan object itself. + */ + public ArmPlan withName(String name) { + this.name = name; + return this; + } + + /** + * Get the publisher property: The publisher. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The publisher. + * + * @param publisher the publisher value to set. + * @return the ArmPlan object itself. + */ + public ArmPlan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the product property: The product. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: The product. + * + * @param product the product value to set. + * @return the ArmPlan object itself. + */ + public ArmPlan withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the promotionCode property: The promotion code. + * + * @return the promotionCode value. + */ + public String promotionCode() { + return this.promotionCode; + } + + /** + * Set the promotionCode property: The promotion code. + * + * @param promotionCode the promotionCode value to set. + * @return the ArmPlan object itself. + */ + public ArmPlan withPromotionCode(String promotionCode) { + this.promotionCode = promotionCode; + return this; + } + + /** + * Get the version property: Version of product. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of product. + * + * @param version the version value to set. + * @return the ArmPlan object itself. + */ + public ArmPlan withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AseV3NetworkingConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AseV3NetworkingConfiguration.java new file mode 100644 index 0000000000000..145ae0d156c9d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AseV3NetworkingConfiguration.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AseV3NetworkingConfigurationInner; +import java.util.List; + +/** An immutable client-side representation of AseV3NetworkingConfiguration. */ +public interface AseV3NetworkingConfiguration { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the windowsOutboundIpAddresses property: The windowsOutboundIpAddresses property. + * + * @return the windowsOutboundIpAddresses value. + */ + List windowsOutboundIpAddresses(); + + /** + * Gets the linuxOutboundIpAddresses property: The linuxOutboundIpAddresses property. + * + * @return the linuxOutboundIpAddresses value. + */ + List linuxOutboundIpAddresses(); + + /** + * Gets the externalInboundIpAddresses property: The externalInboundIpAddresses property. + * + * @return the externalInboundIpAddresses value. + */ + List externalInboundIpAddresses(); + + /** + * Gets the internalInboundIpAddresses property: The internalInboundIpAddresses property. + * + * @return the internalInboundIpAddresses value. + */ + List internalInboundIpAddresses(); + + /** + * Gets the allowNewPrivateEndpointConnections property: Property to enable and disable new private endpoint + * connection creation on ASE. + * + * @return the allowNewPrivateEndpointConnections value. + */ + Boolean allowNewPrivateEndpointConnections(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.AseV3NetworkingConfigurationInner + * object. + * + * @return the inner object. + */ + AseV3NetworkingConfigurationInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AuthPlatform.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AuthPlatform.java new file mode 100644 index 0000000000000..62772f10013ed --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AuthPlatform.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the platform of App Service Authentication/Authorization. */ +@Fluent +public final class AuthPlatform { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AuthPlatform.class); + + /* + * 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. + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /* + * The path of the config file containing auth settings if they come from a + * file. + * If the path is relative, base will the site's root directory. + */ + @JsonProperty(value = "configFilePath") + private String configFilePath; + + /** + * Get the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled + * for the current app; otherwise, <code>false</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled + * for the current app; otherwise, <code>false</code>. + * + * @param enabled the enabled value to set. + * @return the AuthPlatform object itself. + */ + public AuthPlatform withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of certain features in the Authentication / + * Authorization module. + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of certain features in the Authentication / + * Authorization module. + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the AuthPlatform object itself. + */ + public AuthPlatform withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the configFilePath property: The path of the config file containing auth settings if they come from a file. + * If the path is relative, base will the site's root directory. + * + * @return the configFilePath value. + */ + public String configFilePath() { + return this.configFilePath; + } + + /** + * Set the configFilePath property: The path of the config file containing auth settings if they come from a file. + * If the path is relative, base will the site's root directory. + * + * @param configFilePath the configFilePath value to set. + * @return the AuthPlatform object itself. + */ + public AuthPlatform withConfigFilePath(String configFilePath) { + this.configFilePath = configFilePath; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealActionType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealActionType.java new file mode 100644 index 0000000000000..18a4897fa903f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealActionType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for AutoHealActionType. */ +public enum AutoHealActionType { + /** Enum value Recycle. */ + RECYCLE("Recycle"), + + /** Enum value LogEvent. */ + LOG_EVENT("LogEvent"), + + /** Enum value CustomAction. */ + CUSTOM_ACTION("CustomAction"); + + /** The actual serialized value for a AutoHealActionType instance. */ + private final String value; + + AutoHealActionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AutoHealActionType instance. + * + * @param value the serialized value to parse. + * @return the parsed AutoHealActionType object, or null if unable to parse. + */ + @JsonCreator + public static AutoHealActionType fromString(String value) { + AutoHealActionType[] items = AutoHealActionType.values(); + for (AutoHealActionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealActions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealActions.java new file mode 100644 index 0000000000000..207ceb354c21d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealActions.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Actions which to take by the auto-heal module when a rule is triggered. */ +@Fluent +public final class AutoHealActions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoHealActions.class); + + /* + * Predefined action to be taken. + */ + @JsonProperty(value = "actionType") + private AutoHealActionType actionType; + + /* + * Custom action to be taken. + */ + @JsonProperty(value = "customAction") + private AutoHealCustomAction customAction; + + /* + * Minimum time the process must execute + * before taking the action + */ + @JsonProperty(value = "minProcessExecutionTime") + private String minProcessExecutionTime; + + /** + * Get the actionType property: Predefined action to be taken. + * + * @return the actionType value. + */ + public AutoHealActionType actionType() { + return this.actionType; + } + + /** + * Set the actionType property: Predefined action to be taken. + * + * @param actionType the actionType value to set. + * @return the AutoHealActions object itself. + */ + public AutoHealActions withActionType(AutoHealActionType actionType) { + this.actionType = actionType; + return this; + } + + /** + * Get the customAction property: Custom action to be taken. + * + * @return the customAction value. + */ + public AutoHealCustomAction customAction() { + return this.customAction; + } + + /** + * Set the customAction property: Custom action to be taken. + * + * @param customAction the customAction value to set. + * @return the AutoHealActions object itself. + */ + public AutoHealActions withCustomAction(AutoHealCustomAction customAction) { + this.customAction = customAction; + return this; + } + + /** + * Get the minProcessExecutionTime property: Minimum time the process must execute before taking the action. + * + * @return the minProcessExecutionTime value. + */ + public String minProcessExecutionTime() { + return this.minProcessExecutionTime; + } + + /** + * Set the minProcessExecutionTime property: Minimum time the process must execute before taking the action. + * + * @param minProcessExecutionTime the minProcessExecutionTime value to set. + * @return the AutoHealActions object itself. + */ + public AutoHealActions withMinProcessExecutionTime(String minProcessExecutionTime) { + this.minProcessExecutionTime = minProcessExecutionTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (customAction() != null) { + customAction().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealCustomAction.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealCustomAction.java new file mode 100644 index 0000000000000..acfb5ee70cb29 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealCustomAction.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Custom action to be executed when an auto heal rule is triggered. */ +@Fluent +public final class AutoHealCustomAction { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoHealCustomAction.class); + + /* + * Executable to be run. + */ + @JsonProperty(value = "exe") + private String exe; + + /* + * Parameters for the executable. + */ + @JsonProperty(value = "parameters") + private String parameters; + + /** + * Get the exe property: Executable to be run. + * + * @return the exe value. + */ + public String exe() { + return this.exe; + } + + /** + * Set the exe property: Executable to be run. + * + * @param exe the exe value to set. + * @return the AutoHealCustomAction object itself. + */ + public AutoHealCustomAction withExe(String exe) { + this.exe = exe; + return this; + } + + /** + * Get the parameters property: Parameters for the executable. + * + * @return the parameters value. + */ + public String parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Parameters for the executable. + * + * @param parameters the parameters value to set. + * @return the AutoHealCustomAction object itself. + */ + public AutoHealCustomAction withParameters(String parameters) { + this.parameters = parameters; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealRules.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealRules.java new file mode 100644 index 0000000000000..8ab4b34364a39 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealRules.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Rules that can be defined for auto-heal. */ +@Fluent +public final class AutoHealRules { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoHealRules.class); + + /* + * Conditions that describe when to execute the auto-heal actions. + */ + @JsonProperty(value = "triggers") + private AutoHealTriggers triggers; + + /* + * Actions to be executed when a rule is triggered. + */ + @JsonProperty(value = "actions") + private AutoHealActions actions; + + /** + * Get the triggers property: Conditions that describe when to execute the auto-heal actions. + * + * @return the triggers value. + */ + public AutoHealTriggers triggers() { + return this.triggers; + } + + /** + * Set the triggers property: Conditions that describe when to execute the auto-heal actions. + * + * @param triggers the triggers value to set. + * @return the AutoHealRules object itself. + */ + public AutoHealRules withTriggers(AutoHealTriggers triggers) { + this.triggers = triggers; + return this; + } + + /** + * Get the actions property: Actions to be executed when a rule is triggered. + * + * @return the actions value. + */ + public AutoHealActions actions() { + return this.actions; + } + + /** + * Set the actions property: Actions to be executed when a rule is triggered. + * + * @param actions the actions value to set. + * @return the AutoHealRules object itself. + */ + public AutoHealRules withActions(AutoHealActions actions) { + this.actions = actions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (triggers() != null) { + triggers().validate(); + } + if (actions() != null) { + actions().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealTriggers.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealTriggers.java new file mode 100644 index 0000000000000..b559893558284 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AutoHealTriggers.java @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Triggers for auto-heal. */ +@Fluent +public final class AutoHealTriggers { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AutoHealTriggers.class); + + /* + * A rule based on total requests. + */ + @JsonProperty(value = "requests") + private RequestsBasedTrigger requests; + + /* + * A rule based on private bytes. + */ + @JsonProperty(value = "privateBytesInKB") + private Integer privateBytesInKB; + + /* + * A rule based on status codes. + */ + @JsonProperty(value = "statusCodes") + private List statusCodes; + + /* + * A rule based on request execution time. + */ + @JsonProperty(value = "slowRequests") + private SlowRequestsBasedTrigger slowRequests; + + /* + * A rule based on multiple Slow Requests Rule with path + */ + @JsonProperty(value = "slowRequestsWithPath") + private List slowRequestsWithPath; + + /* + * A rule based on status codes ranges. + */ + @JsonProperty(value = "statusCodesRange") + private List statusCodesRange; + + /** + * Get the requests property: A rule based on total requests. + * + * @return the requests value. + */ + public RequestsBasedTrigger requests() { + return this.requests; + } + + /** + * Set the requests property: A rule based on total requests. + * + * @param requests the requests value to set. + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withRequests(RequestsBasedTrigger requests) { + this.requests = requests; + return this; + } + + /** + * Get the privateBytesInKB property: A rule based on private bytes. + * + * @return the privateBytesInKB value. + */ + public Integer privateBytesInKB() { + return this.privateBytesInKB; + } + + /** + * Set the privateBytesInKB property: A rule based on private bytes. + * + * @param privateBytesInKB the privateBytesInKB value to set. + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withPrivateBytesInKB(Integer privateBytesInKB) { + this.privateBytesInKB = privateBytesInKB; + return this; + } + + /** + * Get the statusCodes property: A rule based on status codes. + * + * @return the statusCodes value. + */ + public List statusCodes() { + return this.statusCodes; + } + + /** + * Set the statusCodes property: A rule based on status codes. + * + * @param statusCodes the statusCodes value to set. + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withStatusCodes(List statusCodes) { + this.statusCodes = statusCodes; + return this; + } + + /** + * Get the slowRequests property: A rule based on request execution time. + * + * @return the slowRequests value. + */ + public SlowRequestsBasedTrigger slowRequests() { + return this.slowRequests; + } + + /** + * Set the slowRequests property: A rule based on request execution time. + * + * @param slowRequests the slowRequests value to set. + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withSlowRequests(SlowRequestsBasedTrigger slowRequests) { + this.slowRequests = slowRequests; + return this; + } + + /** + * Get the slowRequestsWithPath property: A rule based on multiple Slow Requests Rule with path. + * + * @return the slowRequestsWithPath value. + */ + public List slowRequestsWithPath() { + return this.slowRequestsWithPath; + } + + /** + * Set the slowRequestsWithPath property: A rule based on multiple Slow Requests Rule with path. + * + * @param slowRequestsWithPath the slowRequestsWithPath value to set. + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withSlowRequestsWithPath(List slowRequestsWithPath) { + this.slowRequestsWithPath = slowRequestsWithPath; + return this; + } + + /** + * Get the statusCodesRange property: A rule based on status codes ranges. + * + * @return the statusCodesRange value. + */ + public List statusCodesRange() { + return this.statusCodesRange; + } + + /** + * Set the statusCodesRange property: A rule based on status codes ranges. + * + * @param statusCodesRange the statusCodesRange value to set. + * @return the AutoHealTriggers object itself. + */ + public AutoHealTriggers withStatusCodesRange(List statusCodesRange) { + this.statusCodesRange = statusCodesRange; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (requests() != null) { + requests().validate(); + } + if (statusCodes() != null) { + statusCodes().forEach(e -> e.validate()); + } + if (slowRequests() != null) { + slowRequests().validate(); + } + if (slowRequestsWithPath() != null) { + slowRequestsWithPath().forEach(e -> e.validate()); + } + if (statusCodesRange() != null) { + statusCodesRange().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectory.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectory.java new file mode 100644 index 0000000000000..92a14d660ded0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectory.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the Azure Active directory provider. */ +@Fluent +public final class AzureActiveDirectory { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureActiveDirectory.class); + + /* + * 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. + */ + @JsonProperty(value = "registration") + private AzureActiveDirectoryRegistration registration; + + /* + * The configuration settings of the Azure Active Directory login flow. + */ + @JsonProperty(value = "login") + private AzureActiveDirectoryLogin login; + + /* + * 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 + * read or write to this property. + */ + @JsonProperty(value = "isAutoProvisioned") + private Boolean isAutoProvisioned; + + /** + * Get the enabled property: <code>false</code> if the Azure Active Directory provider should not be + * enabled despite the set registration; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the Azure Active Directory provider should not be + * enabled despite the set registration; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the AzureActiveDirectory object itself. + */ + public AzureActiveDirectory withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the Azure Active Directory app registration. + * + * @return the registration value. + */ + public AzureActiveDirectoryRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the Azure Active Directory app registration. + * + * @param registration the registration value to set. + * @return the AzureActiveDirectory object itself. + */ + public AzureActiveDirectory withRegistration(AzureActiveDirectoryRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Get the login property: The configuration settings of the Azure Active Directory login flow. + * + * @return the login value. + */ + public AzureActiveDirectoryLogin login() { + return this.login; + } + + /** + * Set the login property: The configuration settings of the Azure Active Directory login flow. + * + * @param login the login value to set. + * @return the AzureActiveDirectory object itself. + */ + public AzureActiveDirectory withLogin(AzureActiveDirectoryLogin login) { + this.login = login; + return this; + } + + /** + * Get the validation property: The configuration settings of the Azure Active Directory token validation flow. + * + * @return the validation value. + */ + public AzureActiveDirectoryValidation validation() { + return this.validation; + } + + /** + * Set the validation property: The configuration settings of the Azure Active Directory token validation flow. + * + * @param validation the validation value to set. + * @return the AzureActiveDirectory object itself. + */ + public AzureActiveDirectory withValidation(AzureActiveDirectoryValidation validation) { + this.validation = validation; + return this; + } + + /** + * Get the isAutoProvisioned property: Gets a value indicating whether the Azure AD configuration was + * auto-provisioned using 1st party tooling. This is an internal flag primarily intended to support the Azure + * Management Portal. Users should not read or write to this property. + * + * @return the isAutoProvisioned value. + */ + public Boolean isAutoProvisioned() { + return this.isAutoProvisioned; + } + + /** + * Set the isAutoProvisioned property: Gets a value indicating whether the Azure AD configuration was + * auto-provisioned using 1st party tooling. This is an internal flag primarily intended to support the Azure + * Management Portal. Users should not read or write to this property. + * + * @param isAutoProvisioned the isAutoProvisioned value to set. + * @return the AzureActiveDirectory object itself. + */ + public AzureActiveDirectory withIsAutoProvisioned(Boolean isAutoProvisioned) { + this.isAutoProvisioned = isAutoProvisioned; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + if (login() != null) { + login().validate(); + } + if (validation() != null) { + validation().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryLogin.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryLogin.java new file mode 100644 index 0000000000000..8d408c236f358 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryLogin.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the Azure Active Directory login flow. */ +@Fluent +public final class AzureActiveDirectoryLogin { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureActiveDirectoryLogin.class); + + /* + * 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. + */ + @JsonProperty(value = "disableWWWAuthenticate") + private Boolean disableWwwAuthenticate; + + /** + * Get the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when a + * user logs in. Each parameter must be in the form "key=value". + * + * @return the loginParameters value. + */ + public List loginParameters() { + return this.loginParameters; + } + + /** + * Set the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when a + * user logs in. Each parameter must be in the form "key=value". + * + * @param loginParameters the loginParameters value to set. + * @return the AzureActiveDirectoryLogin object itself. + */ + public AzureActiveDirectoryLogin withLoginParameters(List loginParameters) { + this.loginParameters = loginParameters; + return this; + } + + /** + * Get the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should be + * omitted from the request; otherwise, <code>false</code>. + * + * @return the disableWwwAuthenticate value. + */ + public Boolean disableWwwAuthenticate() { + return this.disableWwwAuthenticate; + } + + /** + * Set the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should be + * omitted from the request; otherwise, <code>false</code>. + * + * @param disableWwwAuthenticate the disableWwwAuthenticate value to set. + * @return the AzureActiveDirectoryLogin object itself. + */ + public AzureActiveDirectoryLogin withDisableWwwAuthenticate(Boolean disableWwwAuthenticate) { + this.disableWwwAuthenticate = disableWwwAuthenticate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryRegistration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryRegistration.java new file mode 100644 index 0000000000000..12e31bc122c91 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryRegistration.java @@ -0,0 +1,229 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the Azure Active Directory app registration. */ +@Fluent +public final class AzureActiveDirectoryRegistration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureActiveDirectoryRegistration.class); + + /* + * 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 + */ + @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 + * other 3rd party OpenID Connect providers. + * 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. + */ + @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 + * 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. + */ + @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. + */ + @JsonProperty(value = "clientSecretCertificateIssuer") + private String clientSecretCertificateIssuer; + + /** + * Get the openIdIssuer property: The OpenID Connect Issuer URI that represents the entity which issues access + * tokens for this application. When using Azure Active Directory, this value is the URI of the directory tenant, + * e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. This URI is a case-sensitive identifier for the token + * issuer. More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * + * @return the openIdIssuer value. + */ + public String openIdIssuer() { + return this.openIdIssuer; + } + + /** + * Set the openIdIssuer property: The OpenID Connect Issuer URI that represents the entity which issues access + * tokens for this application. When using Azure Active Directory, this value is the URI of the directory tenant, + * e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. This URI is a case-sensitive identifier for the token + * issuer. More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * + * @param openIdIssuer the openIdIssuer value to set. + * @return the AzureActiveDirectoryRegistration object itself. + */ + public AzureActiveDirectoryRegistration withOpenIdIssuer(String openIdIssuer) { + this.openIdIssuer = openIdIssuer; + return this; + } + + /** + * Get the clientId property: The Client ID of this relying party application, known as the client_id. This setting + * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID + * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The Client ID of this relying party application, known as the client_id. This setting + * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID + * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * + * @param clientId the clientId value to set. + * @return the AzureActiveDirectoryRegistration object itself. + */ + public AzureActiveDirectoryRegistration withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecretSettingName property: The app setting name that contains the client secret of the relying + * party application. + * + * @return the clientSecretSettingName value. + */ + public String clientSecretSettingName() { + return this.clientSecretSettingName; + } + + /** + * Set the clientSecretSettingName property: The app setting name that contains the client secret of the relying + * party application. + * + * @param clientSecretSettingName the clientSecretSettingName value to set. + * @return the AzureActiveDirectoryRegistration object itself. + */ + public AzureActiveDirectoryRegistration withClientSecretSettingName(String clientSecretSettingName) { + this.clientSecretSettingName = clientSecretSettingName; + return this; + } + + /** + * Get the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint + * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also + * optional. + * + * @return the clientSecretCertificateThumbprint value. + */ + public String clientSecretCertificateThumbprint() { + return this.clientSecretCertificateThumbprint; + } + + /** + * Set the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint + * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also + * optional. + * + * @param clientSecretCertificateThumbprint the clientSecretCertificateThumbprint value to set. + * @return the AzureActiveDirectoryRegistration object itself. + */ + public AzureActiveDirectoryRegistration withClientSecretCertificateThumbprint( + String clientSecretCertificateThumbprint) { + this.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint; + return this; + } + + /** + * Get the clientSecretCertificateSubjectAlternativeName property: An alternative to the client secret thumbprint, + * that is the subject alternative name of a certificate used for signing purposes. This property acts as a + * replacement for the Client Secret Certificate Thumbprint. It is also optional. + * + * @return the clientSecretCertificateSubjectAlternativeName value. + */ + public String clientSecretCertificateSubjectAlternativeName() { + return this.clientSecretCertificateSubjectAlternativeName; + } + + /** + * Set the clientSecretCertificateSubjectAlternativeName property: An alternative to the client secret thumbprint, + * that is the subject alternative name of a certificate used for signing purposes. This property acts as a + * replacement for the Client Secret Certificate Thumbprint. It is also optional. + * + * @param clientSecretCertificateSubjectAlternativeName the clientSecretCertificateSubjectAlternativeName value to + * set. + * @return the AzureActiveDirectoryRegistration object itself. + */ + public AzureActiveDirectoryRegistration withClientSecretCertificateSubjectAlternativeName( + String clientSecretCertificateSubjectAlternativeName) { + this.clientSecretCertificateSubjectAlternativeName = clientSecretCertificateSubjectAlternativeName; + return this; + } + + /** + * Get the clientSecretCertificateIssuer property: An alternative to the client secret thumbprint, that is the + * issuer of a certificate used for signing purposes. This property acts as a replacement for the Client Secret + * Certificate Thumbprint. It is also optional. + * + * @return the clientSecretCertificateIssuer value. + */ + public String clientSecretCertificateIssuer() { + return this.clientSecretCertificateIssuer; + } + + /** + * Set the clientSecretCertificateIssuer property: An alternative to the client secret thumbprint, that is the + * issuer of a certificate used for signing purposes. This property acts as a replacement for the Client Secret + * Certificate Thumbprint. It is also optional. + * + * @param clientSecretCertificateIssuer the clientSecretCertificateIssuer value to set. + * @return the AzureActiveDirectoryRegistration object itself. + */ + public AzureActiveDirectoryRegistration withClientSecretCertificateIssuer(String clientSecretCertificateIssuer) { + this.clientSecretCertificateIssuer = clientSecretCertificateIssuer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryValidation.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryValidation.java new file mode 100644 index 0000000000000..a17da47b68865 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureActiveDirectoryValidation.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the Azure Active Directory token validation flow. */ +@Fluent +public final class AzureActiveDirectoryValidation { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureActiveDirectoryValidation.class); + + /* + * 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. + */ + @JsonProperty(value = "allowedAudiences") + private List allowedAudiences; + + /* + * The configuration settings of the default authorization policy. + */ + @JsonProperty(value = "defaultAuthorizationPolicy") + private DefaultAuthorizationPolicy defaultAuthorizationPolicy; + + /** + * Get the jwtClaimChecks property: The configuration settings of the checks that should be made while validating + * the JWT Claims. + * + * @return the jwtClaimChecks value. + */ + public JwtClaimChecks jwtClaimChecks() { + return this.jwtClaimChecks; + } + + /** + * Set the jwtClaimChecks property: The configuration settings of the checks that should be made while validating + * the JWT Claims. + * + * @param jwtClaimChecks the jwtClaimChecks value to set. + * @return the AzureActiveDirectoryValidation object itself. + */ + public AzureActiveDirectoryValidation withJwtClaimChecks(JwtClaimChecks jwtClaimChecks) { + this.jwtClaimChecks = jwtClaimChecks; + return this; + } + + /** + * Get the allowedAudiences property: The list of audiences that can make successful authentication/authorization + * requests. + * + * @return the allowedAudiences value. + */ + public List allowedAudiences() { + return this.allowedAudiences; + } + + /** + * Set the allowedAudiences property: The list of audiences that can make successful authentication/authorization + * requests. + * + * @param allowedAudiences the allowedAudiences value to set. + * @return the AzureActiveDirectoryValidation object itself. + */ + public AzureActiveDirectoryValidation withAllowedAudiences(List allowedAudiences) { + this.allowedAudiences = allowedAudiences; + return this; + } + + /** + * Get the defaultAuthorizationPolicy property: The configuration settings of the default authorization policy. + * + * @return the defaultAuthorizationPolicy value. + */ + public DefaultAuthorizationPolicy defaultAuthorizationPolicy() { + return this.defaultAuthorizationPolicy; + } + + /** + * Set the defaultAuthorizationPolicy property: The configuration settings of the default authorization policy. + * + * @param defaultAuthorizationPolicy the defaultAuthorizationPolicy value to set. + * @return the AzureActiveDirectoryValidation object itself. + */ + public AzureActiveDirectoryValidation withDefaultAuthorizationPolicy( + DefaultAuthorizationPolicy defaultAuthorizationPolicy) { + this.defaultAuthorizationPolicy = defaultAuthorizationPolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (jwtClaimChecks() != null) { + jwtClaimChecks().validate(); + } + if (defaultAuthorizationPolicy() != null) { + defaultAuthorizationPolicy().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureBlobStorageApplicationLogsConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureBlobStorageApplicationLogsConfig.java new file mode 100644 index 0000000000000..bde8174206393 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureBlobStorageApplicationLogsConfig.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Application logs azure blob storage configuration. */ +@Fluent +public final class AzureBlobStorageApplicationLogsConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBlobStorageApplicationLogsConfig.class); + + /* + * Log level. + */ + @JsonProperty(value = "level") + private LogLevel level; + + /* + * SAS url to a azure blob container with read/write/list/delete + * permissions. + */ + @JsonProperty(value = "sasUrl") + private String sasUrl; + + /* + * Retention in days. + * Remove blobs older than X days. + * 0 or lower means no retention. + */ + @JsonProperty(value = "retentionInDays") + private Integer retentionInDays; + + /** + * Get the level property: Log level. + * + * @return the level value. + */ + public LogLevel level() { + return this.level; + } + + /** + * Set the level property: Log level. + * + * @param level the level value to set. + * @return the AzureBlobStorageApplicationLogsConfig object itself. + */ + public AzureBlobStorageApplicationLogsConfig withLevel(LogLevel level) { + this.level = level; + return this; + } + + /** + * Get the sasUrl property: SAS url to a azure blob container with read/write/list/delete permissions. + * + * @return the sasUrl value. + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set the sasUrl property: SAS url to a azure blob container with read/write/list/delete permissions. + * + * @param sasUrl the sasUrl value to set. + * @return the AzureBlobStorageApplicationLogsConfig object itself. + */ + public AzureBlobStorageApplicationLogsConfig withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + + /** + * Get the retentionInDays property: Retention in days. Remove blobs older than X days. 0 or lower means no + * retention. + * + * @return the retentionInDays value. + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the retentionInDays property: Retention in days. Remove blobs older than X days. 0 or lower means no + * retention. + * + * @param retentionInDays the retentionInDays value to set. + * @return the AzureBlobStorageApplicationLogsConfig object itself. + */ + public AzureBlobStorageApplicationLogsConfig withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureBlobStorageHttpLogsConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureBlobStorageHttpLogsConfig.java new file mode 100644 index 0000000000000..8a66b129b9a89 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureBlobStorageHttpLogsConfig.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Http logs to azure blob storage configuration. */ +@Fluent +public final class AzureBlobStorageHttpLogsConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBlobStorageHttpLogsConfig.class); + + /* + * SAS url to a azure blob container with read/write/list/delete + * permissions. + */ + @JsonProperty(value = "sasUrl") + private String sasUrl; + + /* + * Retention in days. + * Remove blobs older than X days. + * 0 or lower means no retention. + */ + @JsonProperty(value = "retentionInDays") + private Integer retentionInDays; + + /* + * True if configuration is enabled, false if it is disabled and null if + * configuration is not set. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get the sasUrl property: SAS url to a azure blob container with read/write/list/delete permissions. + * + * @return the sasUrl value. + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set the sasUrl property: SAS url to a azure blob container with read/write/list/delete permissions. + * + * @param sasUrl the sasUrl value to set. + * @return the AzureBlobStorageHttpLogsConfig object itself. + */ + public AzureBlobStorageHttpLogsConfig withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + + /** + * Get the retentionInDays property: Retention in days. Remove blobs older than X days. 0 or lower means no + * retention. + * + * @return the retentionInDays value. + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the retentionInDays property: Retention in days. Remove blobs older than X days. 0 or lower means no + * retention. + * + * @param retentionInDays the retentionInDays value to set. + * @return the AzureBlobStorageHttpLogsConfig object itself. + */ + public AzureBlobStorageHttpLogsConfig withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Get the enabled property: True if configuration is enabled, false if it is disabled and null if configuration is + * not set. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: True if configuration is enabled, false if it is disabled and null if configuration is + * not set. + * + * @param enabled the enabled value to set. + * @return the AzureBlobStorageHttpLogsConfig object itself. + */ + public AzureBlobStorageHttpLogsConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureResourceType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureResourceType.java new file mode 100644 index 0000000000000..81a7f7b742601 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureResourceType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for AzureResourceType. */ +public enum AzureResourceType { + /** Enum value Website. */ + WEBSITE("Website"), + + /** Enum value TrafficManager. */ + TRAFFIC_MANAGER("TrafficManager"); + + /** The actual serialized value for a AzureResourceType instance. */ + private final String value; + + AzureResourceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AzureResourceType instance. + * + * @param value the serialized value to parse. + * @return the parsed AzureResourceType object, or null if unable to parse. + */ + @JsonCreator + public static AzureResourceType fromString(String value) { + AzureResourceType[] items = AzureResourceType.values(); + for (AzureResourceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStaticWebApps.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStaticWebApps.java new file mode 100644 index 0000000000000..567bbc9cab8b1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStaticWebApps.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the Azure Static Web Apps provider. */ +@Fluent +public final class AzureStaticWebApps { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureStaticWebApps.class); + + /* + * false if the Azure Static Web Apps provider should not be + * enabled despite the set registration; otherwise, true. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The configuration settings of the Azure Static Web Apps registration. + */ + @JsonProperty(value = "registration") + private AzureStaticWebAppsRegistration registration; + + /** + * Get the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be + * enabled despite the set registration; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be + * enabled despite the set registration; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the AzureStaticWebApps object itself. + */ + public AzureStaticWebApps withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the Azure Static Web Apps registration. + * + * @return the registration value. + */ + public AzureStaticWebAppsRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the Azure Static Web Apps registration. + * + * @param registration the registration value to set. + * @return the AzureStaticWebApps object itself. + */ + public AzureStaticWebApps withRegistration(AzureStaticWebAppsRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStaticWebAppsRegistration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStaticWebAppsRegistration.java new file mode 100644 index 0000000000000..9fc7b98dcde19 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStaticWebAppsRegistration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the registration for the Azure Static Web Apps provider. */ +@Fluent +public final class AzureStaticWebAppsRegistration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureStaticWebAppsRegistration.class); + + /* + * The Client ID of the app used for login. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /** + * Get the clientId property: The Client ID of the app used for login. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The Client ID of the app used for login. + * + * @param clientId the clientId value to set. + * @return the AzureStaticWebAppsRegistration object itself. + */ + public AzureStaticWebAppsRegistration withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageInfoValue.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageInfoValue.java new file mode 100644 index 0000000000000..18e255368b35b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageInfoValue.java @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure Files or Blob Storage access information value for dictionary storage. */ +@Fluent +public final class AzureStorageInfoValue { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureStorageInfoValue.class); + + /* + * Type of storage. + */ + @JsonProperty(value = "type") + private AzureStorageType type; + + /* + * Name of the storage account. + */ + @JsonProperty(value = "accountName") + private String accountName; + + /* + * Name of the file share (container name, for Blob storage). + */ + @JsonProperty(value = "shareName") + private String shareName; + + /* + * Access key for the storage account. + */ + @JsonProperty(value = "accessKey") + private String accessKey; + + /* + * Path to mount the storage within the site's runtime environment. + */ + @JsonProperty(value = "mountPath") + private String mountPath; + + /* + * State of the storage account. + */ + @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) + private AzureStorageState state; + + /** + * Get the type property: Type of storage. + * + * @return the type value. + */ + public AzureStorageType type() { + return this.type; + } + + /** + * Set the type property: Type of storage. + * + * @param type the type value to set. + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withType(AzureStorageType type) { + this.type = type; + return this; + } + + /** + * Get the accountName property: Name of the storage account. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: Name of the storage account. + * + * @param accountName the accountName value to set. + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + + /** + * Get the shareName property: Name of the file share (container name, for Blob storage). + * + * @return the shareName value. + */ + public String shareName() { + return this.shareName; + } + + /** + * Set the shareName property: Name of the file share (container name, for Blob storage). + * + * @param shareName the shareName value to set. + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withShareName(String shareName) { + this.shareName = shareName; + return this; + } + + /** + * Get the accessKey property: Access key for the storage account. + * + * @return the accessKey value. + */ + public String accessKey() { + return this.accessKey; + } + + /** + * Set the accessKey property: Access key for the storage account. + * + * @param accessKey the accessKey value to set. + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withAccessKey(String accessKey) { + this.accessKey = accessKey; + return this; + } + + /** + * Get the mountPath property: Path to mount the storage within the site's runtime environment. + * + * @return the mountPath value. + */ + public String mountPath() { + return this.mountPath; + } + + /** + * Set the mountPath property: Path to mount the storage within the site's runtime environment. + * + * @param mountPath the mountPath value to set. + * @return the AzureStorageInfoValue object itself. + */ + public AzureStorageInfoValue withMountPath(String mountPath) { + this.mountPath = mountPath; + return this; + } + + /** + * Get the state property: State of the storage account. + * + * @return the state value. + */ + public AzureStorageState state() { + return this.state; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStoragePropertyDictionaryResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStoragePropertyDictionaryResource.java new file mode 100644 index 0000000000000..bddb7343ac9ac --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStoragePropertyDictionaryResource.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AzureStoragePropertyDictionaryResourceInner; +import java.util.Map; + +/** An immutable client-side representation of AzureStoragePropertyDictionaryResource. */ +public interface AzureStoragePropertyDictionaryResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the properties property: Azure storage accounts. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the inner + * com.azure.resourcemanager.appservice.generated.fluent.models.AzureStoragePropertyDictionaryResourceInner object. + * + * @return the inner object. + */ + AzureStoragePropertyDictionaryResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageState.java new file mode 100644 index 0000000000000..d41f2a84b644b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageState.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for AzureStorageState. */ +public enum AzureStorageState { + /** Enum value Ok. */ + OK("Ok"), + + /** Enum value InvalidCredentials. */ + INVALID_CREDENTIALS("InvalidCredentials"), + + /** Enum value InvalidShare. */ + INVALID_SHARE("InvalidShare"), + + /** Enum value NotValidated. */ + NOT_VALIDATED("NotValidated"); + + /** The actual serialized value for a AzureStorageState instance. */ + private final String value; + + AzureStorageState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AzureStorageState instance. + * + * @param value the serialized value to parse. + * @return the parsed AzureStorageState object, or null if unable to parse. + */ + @JsonCreator + public static AzureStorageState fromString(String value) { + AzureStorageState[] items = AzureStorageState.values(); + for (AzureStorageState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageType.java new file mode 100644 index 0000000000000..ee59583da5776 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureStorageType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for AzureStorageType. */ +public enum AzureStorageType { + /** Enum value AzureFiles. */ + AZURE_FILES("AzureFiles"), + + /** Enum value AzureBlob. */ + AZURE_BLOB("AzureBlob"); + + /** The actual serialized value for a AzureStorageType instance. */ + private final String value; + + AzureStorageType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a AzureStorageType instance. + * + * @param value the serialized value to parse. + * @return the parsed AzureStorageType object, or null if unable to parse. + */ + @JsonCreator + public static AzureStorageType fromString(String value) { + AzureStorageType[] items = AzureStorageType.values(); + for (AzureStorageType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureTableStorageApplicationLogsConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureTableStorageApplicationLogsConfig.java new file mode 100644 index 0000000000000..5b38f89ea8094 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/AzureTableStorageApplicationLogsConfig.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Application logs to Azure table storage configuration. */ +@Fluent +public final class AzureTableStorageApplicationLogsConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureTableStorageApplicationLogsConfig.class); + + /* + * Log level. + */ + @JsonProperty(value = "level") + private LogLevel level; + + /* + * SAS URL to an Azure table with add/query/delete permissions. + */ + @JsonProperty(value = "sasUrl", required = true) + private String sasUrl; + + /** + * Get the level property: Log level. + * + * @return the level value. + */ + public LogLevel level() { + return this.level; + } + + /** + * Set the level property: Log level. + * + * @param level the level value to set. + * @return the AzureTableStorageApplicationLogsConfig object itself. + */ + public AzureTableStorageApplicationLogsConfig withLevel(LogLevel level) { + this.level = level; + return this; + } + + /** + * Get the sasUrl property: SAS URL to an Azure table with add/query/delete permissions. + * + * @return the sasUrl value. + */ + public String sasUrl() { + return this.sasUrl; + } + + /** + * Set the sasUrl property: SAS URL to an Azure table with add/query/delete permissions. + * + * @param sasUrl the sasUrl value to set. + * @return the AzureTableStorageApplicationLogsConfig object itself. + */ + public AzureTableStorageApplicationLogsConfig withSasUrl(String sasUrl) { + this.sasUrl = sasUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sasUrl() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sasUrl in model AzureTableStorageApplicationLogsConfig")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItem.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItem.java new file mode 100644 index 0000000000000..06c8d1107ea6a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItem.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupItemInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of BackupItem. */ +public interface BackupItem { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the backupId property: Id of the backup. + * + * @return the backupId value. + */ + Integer backupId(); + + /** + * Gets the storageAccountUrl property: SAS URL for the storage account container which contains this backup. + * + * @return the storageAccountUrl value. + */ + String storageAccountUrl(); + + /** + * Gets the blobName property: Name of the blob which contains data for this backup. + * + * @return the blobName value. + */ + String blobName(); + + /** + * Gets the namePropertiesName property: Name of this backup. + * + * @return the namePropertiesName value. + */ + String namePropertiesName(); + + /** + * Gets the status property: Backup status. + * + * @return the status value. + */ + BackupItemStatus status(); + + /** + * Gets the sizeInBytes property: Size of the backup in bytes. + * + * @return the sizeInBytes value. + */ + Long sizeInBytes(); + + /** + * Gets the created property: Timestamp of the backup creation. + * + * @return the created value. + */ + OffsetDateTime created(); + + /** + * Gets the log property: Details regarding this backup. Might contain an error message. + * + * @return the log value. + */ + String log(); + + /** + * Gets the databases property: List of databases included in the backup. + * + * @return the databases value. + */ + List databases(); + + /** + * Gets the scheduled property: True if this backup has been created due to a schedule being triggered. + * + * @return the scheduled value. + */ + Boolean scheduled(); + + /** + * Gets the lastRestoreTimestamp property: Timestamp of a last restore operation which used this backup. + * + * @return the lastRestoreTimestamp value. + */ + OffsetDateTime lastRestoreTimestamp(); + + /** + * Gets the finishedTimestamp property: Timestamp when this backup finished. + * + * @return the finishedTimestamp value. + */ + OffsetDateTime finishedTimestamp(); + + /** + * Gets the correlationId property: Unique correlation identifier. Please use this along with the timestamp while + * communicating with Azure support. + * + * @return the correlationId value. + */ + String correlationId(); + + /** + * Gets the websiteSizeInBytes property: Size of the original web app which has been backed up. + * + * @return the websiteSizeInBytes value. + */ + Long websiteSizeInBytes(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.BackupItemInner object. + * + * @return the inner object. + */ + BackupItemInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItemCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItemCollection.java new file mode 100644 index 0000000000000..54acb497ca52a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItemCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupItemInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of backup items. */ +@Fluent +public final class BackupItemCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupItemCollection.class); + + /* + * 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; + + /** + * 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 BackupItemCollection object itself. + */ + public BackupItemCollection 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 BackupItemCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItemStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItemStatus.java new file mode 100644 index 0000000000000..9d32fe5af225e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupItemStatus.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for BackupItemStatus. */ +public enum BackupItemStatus { + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value TimedOut. */ + TIMED_OUT("TimedOut"), + + /** Enum value Created. */ + CREATED("Created"), + + /** Enum value Skipped. */ + SKIPPED("Skipped"), + + /** Enum value PartiallySucceeded. */ + PARTIALLY_SUCCEEDED("PartiallySucceeded"), + + /** Enum value DeleteInProgress. */ + DELETE_IN_PROGRESS("DeleteInProgress"), + + /** Enum value DeleteFailed. */ + DELETE_FAILED("DeleteFailed"), + + /** Enum value Deleted. */ + DELETED("Deleted"); + + /** The actual serialized value for a BackupItemStatus instance. */ + private final String value; + + BackupItemStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BackupItemStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed BackupItemStatus object, or null if unable to parse. + */ + @JsonCreator + public static BackupItemStatus fromString(String value) { + BackupItemStatus[] items = BackupItemStatus.values(); + for (BackupItemStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupRequest.java new file mode 100644 index 0000000000000..124907fd65818 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupRequest.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner; +import java.util.List; + +/** An immutable client-side representation of BackupRequest. */ +public interface BackupRequest { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the backupName property: Name of the backup. + * + * @return the backupName value. + */ + String backupName(); + + /** + * Gets the enabled property: True if the backup schedule is enabled (must be included in that case), false if the + * backup schedule should be disabled. + * + * @return the enabled value. + */ + Boolean enabled(); + + /** + * Gets the storageAccountUrl property: SAS URL to the container. + * + * @return the storageAccountUrl value. + */ + String storageAccountUrl(); + + /** + * Gets the backupSchedule property: Schedule for the backup if it is executed periodically. + * + * @return the backupSchedule value. + */ + BackupSchedule backupSchedule(); + + /** + * Gets the databases property: Databases included in the backup. + * + * @return the databases value. + */ + List databases(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner object. + * + * @return the inner object. + */ + BackupRequestInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupRestoreOperationType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupRestoreOperationType.java new file mode 100644 index 0000000000000..ee66a8581fa01 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupRestoreOperationType.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for BackupRestoreOperationType. */ +public enum BackupRestoreOperationType { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value Clone. */ + CLONE("Clone"), + + /** Enum value Relocation. */ + RELOCATION("Relocation"), + + /** Enum value Snapshot. */ + SNAPSHOT("Snapshot"), + + /** Enum value CloudFS. */ + CLOUD_FS("CloudFS"); + + /** The actual serialized value for a BackupRestoreOperationType instance. */ + private final String value; + + BackupRestoreOperationType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BackupRestoreOperationType instance. + * + * @param value the serialized value to parse. + * @return the parsed BackupRestoreOperationType object, or null if unable to parse. + */ + @JsonCreator + public static BackupRestoreOperationType fromString(String value) { + BackupRestoreOperationType[] items = BackupRestoreOperationType.values(); + for (BackupRestoreOperationType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupSchedule.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupSchedule.java new file mode 100644 index 0000000000000..8efc737d33beb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BackupSchedule.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Description of a backup schedule. Describes how often should be the backup performed and what should be the retention + * policy. + */ +@Fluent +public final class BackupSchedule { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BackupSchedule.class); + + /* + * How often the backup should be executed (e.g. for weekly backup, this + * should be set to 7 and FrequencyUnit should be set to Day) + */ + @JsonProperty(value = "frequencyInterval", required = true) + private int frequencyInterval; + + /* + * The unit of time for how often the backup should be executed (e.g. for + * weekly backup, this should be set to Day and FrequencyInterval should be + * set to 7) + */ + @JsonProperty(value = "frequencyUnit", required = true) + private FrequencyUnit frequencyUnit; + + /* + * True if the retention policy should always keep at least one backup in + * the storage account, regardless how old it is; false otherwise. + */ + @JsonProperty(value = "keepAtLeastOneBackup", required = true) + private boolean keepAtLeastOneBackup; + + /* + * After how many days backups should be deleted. + */ + @JsonProperty(value = "retentionPeriodInDays", required = true) + private int retentionPeriodInDays; + + /* + * When the schedule should start working. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * Last time when this schedule was triggered. + */ + @JsonProperty(value = "lastExecutionTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastExecutionTime; + + /** + * Get the frequencyInterval property: How often the backup should be executed (e.g. for weekly backup, this should + * be set to 7 and FrequencyUnit should be set to Day). + * + * @return the frequencyInterval value. + */ + public int frequencyInterval() { + return this.frequencyInterval; + } + + /** + * Set the frequencyInterval property: How often the backup should be executed (e.g. for weekly backup, this should + * be set to 7 and FrequencyUnit should be set to Day). + * + * @param frequencyInterval the frequencyInterval value to set. + * @return the BackupSchedule object itself. + */ + public BackupSchedule withFrequencyInterval(int frequencyInterval) { + this.frequencyInterval = frequencyInterval; + return this; + } + + /** + * Get the frequencyUnit property: The unit of time for how often the backup should be executed (e.g. for weekly + * backup, this should be set to Day and FrequencyInterval should be set to 7). + * + * @return the frequencyUnit value. + */ + public FrequencyUnit frequencyUnit() { + return this.frequencyUnit; + } + + /** + * Set the frequencyUnit property: The unit of time for how often the backup should be executed (e.g. for weekly + * backup, this should be set to Day and FrequencyInterval should be set to 7). + * + * @param frequencyUnit the frequencyUnit value to set. + * @return the BackupSchedule object itself. + */ + public BackupSchedule withFrequencyUnit(FrequencyUnit frequencyUnit) { + this.frequencyUnit = frequencyUnit; + return this; + } + + /** + * Get the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the + * storage account, regardless how old it is; false otherwise. + * + * @return the keepAtLeastOneBackup value. + */ + public boolean keepAtLeastOneBackup() { + return this.keepAtLeastOneBackup; + } + + /** + * Set the keepAtLeastOneBackup property: True if the retention policy should always keep at least one backup in the + * storage account, regardless how old it is; false otherwise. + * + * @param keepAtLeastOneBackup the keepAtLeastOneBackup value to set. + * @return the BackupSchedule object itself. + */ + public BackupSchedule withKeepAtLeastOneBackup(boolean keepAtLeastOneBackup) { + this.keepAtLeastOneBackup = keepAtLeastOneBackup; + return this; + } + + /** + * Get the retentionPeriodInDays property: After how many days backups should be deleted. + * + * @return the retentionPeriodInDays value. + */ + public int retentionPeriodInDays() { + return this.retentionPeriodInDays; + } + + /** + * Set the retentionPeriodInDays property: After how many days backups should be deleted. + * + * @param retentionPeriodInDays the retentionPeriodInDays value to set. + * @return the BackupSchedule object itself. + */ + public BackupSchedule withRetentionPeriodInDays(int retentionPeriodInDays) { + this.retentionPeriodInDays = retentionPeriodInDays; + return this; + } + + /** + * Get the startTime property: When the schedule should start working. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: When the schedule should start working. + * + * @param startTime the startTime value to set. + * @return the BackupSchedule object itself. + */ + public BackupSchedule withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the lastExecutionTime property: Last time when this schedule was triggered. + * + * @return the lastExecutionTime value. + */ + public OffsetDateTime lastExecutionTime() { + return this.lastExecutionTime; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (frequencyUnit() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property frequencyUnit in model BackupSchedule")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BillingMeter.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BillingMeter.java new file mode 100644 index 0000000000000..04f7c34911890 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BillingMeter.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.BillingMeterInner; + +/** An immutable client-side representation of BillingMeter. */ +public interface BillingMeter { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the meterId property: Meter GUID onboarded in Commerce. + * + * @return the meterId value. + */ + String meterId(); + + /** + * Gets the billingLocation property: Azure Location of billable resource. + * + * @return the billingLocation value. + */ + String billingLocation(); + + /** + * Gets the shortName property: Short Name from App Service Azure pricing Page. + * + * @return the shortName value. + */ + String shortName(); + + /** + * Gets the friendlyName property: Friendly name of the meter. + * + * @return the friendlyName value. + */ + String friendlyName(); + + /** + * Gets the resourceType property: App Service ResourceType meter used for. + * + * @return the resourceType value. + */ + String resourceType(); + + /** + * Gets the osType property: App Service OS type meter used for. + * + * @return the osType value. + */ + String osType(); + + /** + * Gets the multiplier property: Meter Multiplier. + * + * @return the multiplier value. + */ + Double multiplier(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.BillingMeterInner object. + * + * @return the inner object. + */ + BillingMeterInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BillingMeterCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BillingMeterCollection.java new file mode 100644 index 0000000000000..07160717d5072 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BillingMeterCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.BillingMeterInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Billing Meters. */ +@Fluent +public final class BillingMeterCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BillingMeterCollection.class); + + /* + * 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; + + /** + * 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 BillingMeterCollection object itself. + */ + public BillingMeterCollection 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 BillingMeterCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BlobStorageTokenStore.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BlobStorageTokenStore.java new file mode 100644 index 0000000000000..206925a136ca7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BlobStorageTokenStore.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the storage of the tokens if blob storage is used. */ +@Fluent +public final class BlobStorageTokenStore { + @JsonIgnore private final ClientLogger logger = new ClientLogger(BlobStorageTokenStore.class); + + /* + * The name of the app setting containing the SAS URL of the blob storage + * containing the tokens. + */ + @JsonProperty(value = "sasUrlSettingName") + private String sasUrlSettingName; + + /** + * Get the sasUrlSettingName property: The name of the app setting containing the SAS URL of the blob storage + * containing the tokens. + * + * @return the sasUrlSettingName value. + */ + public String sasUrlSettingName() { + return this.sasUrlSettingName; + } + + /** + * Set the sasUrlSettingName property: The name of the app setting containing the SAS URL of the blob storage + * containing the tokens. + * + * @param sasUrlSettingName the sasUrlSettingName value to set. + * @return the BlobStorageTokenStore object itself. + */ + public BlobStorageTokenStore withSasUrlSettingName(String sasUrlSettingName) { + this.sasUrlSettingName = sasUrlSettingName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BuildStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BuildStatus.java new file mode 100644 index 0000000000000..530a3bcaf5341 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BuildStatus.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for BuildStatus. */ +public final class BuildStatus extends ExpandableStringEnum { + /** Static value WaitingForDeployment for BuildStatus. */ + public static final BuildStatus WAITING_FOR_DEPLOYMENT = fromString("WaitingForDeployment"); + + /** Static value Uploading for BuildStatus. */ + public static final BuildStatus UPLOADING = fromString("Uploading"); + + /** Static value Deploying for BuildStatus. */ + public static final BuildStatus DEPLOYING = fromString("Deploying"); + + /** Static value Ready for BuildStatus. */ + public static final BuildStatus READY = fromString("Ready"); + + /** Static value Failed for BuildStatus. */ + public static final BuildStatus FAILED = fromString("Failed"); + + /** Static value Deleting for BuildStatus. */ + public static final BuildStatus DELETING = fromString("Deleting"); + + /** Static value Detached for BuildStatus. */ + public static final BuildStatus DETACHED = fromString("Detached"); + + /** + * Creates or finds a BuildStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding BuildStatus. + */ + @JsonCreator + public static BuildStatus fromString(String name) { + return fromString(name, BuildStatus.class); + } + + /** @return known BuildStatus values. */ + public static Collection values() { + return values(BuildStatus.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BuiltInAuthenticationProvider.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BuiltInAuthenticationProvider.java new file mode 100644 index 0000000000000..b355d7295b7c2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/BuiltInAuthenticationProvider.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for BuiltInAuthenticationProvider. */ +public enum BuiltInAuthenticationProvider { + /** Enum value AzureActiveDirectory. */ + AZURE_ACTIVE_DIRECTORY("AzureActiveDirectory"), + + /** Enum value Facebook. */ + FACEBOOK("Facebook"), + + /** Enum value Google. */ + GOOGLE("Google"), + + /** Enum value MicrosoftAccount. */ + MICROSOFT_ACCOUNT("MicrosoftAccount"), + + /** Enum value Twitter. */ + TWITTER("Twitter"), + + /** Enum value Github. */ + GITHUB("Github"); + + /** The actual serialized value for a BuiltInAuthenticationProvider instance. */ + private final String value; + + BuiltInAuthenticationProvider(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a BuiltInAuthenticationProvider instance. + * + * @param value the serialized value to parse. + * @return the parsed BuiltInAuthenticationProvider object, or null if unable to parse. + */ + @JsonCreator + public static BuiltInAuthenticationProvider fromString(String value) { + BuiltInAuthenticationProvider[] items = BuiltInAuthenticationProvider.values(); + for (BuiltInAuthenticationProvider item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Capability.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Capability.java new file mode 100644 index 0000000000000..d39402079cb46 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Capability.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CapabilityInner; + +/** An immutable client-side representation of Capability. */ +public interface Capability { + /** + * Gets the name property: Name of the SKU capability. + * + * @return the name value. + */ + String name(); + + /** + * Gets the value property: Value of the SKU capability. + * + * @return the value value. + */ + String value(); + + /** + * Gets the reason property: Reason of the SKU capability. + * + * @return the reason value. + */ + String reason(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.CapabilityInner object. + * + * @return the inner object. + */ + CapabilityInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Certificate.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Certificate.java new file mode 100644 index 0000000000000..6ff441b46bc7e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Certificate.java @@ -0,0 +1,537 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of Certificate. */ +public interface Certificate { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the password property: Certificate password. + * + * @return the password value. + */ + String password(); + + /** + * Gets the friendlyName property: Friendly name of the certificate. + * + * @return the friendlyName value. + */ + String friendlyName(); + + /** + * Gets the subjectName property: Subject name of the certificate. + * + * @return the subjectName value. + */ + String subjectName(); + + /** + * Gets the hostNames property: Host names the certificate applies to. + * + * @return the hostNames value. + */ + List hostNames(); + + /** + * Gets the pfxBlob property: Pfx blob. + * + * @return the pfxBlob value. + */ + byte[] pfxBlob(); + + /** + * Gets the siteName property: App name. + * + * @return the siteName value. + */ + String siteName(); + + /** + * Gets the selfLink property: Self link. + * + * @return the selfLink value. + */ + String selfLink(); + + /** + * Gets the issuer property: Certificate issuer. + * + * @return the issuer value. + */ + String issuer(); + + /** + * Gets the issueDate property: Certificate issue Date. + * + * @return the issueDate value. + */ + OffsetDateTime issueDate(); + + /** + * Gets the expirationDate property: Certificate expiration date. + * + * @return the expirationDate value. + */ + OffsetDateTime expirationDate(); + + /** + * Gets the thumbprint property: Certificate thumbprint. + * + * @return the thumbprint value. + */ + String thumbprint(); + + /** + * Gets the valid property: Is the certificate valid?. + * + * @return the valid value. + */ + Boolean valid(); + + /** + * Gets the cerBlob property: Raw bytes of .cer file. + * + * @return the cerBlob value. + */ + byte[] cerBlob(); + + /** + * Gets the publicKeyHash property: Public key hash. + * + * @return the publicKeyHash value. + */ + String publicKeyHash(); + + /** + * Gets the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the + * certificate. + * + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * Gets the keyVaultId property: Key Vault Csm resource Id. + * + * @return the keyVaultId value. + */ + String keyVaultId(); + + /** + * Gets the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + String keyVaultSecretName(); + + /** + * Gets the keyVaultSecretStatus property: Status of the Key Vault secret. + * + * @return the keyVaultSecretStatus value. + */ + KeyVaultSecretStatus keyVaultSecretStatus(); + + /** + * Gets the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * Gets the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @return the canonicalName value. + */ + String canonicalName(); + + /** + * Gets the domainValidationMethod property: Method of domain validation for free cert. + * + * @return the domainValidationMethod value. + */ + String domainValidationMethod(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.CertificateInner object. + * + * @return the inner object. + */ + CertificateInner innerModel(); + + /** The entirety of the Certificate definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The Certificate definition stages. */ + interface DefinitionStages { + /** The first stage of the Certificate definition. */ + interface Blank extends WithLocation { + } + /** The stage of the Certificate definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + 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 Certificate definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the Certificate definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithKind, + DefinitionStages.WithPassword, + DefinitionStages.WithHostNames, + DefinitionStages.WithPfxBlob, + DefinitionStages.WithKeyVaultId, + DefinitionStages.WithKeyVaultSecretName, + DefinitionStages.WithServerFarmId, + DefinitionStages.WithCanonicalName, + DefinitionStages.WithDomainValidationMethod { + /** + * Executes the create request. + * + * @return the created resource. + */ + Certificate create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Certificate create(Context context); + } + /** The stage of the Certificate definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the Certificate definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the Certificate definition allowing to specify password. */ + interface WithPassword { + /** + * Specifies the password property: Certificate password.. + * + * @param password Certificate password. + * @return the next definition stage. + */ + WithCreate withPassword(String password); + } + /** The stage of the Certificate definition allowing to specify hostNames. */ + interface WithHostNames { + /** + * Specifies the hostNames property: Host names the certificate applies to.. + * + * @param hostNames Host names the certificate applies to. + * @return the next definition stage. + */ + WithCreate withHostNames(List hostNames); + } + /** The stage of the Certificate definition allowing to specify pfxBlob. */ + interface WithPfxBlob { + /** + * Specifies the pfxBlob property: Pfx blob.. + * + * @param pfxBlob Pfx blob. + * @return the next definition stage. + */ + WithCreate withPfxBlob(byte[] pfxBlob); + } + /** The stage of the Certificate definition allowing to specify keyVaultId. */ + interface WithKeyVaultId { + /** + * Specifies the keyVaultId property: Key Vault Csm resource Id.. + * + * @param keyVaultId Key Vault Csm resource Id. + * @return the next definition stage. + */ + WithCreate withKeyVaultId(String keyVaultId); + } + /** The stage of the Certificate definition allowing to specify keyVaultSecretName. */ + interface WithKeyVaultSecretName { + /** + * Specifies the keyVaultSecretName property: Key Vault secret name.. + * + * @param keyVaultSecretName Key Vault secret name. + * @return the next definition stage. + */ + WithCreate withKeyVaultSecretName(String keyVaultSecretName); + } + /** The stage of the Certificate definition allowing to specify serverFarmId. */ + interface WithServerFarmId { + /** + * Specifies the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}".. + * + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * @return the next definition stage. + */ + WithCreate withServerFarmId(String serverFarmId); + } + /** The stage of the Certificate definition allowing to specify canonicalName. */ + interface WithCanonicalName { + /** + * Specifies the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @param canonicalName CNAME of the certificate to be issued via free certificate. + * @return the next definition stage. + */ + WithCreate withCanonicalName(String canonicalName); + } + /** The stage of the Certificate definition allowing to specify domainValidationMethod. */ + interface WithDomainValidationMethod { + /** + * Specifies the domainValidationMethod property: Method of domain validation for free cert. + * + * @param domainValidationMethod Method of domain validation for free cert. + * @return the next definition stage. + */ + WithCreate withDomainValidationMethod(String domainValidationMethod); + } + } + /** + * Begins update for the Certificate resource. + * + * @return the stage of resource update. + */ + Certificate.Update update(); + + /** The template for Certificate update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithHostNames, + UpdateStages.WithPfxBlob, + UpdateStages.WithKeyVaultId, + UpdateStages.WithKeyVaultSecretName, + UpdateStages.WithServerFarmId, + UpdateStages.WithCanonicalName, + UpdateStages.WithDomainValidationMethod { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Certificate apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Certificate apply(Context context); + } + /** The Certificate update stages. */ + interface UpdateStages { + /** The stage of the Certificate update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the Certificate update allowing to specify hostNames. */ + interface WithHostNames { + /** + * Specifies the hostNames property: Host names the certificate applies to.. + * + * @param hostNames Host names the certificate applies to. + * @return the next definition stage. + */ + Update withHostNames(List hostNames); + } + /** The stage of the Certificate update allowing to specify pfxBlob. */ + interface WithPfxBlob { + /** + * Specifies the pfxBlob property: Pfx blob.. + * + * @param pfxBlob Pfx blob. + * @return the next definition stage. + */ + Update withPfxBlob(byte[] pfxBlob); + } + /** The stage of the Certificate update allowing to specify keyVaultId. */ + interface WithKeyVaultId { + /** + * Specifies the keyVaultId property: Key Vault Csm resource Id.. + * + * @param keyVaultId Key Vault Csm resource Id. + * @return the next definition stage. + */ + Update withKeyVaultId(String keyVaultId); + } + /** The stage of the Certificate update allowing to specify keyVaultSecretName. */ + interface WithKeyVaultSecretName { + /** + * Specifies the keyVaultSecretName property: Key Vault secret name.. + * + * @param keyVaultSecretName Key Vault secret name. + * @return the next definition stage. + */ + Update withKeyVaultSecretName(String keyVaultSecretName); + } + /** The stage of the Certificate update allowing to specify serverFarmId. */ + interface WithServerFarmId { + /** + * Specifies the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}".. + * + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * @return the next definition stage. + */ + Update withServerFarmId(String serverFarmId); + } + /** The stage of the Certificate update allowing to specify canonicalName. */ + interface WithCanonicalName { + /** + * Specifies the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @param canonicalName CNAME of the certificate to be issued via free certificate. + * @return the next definition stage. + */ + Update withCanonicalName(String canonicalName); + } + /** The stage of the Certificate update allowing to specify domainValidationMethod. */ + interface WithDomainValidationMethod { + /** + * Specifies the domainValidationMethod property: Method of domain validation for free cert. + * + * @param domainValidationMethod Method of domain validation for free cert. + * @return the next definition stage. + */ + Update withDomainValidationMethod(String domainValidationMethod); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Certificate refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Certificate refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateCollection.java new file mode 100644 index 0000000000000..696067bcbc845 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of certificates. */ +@Fluent +public final class CertificateCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateCollection.class); + + /* + * 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; + + /** + * 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 CertificateCollection object itself. + */ + public CertificateCollection 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 CertificateCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateDetails.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateDetails.java new file mode 100644 index 0000000000000..4f6b04fedbdb0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateDetails.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** SSL certificate details. */ +@Immutable +public final class CertificateDetails { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateDetails.class); + + /* + * Certificate Version. + */ + @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) + private Integer version; + + /* + * Certificate Serial Number. + */ + @JsonProperty(value = "serialNumber", access = JsonProperty.Access.WRITE_ONLY) + private String serialNumber; + + /* + * Certificate Thumbprint. + */ + @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; + + /* + * Certificate Subject. + */ + @JsonProperty(value = "subject", access = JsonProperty.Access.WRITE_ONLY) + private String subject; + + /* + * Date Certificate is valid from. + */ + @JsonProperty(value = "notBefore", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime notBefore; + + /* + * Date Certificate is valid to. + */ + @JsonProperty(value = "notAfter", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime notAfter; + + /* + * Certificate Signature algorithm. + */ + @JsonProperty(value = "signatureAlgorithm", access = JsonProperty.Access.WRITE_ONLY) + private String signatureAlgorithm; + + /* + * Certificate Issuer. + */ + @JsonProperty(value = "issuer", access = JsonProperty.Access.WRITE_ONLY) + private String issuer; + + /* + * Raw certificate data. + */ + @JsonProperty(value = "rawData", access = JsonProperty.Access.WRITE_ONLY) + private String rawData; + + /** + * Get the version property: Certificate Version. + * + * @return the version value. + */ + public Integer version() { + return this.version; + } + + /** + * Get the serialNumber property: Certificate Serial Number. + * + * @return the serialNumber value. + */ + public String serialNumber() { + return this.serialNumber; + } + + /** + * Get the thumbprint property: Certificate Thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Get the subject property: Certificate Subject. + * + * @return the subject value. + */ + public String subject() { + return this.subject; + } + + /** + * Get the notBefore property: Date Certificate is valid from. + * + * @return the notBefore value. + */ + public OffsetDateTime notBefore() { + return this.notBefore; + } + + /** + * Get the notAfter property: Date Certificate is valid to. + * + * @return the notAfter value. + */ + public OffsetDateTime notAfter() { + return this.notAfter; + } + + /** + * Get the signatureAlgorithm property: Certificate Signature algorithm. + * + * @return the signatureAlgorithm value. + */ + public String signatureAlgorithm() { + return this.signatureAlgorithm; + } + + /** + * Get the issuer property: Certificate Issuer. + * + * @return the issuer value. + */ + public String issuer() { + return this.issuer; + } + + /** + * Get the rawData property: Raw certificate data. + * + * @return the rawData value. + */ + public String rawData() { + return this.rawData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateEmail.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateEmail.java new file mode 100644 index 0000000000000..3386c8b3eed42 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateEmail.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateEmailInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of CertificateEmail. */ +public interface CertificateEmail { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the emailId property: Email id. + * + * @return the emailId value. + */ + String emailId(); + + /** + * Gets the timestamp property: Time stamp. + * + * @return the timestamp value. + */ + OffsetDateTime timestamp(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.CertificateEmailInner object. + * + * @return the inner object. + */ + CertificateEmailInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderAction.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderAction.java new file mode 100644 index 0000000000000..0206fce0e3913 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderAction.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificateOrderActionInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of CertificateOrderAction. */ +public interface CertificateOrderAction { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the actionType property: Action type. + * + * @return the actionType value. + */ + CertificateOrderActionType actionType(); + + /** + * Gets the createdAt property: Time at which the certificate action was performed. + * + * @return the createdAt value. + */ + OffsetDateTime createdAt(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.CertificateOrderActionInner object. + * + * @return the inner object. + */ + CertificateOrderActionInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderActionType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderActionType.java new file mode 100644 index 0000000000000..601e8310cf75d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderActionType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for CertificateOrderActionType. */ +public enum CertificateOrderActionType { + /** Enum value CertificateIssued. */ + CERTIFICATE_ISSUED("CertificateIssued"), + + /** Enum value CertificateOrderCanceled. */ + CERTIFICATE_ORDER_CANCELED("CertificateOrderCanceled"), + + /** Enum value CertificateOrderCreated. */ + CERTIFICATE_ORDER_CREATED("CertificateOrderCreated"), + + /** Enum value CertificateRevoked. */ + CERTIFICATE_REVOKED("CertificateRevoked"), + + /** Enum value DomainValidationComplete. */ + DOMAIN_VALIDATION_COMPLETE("DomainValidationComplete"), + + /** Enum value FraudDetected. */ + FRAUD_DETECTED("FraudDetected"), + + /** Enum value OrgNameChange. */ + ORG_NAME_CHANGE("OrgNameChange"), + + /** Enum value OrgValidationComplete. */ + ORG_VALIDATION_COMPLETE("OrgValidationComplete"), + + /** Enum value SanDrop. */ + SAN_DROP("SanDrop"), + + /** Enum value FraudCleared. */ + FRAUD_CLEARED("FraudCleared"), + + /** Enum value CertificateExpired. */ + CERTIFICATE_EXPIRED("CertificateExpired"), + + /** Enum value CertificateExpirationWarning. */ + CERTIFICATE_EXPIRATION_WARNING("CertificateExpirationWarning"), + + /** Enum value FraudDocumentationRequired. */ + FRAUD_DOCUMENTATION_REQUIRED("FraudDocumentationRequired"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a CertificateOrderActionType instance. */ + private final String value; + + CertificateOrderActionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateOrderActionType instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateOrderActionType object, or null if unable to parse. + */ + @JsonCreator + public static CertificateOrderActionType fromString(String value) { + CertificateOrderActionType[] items = CertificateOrderActionType.values(); + for (CertificateOrderActionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderContact.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderContact.java new file mode 100644 index 0000000000000..6f30f0e5bde14 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderContact.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The CertificateOrderContact model. */ +@Fluent +public final class CertificateOrderContact { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificateOrderContact.class); + + /* + * The email property. + */ + @JsonProperty(value = "email") + private String email; + + /* + * The nameFirst property. + */ + @JsonProperty(value = "nameFirst") + private String nameFirst; + + /* + * The nameLast property. + */ + @JsonProperty(value = "nameLast") + private String nameLast; + + /* + * The phone property. + */ + @JsonProperty(value = "phone") + private String phone; + + /** + * Get the email property: The email property. + * + * @return the email value. + */ + public String email() { + return this.email; + } + + /** + * Set the email property: The email property. + * + * @param email the email value to set. + * @return the CertificateOrderContact object itself. + */ + public CertificateOrderContact withEmail(String email) { + this.email = email; + return this; + } + + /** + * Get the nameFirst property: The nameFirst property. + * + * @return the nameFirst value. + */ + public String nameFirst() { + return this.nameFirst; + } + + /** + * Set the nameFirst property: The nameFirst property. + * + * @param nameFirst the nameFirst value to set. + * @return the CertificateOrderContact object itself. + */ + public CertificateOrderContact withNameFirst(String nameFirst) { + this.nameFirst = nameFirst; + return this; + } + + /** + * Get the nameLast property: The nameLast property. + * + * @return the nameLast value. + */ + public String nameLast() { + return this.nameLast; + } + + /** + * Set the nameLast property: The nameLast property. + * + * @param nameLast the nameLast value to set. + * @return the CertificateOrderContact object itself. + */ + public CertificateOrderContact withNameLast(String nameLast) { + this.nameLast = nameLast; + return this; + } + + /** + * Get the phone property: The phone property. + * + * @return the phone value. + */ + public String phone() { + return this.phone; + } + + /** + * Set the phone property: The phone property. + * + * @param phone the phone value to set. + * @return the CertificateOrderContact object itself. + */ + public CertificateOrderContact withPhone(String phone) { + this.phone = phone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderStatus.java new file mode 100644 index 0000000000000..de4d8a9fa8dbf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrderStatus.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for CertificateOrderStatus. */ +public enum CertificateOrderStatus { + /** Enum value Pendingissuance. */ + PENDINGISSUANCE("Pendingissuance"), + + /** Enum value Issued. */ + ISSUED("Issued"), + + /** Enum value Revoked. */ + REVOKED("Revoked"), + + /** Enum value Canceled. */ + CANCELED("Canceled"), + + /** Enum value Denied. */ + DENIED("Denied"), + + /** Enum value Pendingrevocation. */ + PENDINGREVOCATION("Pendingrevocation"), + + /** Enum value PendingRekey. */ + PENDING_REKEY("PendingRekey"), + + /** Enum value Unused. */ + UNUSED("Unused"), + + /** Enum value Expired. */ + EXPIRED("Expired"), + + /** Enum value NotSubmitted. */ + NOT_SUBMITTED("NotSubmitted"); + + /** The actual serialized value for a CertificateOrderStatus instance. */ + private final String value; + + CertificateOrderStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateOrderStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateOrderStatus object, or null if unable to parse. + */ + @JsonCreator + public static CertificateOrderStatus fromString(String value) { + CertificateOrderStatus[] items = CertificateOrderStatus.values(); + for (CertificateOrderStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrdersDiagnostics.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrdersDiagnostics.java new file mode 100644 index 0000000000000..5603d1fedaea3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateOrdersDiagnostics.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.appservice.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.time.OffsetDateTime; + +/** Resource collection API of CertificateOrdersDiagnostics. */ +public interface CertificateOrdersDiagnostics { + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + PagedIterable listAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName); + + /** + * Description for Microsoft.CertificateRegistration to get the list of detectors for this RP. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + PagedIterable listAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName, Context context); + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + DetectorResponse getAppServiceCertificateOrderDetectorResponse( + String resourceGroupName, String certificateOrderName, String detectorName); + + /** + * Description for Microsoft.CertificateRegistration call to get a detector response from App Lens. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param certificateOrderName The certificate order name for which the response is needed. + * @param detectorName The detector name which needs to be run. + * @param startTime The start time for detector response. + * @param endTime The end time for the detector response. + * @param timeGrain The time grain for the detector response. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + Response getAppServiceCertificateOrderDetectorResponseWithResponse( + String resourceGroupName, + String certificateOrderName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificatePatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificatePatchResource.java new file mode 100644 index 0000000000000..b020fe2b0bbde --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificatePatchResource.java @@ -0,0 +1,360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.CertificatePatchResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** ARM resource for a certificate. */ +@Fluent +public final class CertificatePatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CertificatePatchResource.class); + + /* + * CertificatePatchResource resource specific properties + */ + @JsonProperty(value = "properties") + private CertificatePatchResourceProperties innerProperties; + + /** + * Get the innerProperties property: CertificatePatchResource resource specific properties. + * + * @return the innerProperties value. + */ + private CertificatePatchResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public CertificatePatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the password property: Certificate password. + * + * @return the password value. + */ + public String password() { + return this.innerProperties() == null ? null : this.innerProperties().password(); + } + + /** + * Set the password property: Certificate password. + * + * @param password the password value to set. + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withPassword(String password) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificatePatchResourceProperties(); + } + this.innerProperties().withPassword(password); + return this; + } + + /** + * Get the friendlyName property: Friendly name of the certificate. + * + * @return the friendlyName value. + */ + public String friendlyName() { + return this.innerProperties() == null ? null : this.innerProperties().friendlyName(); + } + + /** + * Get the subjectName property: Subject name of the certificate. + * + * @return the subjectName value. + */ + public String subjectName() { + return this.innerProperties() == null ? null : this.innerProperties().subjectName(); + } + + /** + * Get the hostNames property: Host names the certificate applies to. + * + * @return the hostNames value. + */ + public List hostNames() { + return this.innerProperties() == null ? null : this.innerProperties().hostNames(); + } + + /** + * Set the hostNames property: Host names the certificate applies to. + * + * @param hostNames the hostNames value to set. + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withHostNames(List hostNames) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificatePatchResourceProperties(); + } + this.innerProperties().withHostNames(hostNames); + return this; + } + + /** + * Get the pfxBlob property: Pfx blob. + * + * @return the pfxBlob value. + */ + public byte[] pfxBlob() { + return this.innerProperties() == null ? new byte[0] : this.innerProperties().pfxBlob(); + } + + /** + * Set the pfxBlob property: Pfx blob. + * + * @param pfxBlob the pfxBlob value to set. + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withPfxBlob(byte[] pfxBlob) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificatePatchResourceProperties(); + } + this.innerProperties().withPfxBlob(pfxBlob); + return this; + } + + /** + * Get the siteName property: App name. + * + * @return the siteName value. + */ + public String siteName() { + return this.innerProperties() == null ? null : this.innerProperties().siteName(); + } + + /** + * Get the selfLink property: Self link. + * + * @return the selfLink value. + */ + public String selfLink() { + return this.innerProperties() == null ? null : this.innerProperties().selfLink(); + } + + /** + * Get the issuer property: Certificate issuer. + * + * @return the issuer value. + */ + public String issuer() { + return this.innerProperties() == null ? null : this.innerProperties().issuer(); + } + + /** + * Get the issueDate property: Certificate issue Date. + * + * @return the issueDate value. + */ + public OffsetDateTime issueDate() { + return this.innerProperties() == null ? null : this.innerProperties().issueDate(); + } + + /** + * Get the expirationDate property: Certificate expiration date. + * + * @return the expirationDate value. + */ + public OffsetDateTime expirationDate() { + return this.innerProperties() == null ? null : this.innerProperties().expirationDate(); + } + + /** + * Get the thumbprint property: Certificate thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + } + + /** + * Get the valid property: Is the certificate valid?. + * + * @return the valid value. + */ + public Boolean valid() { + return this.innerProperties() == null ? null : this.innerProperties().valid(); + } + + /** + * Get the cerBlob property: Raw bytes of .cer file. + * + * @return the cerBlob value. + */ + public byte[] cerBlob() { + return this.innerProperties() == null ? new byte[0] : this.innerProperties().cerBlob(); + } + + /** + * Get the publicKeyHash property: Public key hash. + * + * @return the publicKeyHash value. + */ + public String publicKeyHash() { + return this.innerProperties() == null ? null : this.innerProperties().publicKeyHash(); + } + + /** + * Get the hostingEnvironmentProfile property: Specification for the App Service Environment to use for the + * certificate. + * + * @return the hostingEnvironmentProfile value. + */ + public HostingEnvironmentProfile hostingEnvironmentProfile() { + return this.innerProperties() == null ? null : this.innerProperties().hostingEnvironmentProfile(); + } + + /** + * Get the keyVaultId property: Key Vault Csm resource Id. + * + * @return the keyVaultId value. + */ + public String keyVaultId() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultId(); + } + + /** + * Set the keyVaultId property: Key Vault Csm resource Id. + * + * @param keyVaultId the keyVaultId value to set. + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withKeyVaultId(String keyVaultId) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificatePatchResourceProperties(); + } + this.innerProperties().withKeyVaultId(keyVaultId); + return this; + } + + /** + * Get the keyVaultSecretName property: Key Vault secret name. + * + * @return the keyVaultSecretName value. + */ + public String keyVaultSecretName() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultSecretName(); + } + + /** + * Set the keyVaultSecretName property: Key Vault secret name. + * + * @param keyVaultSecretName the keyVaultSecretName value to set. + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withKeyVaultSecretName(String keyVaultSecretName) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificatePatchResourceProperties(); + } + this.innerProperties().withKeyVaultSecretName(keyVaultSecretName); + return this; + } + + /** + * Get the keyVaultSecretStatus property: Status of the Key Vault secret. + * + * @return the keyVaultSecretStatus value. + */ + public KeyVaultSecretStatus keyVaultSecretStatus() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultSecretStatus(); + } + + /** + * Get the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.innerProperties() == null ? null : this.innerProperties().serverFarmId(); + } + + /** + * Set the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @param serverFarmId the serverFarmId value to set. + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withServerFarmId(String serverFarmId) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificatePatchResourceProperties(); + } + this.innerProperties().withServerFarmId(serverFarmId); + return this; + } + + /** + * Get the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @return the canonicalName value. + */ + public String canonicalName() { + return this.innerProperties() == null ? null : this.innerProperties().canonicalName(); + } + + /** + * Set the canonicalName property: CNAME of the certificate to be issued via free certificate. + * + * @param canonicalName the canonicalName value to set. + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withCanonicalName(String canonicalName) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificatePatchResourceProperties(); + } + this.innerProperties().withCanonicalName(canonicalName); + return this; + } + + /** + * Get the domainValidationMethod property: Method of domain validation for free cert. + * + * @return the domainValidationMethod value. + */ + public String domainValidationMethod() { + return this.innerProperties() == null ? null : this.innerProperties().domainValidationMethod(); + } + + /** + * Set the domainValidationMethod property: Method of domain validation for free cert. + * + * @param domainValidationMethod the domainValidationMethod value to set. + * @return the CertificatePatchResource object itself. + */ + public CertificatePatchResource withDomainValidationMethod(String domainValidationMethod) { + if (this.innerProperties() == null) { + this.innerProperties = new CertificatePatchResourceProperties(); + } + this.innerProperties().withDomainValidationMethod(domainValidationMethod); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateProductType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateProductType.java new file mode 100644 index 0000000000000..5311620808588 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateProductType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for CertificateProductType. */ +public enum CertificateProductType { + /** Enum value StandardDomainValidatedSsl. */ + STANDARD_DOMAIN_VALIDATED_SSL("StandardDomainValidatedSsl"), + + /** Enum value StandardDomainValidatedWildCardSsl. */ + STANDARD_DOMAIN_VALIDATED_WILD_CARD_SSL("StandardDomainValidatedWildCardSsl"); + + /** The actual serialized value for a CertificateProductType instance. */ + private final String value; + + CertificateProductType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CertificateProductType instance. + * + * @param value the serialized value to parse. + * @return the parsed CertificateProductType object, or null if unable to parse. + */ + @JsonCreator + public static CertificateProductType fromString(String value) { + CertificateProductType[] items = CertificateProductType.values(); + for (CertificateProductType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateRegistrationProviders.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateRegistrationProviders.java new file mode 100644 index 0000000000000..74d12e1f80461 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CertificateRegistrationProviders.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.appservice.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of CertificateRegistrationProviders. */ +public interface CertificateRegistrationProviders { + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + PagedIterable listOperations(); + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + PagedIterable listOperations(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Certificates.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Certificates.java new file mode 100644 index 0000000000000..6b0ee569ee5b6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Certificates.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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 Certificates. */ +public interface Certificates { + /** + * Description for Get all certificates for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + PagedIterable list(); + + /** + * Description for Get all certificates for a subscription. + * + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=KeyVaultId eq 'KeyVaultId'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + PagedIterable list(String filter, Context context); + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all certificates in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + Certificate getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Get a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete a certificate. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Get a certificate. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + Certificate getById(String id); + + /** + * Description for Get a certificate. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return sSL certificate for an app. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Delete a certificate. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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); + + /** + * Description for Delete a certificate. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Certificate resource. + * + * @param name resource name. + * @return the first stage of the new Certificate definition. + */ + Certificate.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Channels.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Channels.java new file mode 100644 index 0000000000000..25fd248bf8431 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Channels.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for Channels. */ +public enum Channels { + /** Enum value Notification. */ + NOTIFICATION("Notification"), + + /** Enum value Api. */ + API("Api"), + + /** Enum value Email. */ + EMAIL("Email"), + + /** Enum value Webhook. */ + WEBHOOK("Webhook"), + + /** Enum value All. */ + ALL("All"); + + /** The actual serialized value for a Channels instance. */ + private final String value; + + Channels(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a Channels instance. + * + * @param value the serialized value to parse. + * @return the parsed Channels object, or null if unable to parse. + */ + @JsonCreator + public static Channels fromString(String value) { + Channels[] items = Channels.values(); + for (Channels item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CheckNameResourceTypes.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CheckNameResourceTypes.java new file mode 100644 index 0000000000000..88ccca998b6b8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CheckNameResourceTypes.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for CheckNameResourceTypes. */ +public final class CheckNameResourceTypes extends ExpandableStringEnum { + /** Static value Site for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes SITE = fromString("Site"); + + /** Static value Slot for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes SLOT = fromString("Slot"); + + /** Static value HostingEnvironment for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes HOSTING_ENVIRONMENT = fromString("HostingEnvironment"); + + /** Static value PublishingUser for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes PUBLISHING_USER = fromString("PublishingUser"); + + /** Static value Microsoft.Web/sites for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_WEB_SITES = fromString("Microsoft.Web/sites"); + + /** Static value Microsoft.Web/sites/slots for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_WEB_SITES_SLOTS = fromString("Microsoft.Web/sites/slots"); + + /** Static value Microsoft.Web/hostingEnvironments for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_WEB_HOSTING_ENVIRONMENTS = + fromString("Microsoft.Web/hostingEnvironments"); + + /** Static value Microsoft.Web/publishingUsers for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_WEB_PUBLISHING_USERS = + fromString("Microsoft.Web/publishingUsers"); + + /** + * Creates or finds a CheckNameResourceTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding CheckNameResourceTypes. + */ + @JsonCreator + public static CheckNameResourceTypes fromString(String name) { + return fromString(name, CheckNameResourceTypes.class); + } + + /** @return known CheckNameResourceTypes values. */ + public static Collection values() { + return values(CheckNameResourceTypes.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientCertMode.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientCertMode.java new file mode 100644 index 0000000000000..730fc444a1f49 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientCertMode.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ClientCertMode. */ +public enum ClientCertMode { + /** Enum value Required. */ + REQUIRED("Required"), + + /** Enum value Optional. */ + OPTIONAL("Optional"), + + /** Enum value OptionalInteractiveUser. */ + OPTIONAL_INTERACTIVE_USER("OptionalInteractiveUser"); + + /** The actual serialized value for a ClientCertMode instance. */ + private final String value; + + ClientCertMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ClientCertMode instance. + * + * @param value the serialized value to parse. + * @return the parsed ClientCertMode object, or null if unable to parse. + */ + @JsonCreator + public static ClientCertMode fromString(String value) { + ClientCertMode[] items = ClientCertMode.values(); + for (ClientCertMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientCredentialMethod.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientCredentialMethod.java new file mode 100644 index 0000000000000..25936997f362f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientCredentialMethod.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ClientCredentialMethod. */ +public enum ClientCredentialMethod { + /** Enum value ClientSecretPost. */ + CLIENT_SECRET_POST("ClientSecretPost"); + + /** The actual serialized value for a ClientCredentialMethod instance. */ + private final String value; + + ClientCredentialMethod(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ClientCredentialMethod instance. + * + * @param value the serialized value to parse. + * @return the parsed ClientCredentialMethod object, or null if unable to parse. + */ + @JsonCreator + public static ClientCredentialMethod fromString(String value) { + ClientCredentialMethod[] items = ClientCredentialMethod.values(); + for (ClientCredentialMethod item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientRegistration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientRegistration.java new file mode 100644 index 0000000000000..366d73e169aa8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ClientRegistration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the app registration for providers that have client ids and client secrets. */ +@Fluent +public final class ClientRegistration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ClientRegistration.class); + + /* + * The Client ID of the app used for login. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The app setting name that contains the client secret. + */ + @JsonProperty(value = "clientSecretSettingName") + private String clientSecretSettingName; + + /** + * Get the clientId property: The Client ID of the app used for login. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The Client ID of the app used for login. + * + * @param clientId the clientId value to set. + * @return the ClientRegistration object itself. + */ + public ClientRegistration withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientSecretSettingName property: The app setting name that contains the client secret. + * + * @return the clientSecretSettingName value. + */ + public String clientSecretSettingName() { + return this.clientSecretSettingName; + } + + /** + * Set the clientSecretSettingName property: The app setting name that contains the client secret. + * + * @param clientSecretSettingName the clientSecretSettingName value to set. + * @return the ClientRegistration object itself. + */ + public ClientRegistration withClientSecretSettingName(String clientSecretSettingName) { + this.clientSecretSettingName = clientSecretSettingName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CloneAbilityResult.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CloneAbilityResult.java new file mode 100644 index 0000000000000..757edfa1230f8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CloneAbilityResult.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for CloneAbilityResult. */ +public enum CloneAbilityResult { + /** Enum value Cloneable. */ + CLONEABLE("Cloneable"), + + /** Enum value PartiallyCloneable. */ + PARTIALLY_CLONEABLE("PartiallyCloneable"), + + /** Enum value NotCloneable. */ + NOT_CLONEABLE("NotCloneable"); + + /** The actual serialized value for a CloneAbilityResult instance. */ + private final String value; + + CloneAbilityResult(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CloneAbilityResult instance. + * + * @param value the serialized value to parse. + * @return the parsed CloneAbilityResult object, or null if unable to parse. + */ + @JsonCreator + public static CloneAbilityResult fromString(String value) { + CloneAbilityResult[] items = CloneAbilityResult.values(); + for (CloneAbilityResult item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CloningInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CloningInfo.java new file mode 100644 index 0000000000000..78a070dba9dd6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CloningInfo.java @@ -0,0 +1,361 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import java.util.UUID; + +/** Information needed for cloning operation. */ +@Fluent +public final class CloningInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CloningInfo.class); + + /* + * Correlation ID of cloning operation. This ID ties multiple cloning + * operations + * together to use the same snapshot. + */ + @JsonProperty(value = "correlationId") + private UUID correlationId; + + /* + * true to overwrite destination app; otherwise, + * false. + */ + @JsonProperty(value = "overwrite") + private Boolean overwrite; + + /* + * true to clone custom hostnames from source app; otherwise, + * false. + */ + @JsonProperty(value = "cloneCustomHostNames") + private Boolean cloneCustomHostNames; + + /* + * true to clone source control from source app; otherwise, + * false. + */ + @JsonProperty(value = "cloneSourceControl") + private Boolean cloneSourceControl; + + /* + * ARM resource ID of the source app. App resource ID is of the form + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + * for production slots and + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + * for other slots. + */ + @JsonProperty(value = "sourceWebAppId", required = true) + private String sourceWebAppId; + + /* + * Location of source app ex: West US or North Europe + */ + @JsonProperty(value = "sourceWebAppLocation") + private String sourceWebAppLocation; + + /* + * App Service Environment. + */ + @JsonProperty(value = "hostingEnvironment") + private String hostingEnvironment; + + /* + * Application setting overrides for cloned app. If specified, these + * settings override the settings cloned + * from source app. Otherwise, application settings from source app are + * retained. + */ + @JsonProperty(value = "appSettingsOverrides") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map appSettingsOverrides; + + /* + * true to configure load balancing for source and destination + * app. + */ + @JsonProperty(value = "configureLoadBalancing") + private Boolean configureLoadBalancing; + + /* + * ARM resource ID of the Traffic Manager profile to use, if it exists. + * Traffic Manager resource ID is of the form + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. + */ + @JsonProperty(value = "trafficManagerProfileId") + private String trafficManagerProfileId; + + /* + * Name of Traffic Manager profile to create. This is only needed if + * Traffic Manager profile does not already exist. + */ + @JsonProperty(value = "trafficManagerProfileName") + private String trafficManagerProfileName; + + /** + * Get the correlationId property: Correlation ID of cloning operation. This ID ties multiple cloning operations + * together to use the same snapshot. + * + * @return the correlationId value. + */ + public UUID correlationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID of cloning operation. This ID ties multiple cloning operations + * together to use the same snapshot. + * + * @param correlationId the correlationId value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withCorrelationId(UUID correlationId) { + this.correlationId = correlationId; + return this; + } + + /** + * Get the overwrite property: <code>true</code> to overwrite destination app; otherwise, + * <code>false</code>. + * + * @return the overwrite value. + */ + public Boolean overwrite() { + return this.overwrite; + } + + /** + * Set the overwrite property: <code>true</code> to overwrite destination app; otherwise, + * <code>false</code>. + * + * @param overwrite the overwrite value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withOverwrite(Boolean overwrite) { + this.overwrite = overwrite; + return this; + } + + /** + * Get the cloneCustomHostNames property: <code>true</code> to clone custom hostnames from source app; + * otherwise, <code>false</code>. + * + * @return the cloneCustomHostNames value. + */ + public Boolean cloneCustomHostNames() { + return this.cloneCustomHostNames; + } + + /** + * Set the cloneCustomHostNames property: <code>true</code> to clone custom hostnames from source app; + * otherwise, <code>false</code>. + * + * @param cloneCustomHostNames the cloneCustomHostNames value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withCloneCustomHostNames(Boolean cloneCustomHostNames) { + this.cloneCustomHostNames = cloneCustomHostNames; + return this; + } + + /** + * Get the cloneSourceControl property: <code>true</code> to clone source control from source app; + * otherwise, <code>false</code>. + * + * @return the cloneSourceControl value. + */ + public Boolean cloneSourceControl() { + return this.cloneSourceControl; + } + + /** + * Set the cloneSourceControl property: <code>true</code> to clone source control from source app; + * otherwise, <code>false</code>. + * + * @param cloneSourceControl the cloneSourceControl value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withCloneSourceControl(Boolean cloneSourceControl) { + this.cloneSourceControl = cloneSourceControl; + return this; + } + + /** + * Get the sourceWebAppId property: ARM resource ID of the source app. App resource ID is of the form + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production + * slots and + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + * for other slots. + * + * @return the sourceWebAppId value. + */ + public String sourceWebAppId() { + return this.sourceWebAppId; + } + + /** + * Set the sourceWebAppId property: ARM resource ID of the source app. App resource ID is of the form + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production + * slots and + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + * for other slots. + * + * @param sourceWebAppId the sourceWebAppId value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withSourceWebAppId(String sourceWebAppId) { + this.sourceWebAppId = sourceWebAppId; + return this; + } + + /** + * Get the sourceWebAppLocation property: Location of source app ex: West US or North Europe. + * + * @return the sourceWebAppLocation value. + */ + public String sourceWebAppLocation() { + return this.sourceWebAppLocation; + } + + /** + * Set the sourceWebAppLocation property: Location of source app ex: West US or North Europe. + * + * @param sourceWebAppLocation the sourceWebAppLocation value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withSourceWebAppLocation(String sourceWebAppLocation) { + this.sourceWebAppLocation = sourceWebAppLocation; + return this; + } + + /** + * Get the hostingEnvironment property: App Service Environment. + * + * @return the hostingEnvironment value. + */ + public String hostingEnvironment() { + return this.hostingEnvironment; + } + + /** + * Set the hostingEnvironment property: App Service Environment. + * + * @param hostingEnvironment the hostingEnvironment value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withHostingEnvironment(String hostingEnvironment) { + this.hostingEnvironment = hostingEnvironment; + return this; + } + + /** + * Get the appSettingsOverrides property: Application setting overrides for cloned app. If specified, these settings + * override the settings cloned from source app. Otherwise, application settings from source app are retained. + * + * @return the appSettingsOverrides value. + */ + public Map appSettingsOverrides() { + return this.appSettingsOverrides; + } + + /** + * Set the appSettingsOverrides property: Application setting overrides for cloned app. If specified, these settings + * override the settings cloned from source app. Otherwise, application settings from source app are retained. + * + * @param appSettingsOverrides the appSettingsOverrides value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withAppSettingsOverrides(Map appSettingsOverrides) { + this.appSettingsOverrides = appSettingsOverrides; + return this; + } + + /** + * Get the configureLoadBalancing property: <code>true</code> to configure load balancing for source and + * destination app. + * + * @return the configureLoadBalancing value. + */ + public Boolean configureLoadBalancing() { + return this.configureLoadBalancing; + } + + /** + * Set the configureLoadBalancing property: <code>true</code> to configure load balancing for source and + * destination app. + * + * @param configureLoadBalancing the configureLoadBalancing value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withConfigureLoadBalancing(Boolean configureLoadBalancing) { + this.configureLoadBalancing = configureLoadBalancing; + return this; + } + + /** + * Get the trafficManagerProfileId property: ARM resource ID of the Traffic Manager profile to use, if it exists. + * Traffic Manager resource ID is of the form + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. + * + * @return the trafficManagerProfileId value. + */ + public String trafficManagerProfileId() { + return this.trafficManagerProfileId; + } + + /** + * Set the trafficManagerProfileId property: ARM resource ID of the Traffic Manager profile to use, if it exists. + * Traffic Manager resource ID is of the form + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. + * + * @param trafficManagerProfileId the trafficManagerProfileId value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withTrafficManagerProfileId(String trafficManagerProfileId) { + this.trafficManagerProfileId = trafficManagerProfileId; + return this; + } + + /** + * Get the trafficManagerProfileName property: Name of Traffic Manager profile to create. This is only needed if + * Traffic Manager profile does not already exist. + * + * @return the trafficManagerProfileName value. + */ + public String trafficManagerProfileName() { + return this.trafficManagerProfileName; + } + + /** + * Set the trafficManagerProfileName property: Name of Traffic Manager profile to create. This is only needed if + * Traffic Manager profile does not already exist. + * + * @param trafficManagerProfileName the trafficManagerProfileName value to set. + * @return the CloningInfo object itself. + */ + public CloningInfo withTrafficManagerProfileName(String trafficManagerProfileName) { + this.trafficManagerProfileName = trafficManagerProfileName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sourceWebAppId() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property sourceWebAppId in model CloningInfo")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ComputeModeOptions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ComputeModeOptions.java new file mode 100644 index 0000000000000..c7d8678e49f18 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ComputeModeOptions.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ComputeModeOptions. */ +public enum ComputeModeOptions { + /** Enum value Shared. */ + SHARED("Shared"), + + /** Enum value Dedicated. */ + DEDICATED("Dedicated"), + + /** Enum value Dynamic. */ + DYNAMIC("Dynamic"); + + /** The actual serialized value for a ComputeModeOptions instance. */ + private final String value; + + ComputeModeOptions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ComputeModeOptions instance. + * + * @param value the serialized value to parse. + * @return the parsed ComputeModeOptions object, or null if unable to parse. + */ + @JsonCreator + public static ComputeModeOptions fromString(String value) { + ComputeModeOptions[] items = ComputeModeOptions.values(); + for (ComputeModeOptions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConfigReferenceSource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConfigReferenceSource.java new file mode 100644 index 0000000000000..e5116fcc7102e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConfigReferenceSource.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ConfigReferenceSource. */ +public enum ConfigReferenceSource { + /** Enum value KeyVault. */ + KEY_VAULT("KeyVault"); + + /** The actual serialized value for a ConfigReferenceSource instance. */ + private final String value; + + ConfigReferenceSource(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ConfigReferenceSource instance. + * + * @param value the serialized value to parse. + * @return the parsed ConfigReferenceSource object, or null if unable to parse. + */ + @JsonCreator + public static ConfigReferenceSource fromString(String value) { + ConfigReferenceSource[] items = ConfigReferenceSource.values(); + for (ConfigReferenceSource item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Configuration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Configuration.java new file mode 100644 index 0000000000000..8b340a25aeb6c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Configuration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Non versioned Container App configuration properties that define the mutable settings of a Container app. */ +@Fluent +public final class Configuration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Configuration.class); + + /* + * Collection of secrets used by a Container app + */ + @JsonProperty(value = "secrets") + private List secrets; + + /* + * ActiveRevisionsMode controls how active revisions are handled for the + * Container app: + * Multiple: multiple revisions can be active. If no value if + * provided, this is the defaultSingle: Only one revision can + * be active at a time. Revision weights can not be used in this + * mode + */ + @JsonProperty(value = "activeRevisionsMode") + private ActiveRevisionsMode activeRevisionsMode; + + /* + * Ingress configurations. + */ + @JsonProperty(value = "ingress") + private Ingress ingress; + + /* + * Collection of private container registry credentials for containers used + * by the Container app + */ + @JsonProperty(value = "registries") + private List registries; + + /** + * Get the secrets property: Collection of secrets used by a Container app. + * + * @return the secrets value. + */ + public List secrets() { + return this.secrets; + } + + /** + * Set the secrets property: Collection of secrets used by a Container app. + * + * @param secrets the secrets value to set. + * @return the Configuration object itself. + */ + public Configuration withSecrets(List secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the + * Container app: <list><item>Multiple: multiple revisions can be active. If no value if provided, this + * is the default</item><item>Single: Only one revision can be active at a time. Revision weights can + * not be used in this mode</item></list>. + * + * @return the activeRevisionsMode value. + */ + public ActiveRevisionsMode activeRevisionsMode() { + return this.activeRevisionsMode; + } + + /** + * Set the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the + * Container app: <list><item>Multiple: multiple revisions can be active. If no value if provided, this + * is the default</item><item>Single: Only one revision can be active at a time. Revision weights can + * not be used in this mode</item></list>. + * + * @param activeRevisionsMode the activeRevisionsMode value to set. + * @return the Configuration object itself. + */ + public Configuration withActiveRevisionsMode(ActiveRevisionsMode activeRevisionsMode) { + this.activeRevisionsMode = activeRevisionsMode; + return this; + } + + /** + * Get the ingress property: Ingress configurations. + * + * @return the ingress value. + */ + public Ingress ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Ingress configurations. + * + * @param ingress the ingress value to set. + * @return the Configuration object itself. + */ + public Configuration withIngress(Ingress ingress) { + this.ingress = ingress; + return this; + } + + /** + * Get the registries property: Collection of private container registry credentials for containers used by the + * Container app. + * + * @return the registries value. + */ + public List registries() { + return this.registries; + } + + /** + * Set the registries property: Collection of private container registry credentials for containers used by the + * Container app. + * + * @param registries the registries value to set. + * @return the Configuration object itself. + */ + public Configuration withRegistries(List registries) { + this.registries = registries; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (secrets() != null) { + secrets().forEach(e -> e.validate()); + } + if (ingress() != null) { + ingress().validate(); + } + if (registries() != null) { + registries().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnStringInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnStringInfo.java new file mode 100644 index 0000000000000..3892a0c9f898c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnStringInfo.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Database connection string information. */ +@Fluent +public final class ConnStringInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnStringInfo.class); + + /* + * Name of connection string. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Connection string value. + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /* + * Type of database. + */ + @JsonProperty(value = "type") + private ConnectionStringType type; + + /** + * Get the name property: Name of connection string. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of connection string. + * + * @param name the name value to set. + * @return the ConnStringInfo object itself. + */ + public ConnStringInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get the connectionString property: Connection string value. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString property: Connection string value. + * + * @param connectionString the connectionString value to set. + * @return the ConnStringInfo object itself. + */ + public ConnStringInfo withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get the type property: Type of database. + * + * @return the type value. + */ + public ConnectionStringType type() { + return this.type; + } + + /** + * Set the type property: Type of database. + * + * @param type the type value to set. + * @return the ConnStringInfo object itself. + */ + public ConnStringInfo withType(ConnectionStringType 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnStringValueTypePair.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnStringValueTypePair.java new file mode 100644 index 0000000000000..684b5b5fedd48 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnStringValueTypePair.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Database connection string value to type pair. */ +@Fluent +public final class ConnStringValueTypePair { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ConnStringValueTypePair.class); + + /* + * Value of pair. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /* + * Type of database. + */ + @JsonProperty(value = "type", required = true) + private ConnectionStringType type; + + /** + * Get the value property: Value of pair. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Value of pair. + * + * @param value the value value to set. + * @return the ConnStringValueTypePair object itself. + */ + public ConnStringValueTypePair withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the type property: Type of database. + * + * @return the type value. + */ + public ConnectionStringType type() { + return this.type; + } + + /** + * Set the type property: Type of database. + * + * @param type the type value to set. + * @return the ConnStringValueTypePair object itself. + */ + public ConnStringValueTypePair withType(ConnectionStringType type) { + this.type = type; + 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 ConnStringValueTypePair")); + } + if (type() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property type in model ConnStringValueTypePair")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnectionStringDictionary.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnectionStringDictionary.java new file mode 100644 index 0000000000000..cedb1a571efd6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnectionStringDictionary.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ConnectionStringDictionaryInner; +import java.util.Map; + +/** An immutable client-side representation of ConnectionStringDictionary. */ +public interface ConnectionStringDictionary { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the properties property: Connection strings. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ConnectionStringDictionaryInner + * object. + * + * @return the inner object. + */ + ConnectionStringDictionaryInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnectionStringType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnectionStringType.java new file mode 100644 index 0000000000000..6514eacb563c7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ConnectionStringType.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ConnectionStringType. */ +public enum ConnectionStringType { + /** Enum value MySql. */ + MY_SQL("MySql"), + + /** Enum value SQLServer. */ + SQLSERVER("SQLServer"), + + /** Enum value SQLAzure. */ + SQLAZURE("SQLAzure"), + + /** Enum value Custom. */ + CUSTOM("Custom"), + + /** Enum value NotificationHub. */ + NOTIFICATION_HUB("NotificationHub"), + + /** Enum value ServiceBus. */ + SERVICE_BUS("ServiceBus"), + + /** Enum value EventHub. */ + EVENT_HUB("EventHub"), + + /** Enum value ApiHub. */ + API_HUB("ApiHub"), + + /** Enum value DocDb. */ + DOC_DB("DocDb"), + + /** Enum value RedisCache. */ + REDIS_CACHE("RedisCache"), + + /** Enum value PostgreSQL. */ + POSTGRE_SQL("PostgreSQL"); + + /** The actual serialized value for a ConnectionStringType instance. */ + private final String value; + + ConnectionStringType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ConnectionStringType instance. + * + * @param value the serialized value to parse. + * @return the parsed ConnectionStringType object, or null if unable to parse. + */ + @JsonCreator + public static ConnectionStringType fromString(String value) { + ConnectionStringType[] items = ConnectionStringType.values(); + for (ConnectionStringType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Contact.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Contact.java new file mode 100644 index 0000000000000..a9369eb311512 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Contact.java @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information + * is made publicly available through the Whois directories as per ICANN requirements. + */ +@Fluent +public final class Contact { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Contact.class); + + /* + * Mailing address. + */ + @JsonProperty(value = "addressMailing") + private Address addressMailing; + + /* + * Email address. + */ + @JsonProperty(value = "email", required = true) + private String email; + + /* + * Fax number. + */ + @JsonProperty(value = "fax") + private String fax; + + /* + * Job title. + */ + @JsonProperty(value = "jobTitle") + private String jobTitle; + + /* + * First name. + */ + @JsonProperty(value = "nameFirst", required = true) + private String nameFirst; + + /* + * Last name. + */ + @JsonProperty(value = "nameLast", required = true) + private String nameLast; + + /* + * Middle name. + */ + @JsonProperty(value = "nameMiddle") + private String nameMiddle; + + /* + * Organization contact belongs to. + */ + @JsonProperty(value = "organization") + private String organization; + + /* + * Phone number. + */ + @JsonProperty(value = "phone", required = true) + private String phone; + + /** + * Get the addressMailing property: Mailing address. + * + * @return the addressMailing value. + */ + public Address addressMailing() { + return this.addressMailing; + } + + /** + * Set the addressMailing property: Mailing address. + * + * @param addressMailing the addressMailing value to set. + * @return the Contact object itself. + */ + public Contact withAddressMailing(Address addressMailing) { + this.addressMailing = addressMailing; + return this; + } + + /** + * Get the email property: Email address. + * + * @return the email value. + */ + public String email() { + return this.email; + } + + /** + * Set the email property: Email address. + * + * @param email the email value to set. + * @return the Contact object itself. + */ + public Contact withEmail(String email) { + this.email = email; + return this; + } + + /** + * Get the fax property: Fax number. + * + * @return the fax value. + */ + public String fax() { + return this.fax; + } + + /** + * Set the fax property: Fax number. + * + * @param fax the fax value to set. + * @return the Contact object itself. + */ + public Contact withFax(String fax) { + this.fax = fax; + return this; + } + + /** + * Get the jobTitle property: Job title. + * + * @return the jobTitle value. + */ + public String jobTitle() { + return this.jobTitle; + } + + /** + * Set the jobTitle property: Job title. + * + * @param jobTitle the jobTitle value to set. + * @return the Contact object itself. + */ + public Contact withJobTitle(String jobTitle) { + this.jobTitle = jobTitle; + return this; + } + + /** + * Get the nameFirst property: First name. + * + * @return the nameFirst value. + */ + public String nameFirst() { + return this.nameFirst; + } + + /** + * Set the nameFirst property: First name. + * + * @param nameFirst the nameFirst value to set. + * @return the Contact object itself. + */ + public Contact withNameFirst(String nameFirst) { + this.nameFirst = nameFirst; + return this; + } + + /** + * Get the nameLast property: Last name. + * + * @return the nameLast value. + */ + public String nameLast() { + return this.nameLast; + } + + /** + * Set the nameLast property: Last name. + * + * @param nameLast the nameLast value to set. + * @return the Contact object itself. + */ + public Contact withNameLast(String nameLast) { + this.nameLast = nameLast; + return this; + } + + /** + * Get the nameMiddle property: Middle name. + * + * @return the nameMiddle value. + */ + public String nameMiddle() { + return this.nameMiddle; + } + + /** + * Set the nameMiddle property: Middle name. + * + * @param nameMiddle the nameMiddle value to set. + * @return the Contact object itself. + */ + public Contact withNameMiddle(String nameMiddle) { + this.nameMiddle = nameMiddle; + return this; + } + + /** + * Get the organization property: Organization contact belongs to. + * + * @return the organization value. + */ + public String organization() { + return this.organization; + } + + /** + * Set the organization property: Organization contact belongs to. + * + * @param organization the organization value to set. + * @return the Contact object itself. + */ + public Contact withOrganization(String organization) { + this.organization = organization; + return this; + } + + /** + * Get the phone property: Phone number. + * + * @return the phone value. + */ + public String phone() { + return this.phone; + } + + /** + * Set the phone property: Phone number. + * + * @param phone the phone value to set. + * @return the Contact object itself. + */ + public Contact withPhone(String phone) { + this.phone = phone; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (addressMailing() != null) { + addressMailing().validate(); + } + if (email() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property email in model Contact")); + } + if (nameFirst() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property nameFirst in model Contact")); + } + if (nameLast() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property nameLast in model Contact")); + } + if (phone() == null) { + throw logger + .logExceptionAsError(new IllegalArgumentException("Missing required property phone in model Contact")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Container.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Container.java new file mode 100644 index 0000000000000..569823a29848d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Container.java @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App container definition. */ +@Fluent +public final class Container { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Container.class); + + /* + * 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; + + /** + * 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 Container object itself. + */ + public Container 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 Container object itself. + */ + public Container 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 Container object itself. + */ + public Container 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 Container object itself. + */ + public Container 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 Container object itself. + */ + public Container 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 Container object itself. + */ + public Container withResources(ContainerResources resources) { + this.resources = resources; + 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(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerApp.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerApp.java new file mode 100644 index 0000000000000..56da15a4440e7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerApp.java @@ -0,0 +1,320 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContainerAppInner; +import java.util.Map; + +/** An immutable client-side representation of ContainerApp. */ +public interface ContainerApp { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the provisioningState property: Provisioning state of the Container App. + * + * @return the provisioningState value. + */ + ContainerAppProvisioningState provisioningState(); + + /** + * Gets the kubeEnvironmentId property: Resource ID of the Container App's KubeEnvironment. + * + * @return the kubeEnvironmentId value. + */ + String kubeEnvironmentId(); + + /** + * Gets the latestRevisionName property: Name of the latest revision of the Container App. + * + * @return the latestRevisionName value. + */ + String latestRevisionName(); + + /** + * Gets the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. + * + * @return the latestRevisionFqdn value. + */ + String latestRevisionFqdn(); + + /** + * Gets the configuration property: Non versioned Container App configuration properties. + * + * @return the configuration value. + */ + Configuration configuration(); + + /** + * Gets the template property: Container App versioned application definition. + * + * @return the template value. + */ + Template template(); + + /** + * Gets the 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.ContainerAppInner object. + * + * @return the inner object. + */ + ContainerAppInner innerModel(); + + /** The entirety of the ContainerApp definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The ContainerApp definition stages. */ + interface DefinitionStages { + /** The first stage of the ContainerApp definition. */ + interface Blank extends WithLocation { + } + /** The stage of the ContainerApp definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + 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 ContainerApp definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the ContainerApp definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithKind, + DefinitionStages.WithKubeEnvironmentId, + DefinitionStages.WithConfiguration, + DefinitionStages.WithTemplate { + /** + * Executes the create request. + * + * @return the created resource. + */ + ContainerApp create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ContainerApp create(Context context); + } + /** The stage of the ContainerApp definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + /** The stage of the ContainerApp definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the ContainerApp definition allowing to specify kubeEnvironmentId. */ + interface WithKubeEnvironmentId { + /** + * Specifies the kubeEnvironmentId property: Resource ID of the Container App's KubeEnvironment.. + * + * @param kubeEnvironmentId Resource ID of the Container App's KubeEnvironment. + * @return the next definition stage. + */ + WithCreate withKubeEnvironmentId(String kubeEnvironmentId); + } + /** The stage of the ContainerApp definition allowing to specify configuration. */ + interface WithConfiguration { + /** + * Specifies the configuration property: Non versioned Container App configuration properties.. + * + * @param configuration Non versioned Container App configuration properties. + * @return the next definition stage. + */ + WithCreate withConfiguration(Configuration configuration); + } + /** The stage of the ContainerApp definition allowing to specify template. */ + interface WithTemplate { + /** + * Specifies the template property: Container App versioned application definition.. + * + * @param template Container App versioned application definition. + * @return the next definition stage. + */ + WithCreate withTemplate(Template template); + } + } + /** + * Begins update for the ContainerApp resource. + * + * @return the stage of resource update. + */ + ContainerApp.Update update(); + + /** The template for ContainerApp update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithKind, + UpdateStages.WithConfiguration, + UpdateStages.WithTemplate { + /** + * Executes the update request. + * + * @return the updated resource. + */ + ContainerApp apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + ContainerApp apply(Context context); + } + /** The ContainerApp update stages. */ + interface UpdateStages { + /** The stage of the ContainerApp update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + /** The stage of the ContainerApp update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the ContainerApp update allowing to specify configuration. */ + interface WithConfiguration { + /** + * Specifies the configuration property: Non versioned Container App configuration properties.. + * + * @param configuration Non versioned Container App configuration properties. + * @return the next definition stage. + */ + Update withConfiguration(Configuration configuration); + } + /** The stage of the ContainerApp update allowing to specify template. */ + interface WithTemplate { + /** + * Specifies the template property: Container App versioned application definition.. + * + * @param template Container App versioned application definition. + * @return the next definition stage. + */ + Update withTemplate(Template template); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + ContainerApp refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + ContainerApp refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppCollection.java new file mode 100644 index 0000000000000..08b2fcb106f5a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContainerAppInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App collection ARM resource. */ +@Fluent +public final class ContainerAppCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerAppCollection.class); + + /* + * 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; + + /** + * 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 ContainerAppCollection object itself. + */ + public ContainerAppCollection 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 ContainerAppCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppProvisioningState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppProvisioningState.java new file mode 100644 index 0000000000000..f2d736fbd3527 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppProvisioningState.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ContainerAppProvisioningState. */ +public final class ContainerAppProvisioningState extends ExpandableStringEnum { + /** Static value InProgress for ContainerAppProvisioningState. */ + public static final ContainerAppProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** Static value Succeeded for ContainerAppProvisioningState. */ + public static final ContainerAppProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ContainerAppProvisioningState. */ + public static final ContainerAppProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ContainerAppProvisioningState. */ + public static final ContainerAppProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates or finds a ContainerAppProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerAppProvisioningState. + */ + @JsonCreator + public static ContainerAppProvisioningState fromString(String name) { + return fromString(name, ContainerAppProvisioningState.class); + } + + /** @return known ContainerAppProvisioningState values. */ + public static Collection values() { + return values(ContainerAppProvisioningState.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppSecret.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppSecret.java new file mode 100644 index 0000000000000..de5aac1180d16 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppSecret.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container App Secret. */ +@Immutable +public final class ContainerAppSecret { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerAppSecret.class); + + /* + * Secret Name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Secret Value. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** + * Get the name property: Secret Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: Secret Value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerApps.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerApps.java new file mode 100644 index 0000000000000..6234f551fb818 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerApps.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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 ContainerApps. */ +public interface ContainerApps { + /** + * Get the Container Apps in a given subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + PagedIterable list(); + + /** + * Get the Container Apps in a given subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given subscription. + */ + PagedIterable list(Context context); + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get the Container Apps in a given resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Container Apps in a given resource group. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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 getByResourceGroup(String resourceGroupName, String name); + + /** + * Get the properties of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name 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.appservice.generated.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 name, Context context); + + /** + * List secrets for a container app. + * + * @param name Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + SecretsCollection listSecrets(String name); + + /** + * List secrets for a container app. + * + * @param name 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.appservice.generated.models.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. + */ + Response listSecretsWithResponse(String name, Context context); + + /** + * Get the properties of a Container App. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App. + */ + ContainerApp getById(String id); + + /** + * Get the properties of a Container App. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.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. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Delete a Container App. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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); + + /** + * Description for Delete a Container App. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 ContainerApp resource. + * + * @param name resource name. + * @return the first stage of the new ContainerApp definition. + */ + ContainerApp.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppsConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppsConfiguration.java new file mode 100644 index 0000000000000..b171e1bee7490 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppsConfiguration.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerAppsConfiguration model. */ +@Fluent +public final class ContainerAppsConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerAppsConfiguration.class); + + /* + * Azure Monitor instrumentation key used by Dapr to export Service to + * Service communication telemetry + */ + @JsonProperty(value = "daprAIInstrumentationKey") + private String daprAIInstrumentationKey; + + /* + * IP range in CIDR notation that can be reserved for environment + * infrastructure IP addresses. It must not overlap with any other Subnet + * 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 + */ + @JsonProperty(value = "platformReservedDnsIP") + private String platformReservedDnsIp; + + /* + * Resource ID of a subnet for control plane infrastructure components. + * This subnet must be in the same VNET as the subnet defined in + * appSubnetResourceId. Must not overlap with the IP range defined in + * platformReservedCidr, if defined. + */ + @JsonProperty(value = "controlPlaneSubnetResourceId") + private String controlPlaneSubnetResourceId; + + /* + * Resource ID of a subnet for control plane infrastructure components. + * This subnet must be in the same VNET as the subnet defined in + * appSubnetResourceId. Must not overlap with the IP range defined in + * platformReservedCidr, if defined. + */ + @JsonProperty(value = "appSubnetResourceId") + private String appSubnetResourceId; + + /* + * CIDR notation IP range assigned to the Docker bridge network. It must + * not overlap with any Subnet IP ranges or the IP range defined in + * platformReservedCidr, if defined. + */ + @JsonProperty(value = "dockerBridgeCidr") + private String dockerBridgeCidr; + + /** + * Get the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to + * Service communication telemetry. + * + * @return the daprAIInstrumentationKey value. + */ + public String daprAIInstrumentationKey() { + return this.daprAIInstrumentationKey; + } + + /** + * Set the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to + * Service communication telemetry. + * + * @param daprAIInstrumentationKey the daprAIInstrumentationKey value to set. + * @return the ContainerAppsConfiguration object itself. + */ + public ContainerAppsConfiguration withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { + this.daprAIInstrumentationKey = daprAIInstrumentationKey; + return this; + } + + /** + * Get the platformReservedCidr property: IP range in CIDR notation that can be reserved for environment + * infrastructure IP addresses. It must not overlap with any other Subnet IP ranges. + * + * @return the platformReservedCidr value. + */ + public String platformReservedCidr() { + return this.platformReservedCidr; + } + + /** + * Set the platformReservedCidr property: IP range in CIDR notation that can be reserved for environment + * infrastructure IP addresses. It must not overlap with any other Subnet IP ranges. + * + * @param platformReservedCidr the platformReservedCidr value to set. + * @return the ContainerAppsConfiguration object itself. + */ + public ContainerAppsConfiguration withPlatformReservedCidr(String platformReservedCidr) { + this.platformReservedCidr = platformReservedCidr; + return this; + } + + /** + * Get the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that will + * be reserved for the internal DNS server. + * + * @return the platformReservedDnsIp value. + */ + public String platformReservedDnsIp() { + return this.platformReservedDnsIp; + } + + /** + * Set the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that will + * be reserved for the internal DNS server. + * + * @param platformReservedDnsIp the platformReservedDnsIp value to set. + * @return the ContainerAppsConfiguration object itself. + */ + public ContainerAppsConfiguration withPlatformReservedDnsIp(String platformReservedDnsIp) { + this.platformReservedDnsIp = platformReservedDnsIp; + return this; + } + + /** + * Get the controlPlaneSubnetResourceId property: Resource ID of a subnet for control plane infrastructure + * components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap + * with the IP range defined in platformReservedCidr, if defined. + * + * @return the controlPlaneSubnetResourceId value. + */ + public String controlPlaneSubnetResourceId() { + return this.controlPlaneSubnetResourceId; + } + + /** + * Set the controlPlaneSubnetResourceId property: Resource ID of a subnet for control plane infrastructure + * components. This subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap + * with the IP range defined in platformReservedCidr, if defined. + * + * @param controlPlaneSubnetResourceId the controlPlaneSubnetResourceId value to set. + * @return the ContainerAppsConfiguration object itself. + */ + public ContainerAppsConfiguration withControlPlaneSubnetResourceId(String controlPlaneSubnetResourceId) { + this.controlPlaneSubnetResourceId = controlPlaneSubnetResourceId; + return this; + } + + /** + * Get the appSubnetResourceId property: Resource ID of a subnet for control plane infrastructure components. This + * subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range + * defined in platformReservedCidr, if defined. + * + * @return the appSubnetResourceId value. + */ + public String appSubnetResourceId() { + return this.appSubnetResourceId; + } + + /** + * Set the appSubnetResourceId property: Resource ID of a subnet for control plane infrastructure components. This + * subnet must be in the same VNET as the subnet defined in appSubnetResourceId. Must not overlap with the IP range + * defined in platformReservedCidr, if defined. + * + * @param appSubnetResourceId the appSubnetResourceId value to set. + * @return the ContainerAppsConfiguration object itself. + */ + public ContainerAppsConfiguration withAppSubnetResourceId(String appSubnetResourceId) { + this.appSubnetResourceId = appSubnetResourceId; + return this; + } + + /** + * Get the dockerBridgeCidr property: CIDR notation IP range assigned to the Docker bridge network. It must not + * overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined. + * + * @return the dockerBridgeCidr value. + */ + public String dockerBridgeCidr() { + return this.dockerBridgeCidr; + } + + /** + * Set the dockerBridgeCidr property: CIDR notation IP range assigned to the Docker bridge network. It must not + * overlap with any Subnet IP ranges or the IP range defined in platformReservedCidr, if defined. + * + * @param dockerBridgeCidr the dockerBridgeCidr value to set. + * @return the ContainerAppsConfiguration object itself. + */ + public ContainerAppsConfiguration withDockerBridgeCidr(String dockerBridgeCidr) { + this.dockerBridgeCidr = dockerBridgeCidr; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppsRevisions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppsRevisions.java new file mode 100644 index 0000000000000..9a2cb1bd46165 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerAppsRevisions.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.appservice.generated.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 ContainerAppsRevisions. */ +public interface ContainerAppsRevisions { + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException 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. + */ + PagedIterable listRevisions(String resourceGroupName, String containerAppName); + + /** + * Get the Revisions for a given Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App for which Revisions are needed. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException 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. + */ + PagedIterable listRevisions(String resourceGroupName, String containerAppName, Context context); + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 name); + + /** + * Get a revision of a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name 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.appservice.generated.models.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. + */ + Response getRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context); + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 activateRevision(String resourceGroupName, String containerAppName, String name); + + /** + * Activates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to activate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response activateRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context); + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deactivateRevision(String resourceGroupName, String containerAppName, String name); + + /** + * Deactivates a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to deactivate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deactivateRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context); + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param containerAppName Name of the Container App. + * @param name Name of the Container App Revision to restart. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response restartRevisionWithResponse( + String resourceGroupName, String containerAppName, String name, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerCpuStatistics.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerCpuStatistics.java new file mode 100644 index 0000000000000..755a79f1c3550 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerCpuStatistics.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerCpuStatistics model. */ +@Fluent +public final class ContainerCpuStatistics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerCpuStatistics.class); + + /* + * The cpuUsage property. + */ + @JsonProperty(value = "cpuUsage") + private ContainerCpuUsage cpuUsage; + + /* + * The systemCpuUsage property. + */ + @JsonProperty(value = "systemCpuUsage") + private Long systemCpuUsage; + + /* + * The onlineCpuCount property. + */ + @JsonProperty(value = "onlineCpuCount") + private Integer onlineCpuCount; + + /* + * The throttlingData property. + */ + @JsonProperty(value = "throttlingData") + private ContainerThrottlingData throttlingData; + + /** + * Get the cpuUsage property: The cpuUsage property. + * + * @return the cpuUsage value. + */ + public ContainerCpuUsage cpuUsage() { + return this.cpuUsage; + } + + /** + * Set the cpuUsage property: The cpuUsage property. + * + * @param cpuUsage the cpuUsage value to set. + * @return the ContainerCpuStatistics object itself. + */ + public ContainerCpuStatistics withCpuUsage(ContainerCpuUsage cpuUsage) { + this.cpuUsage = cpuUsage; + return this; + } + + /** + * Get the systemCpuUsage property: The systemCpuUsage property. + * + * @return the systemCpuUsage value. + */ + public Long systemCpuUsage() { + return this.systemCpuUsage; + } + + /** + * Set the systemCpuUsage property: The systemCpuUsage property. + * + * @param systemCpuUsage the systemCpuUsage value to set. + * @return the ContainerCpuStatistics object itself. + */ + public ContainerCpuStatistics withSystemCpuUsage(Long systemCpuUsage) { + this.systemCpuUsage = systemCpuUsage; + return this; + } + + /** + * Get the onlineCpuCount property: The onlineCpuCount property. + * + * @return the onlineCpuCount value. + */ + public Integer onlineCpuCount() { + return this.onlineCpuCount; + } + + /** + * Set the onlineCpuCount property: The onlineCpuCount property. + * + * @param onlineCpuCount the onlineCpuCount value to set. + * @return the ContainerCpuStatistics object itself. + */ + public ContainerCpuStatistics withOnlineCpuCount(Integer onlineCpuCount) { + this.onlineCpuCount = onlineCpuCount; + return this; + } + + /** + * Get the throttlingData property: The throttlingData property. + * + * @return the throttlingData value. + */ + public ContainerThrottlingData throttlingData() { + return this.throttlingData; + } + + /** + * Set the throttlingData property: The throttlingData property. + * + * @param throttlingData the throttlingData value to set. + * @return the ContainerCpuStatistics object itself. + */ + public ContainerCpuStatistics withThrottlingData(ContainerThrottlingData throttlingData) { + this.throttlingData = throttlingData; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (cpuUsage() != null) { + cpuUsage().validate(); + } + if (throttlingData() != null) { + throttlingData().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerCpuUsage.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerCpuUsage.java new file mode 100644 index 0000000000000..49080a3ae82e2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerCpuUsage.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ContainerCpuUsage model. */ +@Fluent +public final class ContainerCpuUsage { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerCpuUsage.class); + + /* + * The totalUsage property. + */ + @JsonProperty(value = "totalUsage") + private Long totalUsage; + + /* + * The perCpuUsage property. + */ + @JsonProperty(value = "perCpuUsage") + private List perCpuUsage; + + /* + * The kernelModeUsage property. + */ + @JsonProperty(value = "kernelModeUsage") + private Long kernelModeUsage; + + /* + * The userModeUsage property. + */ + @JsonProperty(value = "userModeUsage") + private Long userModeUsage; + + /** + * Get the totalUsage property: The totalUsage property. + * + * @return the totalUsage value. + */ + public Long totalUsage() { + return this.totalUsage; + } + + /** + * Set the totalUsage property: The totalUsage property. + * + * @param totalUsage the totalUsage value to set. + * @return the ContainerCpuUsage object itself. + */ + public ContainerCpuUsage withTotalUsage(Long totalUsage) { + this.totalUsage = totalUsage; + return this; + } + + /** + * Get the perCpuUsage property: The perCpuUsage property. + * + * @return the perCpuUsage value. + */ + public List perCpuUsage() { + return this.perCpuUsage; + } + + /** + * Set the perCpuUsage property: The perCpuUsage property. + * + * @param perCpuUsage the perCpuUsage value to set. + * @return the ContainerCpuUsage object itself. + */ + public ContainerCpuUsage withPerCpuUsage(List perCpuUsage) { + this.perCpuUsage = perCpuUsage; + return this; + } + + /** + * Get the kernelModeUsage property: The kernelModeUsage property. + * + * @return the kernelModeUsage value. + */ + public Long kernelModeUsage() { + return this.kernelModeUsage; + } + + /** + * Set the kernelModeUsage property: The kernelModeUsage property. + * + * @param kernelModeUsage the kernelModeUsage value to set. + * @return the ContainerCpuUsage object itself. + */ + public ContainerCpuUsage withKernelModeUsage(Long kernelModeUsage) { + this.kernelModeUsage = kernelModeUsage; + return this; + } + + /** + * Get the userModeUsage property: The userModeUsage property. + * + * @return the userModeUsage value. + */ + public Long userModeUsage() { + return this.userModeUsage; + } + + /** + * Set the userModeUsage property: The userModeUsage property. + * + * @param userModeUsage the userModeUsage value to set. + * @return the ContainerCpuUsage object itself. + */ + public ContainerCpuUsage withUserModeUsage(Long userModeUsage) { + this.userModeUsage = userModeUsage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerInfo.java new file mode 100644 index 0000000000000..7953de6a4b73e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerInfo.java @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The ContainerInfo model. */ +@Fluent +public final class ContainerInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerInfo.class); + + /* + * The currentTimeStamp property. + */ + @JsonProperty(value = "currentTimeStamp") + private OffsetDateTime currentTimestamp; + + /* + * The previousTimeStamp property. + */ + @JsonProperty(value = "previousTimeStamp") + private OffsetDateTime previousTimestamp; + + /* + * The currentCpuStats property. + */ + @JsonProperty(value = "currentCpuStats") + private ContainerCpuStatistics currentCpuStats; + + /* + * The previousCpuStats property. + */ + @JsonProperty(value = "previousCpuStats") + private ContainerCpuStatistics previousCpuStats; + + /* + * The memoryStats property. + */ + @JsonProperty(value = "memoryStats") + private ContainerMemoryStatistics memoryStats; + + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The id property. + */ + @JsonProperty(value = "id") + private String id; + + /* + * The eth0 property. + */ + @JsonProperty(value = "eth0") + private ContainerNetworkInterfaceStatistics eth0; + + /** + * Get the currentTimestamp property: The currentTimeStamp property. + * + * @return the currentTimestamp value. + */ + public OffsetDateTime currentTimestamp() { + return this.currentTimestamp; + } + + /** + * Set the currentTimestamp property: The currentTimeStamp property. + * + * @param currentTimestamp the currentTimestamp value to set. + * @return the ContainerInfo object itself. + */ + public ContainerInfo withCurrentTimestamp(OffsetDateTime currentTimestamp) { + this.currentTimestamp = currentTimestamp; + return this; + } + + /** + * Get the previousTimestamp property: The previousTimeStamp property. + * + * @return the previousTimestamp value. + */ + public OffsetDateTime previousTimestamp() { + return this.previousTimestamp; + } + + /** + * Set the previousTimestamp property: The previousTimeStamp property. + * + * @param previousTimestamp the previousTimestamp value to set. + * @return the ContainerInfo object itself. + */ + public ContainerInfo withPreviousTimestamp(OffsetDateTime previousTimestamp) { + this.previousTimestamp = previousTimestamp; + return this; + } + + /** + * Get the currentCpuStats property: The currentCpuStats property. + * + * @return the currentCpuStats value. + */ + public ContainerCpuStatistics currentCpuStats() { + return this.currentCpuStats; + } + + /** + * Set the currentCpuStats property: The currentCpuStats property. + * + * @param currentCpuStats the currentCpuStats value to set. + * @return the ContainerInfo object itself. + */ + public ContainerInfo withCurrentCpuStats(ContainerCpuStatistics currentCpuStats) { + this.currentCpuStats = currentCpuStats; + return this; + } + + /** + * Get the previousCpuStats property: The previousCpuStats property. + * + * @return the previousCpuStats value. + */ + public ContainerCpuStatistics previousCpuStats() { + return this.previousCpuStats; + } + + /** + * Set the previousCpuStats property: The previousCpuStats property. + * + * @param previousCpuStats the previousCpuStats value to set. + * @return the ContainerInfo object itself. + */ + public ContainerInfo withPreviousCpuStats(ContainerCpuStatistics previousCpuStats) { + this.previousCpuStats = previousCpuStats; + return this; + } + + /** + * Get the memoryStats property: The memoryStats property. + * + * @return the memoryStats value. + */ + public ContainerMemoryStatistics memoryStats() { + return this.memoryStats; + } + + /** + * Set the memoryStats property: The memoryStats property. + * + * @param memoryStats the memoryStats value to set. + * @return the ContainerInfo object itself. + */ + public ContainerInfo withMemoryStats(ContainerMemoryStatistics memoryStats) { + this.memoryStats = memoryStats; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the ContainerInfo object itself. + */ + public ContainerInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The id property. + * + * @param id the id value to set. + * @return the ContainerInfo object itself. + */ + public ContainerInfo withId(String id) { + this.id = id; + return this; + } + + /** + * Get the eth0 property: The eth0 property. + * + * @return the eth0 value. + */ + public ContainerNetworkInterfaceStatistics eth0() { + return this.eth0; + } + + /** + * Set the eth0 property: The eth0 property. + * + * @param eth0 the eth0 value to set. + * @return the ContainerInfo object itself. + */ + public ContainerInfo withEth0(ContainerNetworkInterfaceStatistics eth0) { + this.eth0 = eth0; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (currentCpuStats() != null) { + currentCpuStats().validate(); + } + if (previousCpuStats() != null) { + previousCpuStats().validate(); + } + if (memoryStats() != null) { + memoryStats().validate(); + } + if (eth0() != null) { + eth0().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerMemoryStatistics.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerMemoryStatistics.java new file mode 100644 index 0000000000000..9b86853cb0589 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerMemoryStatistics.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerMemoryStatistics model. */ +@Fluent +public final class ContainerMemoryStatistics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerMemoryStatistics.class); + + /* + * The usage property. + */ + @JsonProperty(value = "usage") + private Long usage; + + /* + * The maxUsage property. + */ + @JsonProperty(value = "maxUsage") + private Long maxUsage; + + /* + * The limit property. + */ + @JsonProperty(value = "limit") + private Long limit; + + /** + * Get the usage property: The usage property. + * + * @return the usage value. + */ + public Long usage() { + return this.usage; + } + + /** + * Set the usage property: The usage property. + * + * @param usage the usage value to set. + * @return the ContainerMemoryStatistics object itself. + */ + public ContainerMemoryStatistics withUsage(Long usage) { + this.usage = usage; + return this; + } + + /** + * Get the maxUsage property: The maxUsage property. + * + * @return the maxUsage value. + */ + public Long maxUsage() { + return this.maxUsage; + } + + /** + * Set the maxUsage property: The maxUsage property. + * + * @param maxUsage the maxUsage value to set. + * @return the ContainerMemoryStatistics object itself. + */ + public ContainerMemoryStatistics withMaxUsage(Long maxUsage) { + this.maxUsage = maxUsage; + return this; + } + + /** + * Get the limit property: The limit property. + * + * @return the limit value. + */ + public Long limit() { + return this.limit; + } + + /** + * Set the limit property: The limit property. + * + * @param limit the limit value to set. + * @return the ContainerMemoryStatistics object itself. + */ + public ContainerMemoryStatistics withLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerNetworkInterfaceStatistics.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerNetworkInterfaceStatistics.java new file mode 100644 index 0000000000000..50c309aea2e9c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerNetworkInterfaceStatistics.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerNetworkInterfaceStatistics model. */ +@Fluent +public final class ContainerNetworkInterfaceStatistics { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerNetworkInterfaceStatistics.class); + + /* + * The rxBytes property. + */ + @JsonProperty(value = "rxBytes") + private Long rxBytes; + + /* + * The rxPackets property. + */ + @JsonProperty(value = "rxPackets") + private Long rxPackets; + + /* + * The rxErrors property. + */ + @JsonProperty(value = "rxErrors") + private Long rxErrors; + + /* + * The rxDropped property. + */ + @JsonProperty(value = "rxDropped") + private Long rxDropped; + + /* + * The txBytes property. + */ + @JsonProperty(value = "txBytes") + private Long txBytes; + + /* + * The txPackets property. + */ + @JsonProperty(value = "txPackets") + private Long txPackets; + + /* + * The txErrors property. + */ + @JsonProperty(value = "txErrors") + private Long txErrors; + + /* + * The txDropped property. + */ + @JsonProperty(value = "txDropped") + private Long txDropped; + + /** + * Get the rxBytes property: The rxBytes property. + * + * @return the rxBytes value. + */ + public Long rxBytes() { + return this.rxBytes; + } + + /** + * Set the rxBytes property: The rxBytes property. + * + * @param rxBytes the rxBytes value to set. + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withRxBytes(Long rxBytes) { + this.rxBytes = rxBytes; + return this; + } + + /** + * Get the rxPackets property: The rxPackets property. + * + * @return the rxPackets value. + */ + public Long rxPackets() { + return this.rxPackets; + } + + /** + * Set the rxPackets property: The rxPackets property. + * + * @param rxPackets the rxPackets value to set. + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withRxPackets(Long rxPackets) { + this.rxPackets = rxPackets; + return this; + } + + /** + * Get the rxErrors property: The rxErrors property. + * + * @return the rxErrors value. + */ + public Long rxErrors() { + return this.rxErrors; + } + + /** + * Set the rxErrors property: The rxErrors property. + * + * @param rxErrors the rxErrors value to set. + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withRxErrors(Long rxErrors) { + this.rxErrors = rxErrors; + return this; + } + + /** + * Get the rxDropped property: The rxDropped property. + * + * @return the rxDropped value. + */ + public Long rxDropped() { + return this.rxDropped; + } + + /** + * Set the rxDropped property: The rxDropped property. + * + * @param rxDropped the rxDropped value to set. + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withRxDropped(Long rxDropped) { + this.rxDropped = rxDropped; + return this; + } + + /** + * Get the txBytes property: The txBytes property. + * + * @return the txBytes value. + */ + public Long txBytes() { + return this.txBytes; + } + + /** + * Set the txBytes property: The txBytes property. + * + * @param txBytes the txBytes value to set. + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withTxBytes(Long txBytes) { + this.txBytes = txBytes; + return this; + } + + /** + * Get the txPackets property: The txPackets property. + * + * @return the txPackets value. + */ + public Long txPackets() { + return this.txPackets; + } + + /** + * Set the txPackets property: The txPackets property. + * + * @param txPackets the txPackets value to set. + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withTxPackets(Long txPackets) { + this.txPackets = txPackets; + return this; + } + + /** + * Get the txErrors property: The txErrors property. + * + * @return the txErrors value. + */ + public Long txErrors() { + return this.txErrors; + } + + /** + * Set the txErrors property: The txErrors property. + * + * @param txErrors the txErrors value to set. + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withTxErrors(Long txErrors) { + this.txErrors = txErrors; + return this; + } + + /** + * Get the txDropped property: The txDropped property. + * + * @return the txDropped value. + */ + public Long txDropped() { + return this.txDropped; + } + + /** + * Set the txDropped property: The txDropped property. + * + * @param txDropped the txDropped value to set. + * @return the ContainerNetworkInterfaceStatistics object itself. + */ + public ContainerNetworkInterfaceStatistics withTxDropped(Long txDropped) { + this.txDropped = txDropped; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerResources.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerResources.java new file mode 100644 index 0000000000000..e0fdaea5f3bc8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerResources.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container App container resource requirements. */ +@Fluent +public final class ContainerResources { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerResources.class); + + /* + * Required CPU in cores, e.g. 0.5 + */ + @JsonProperty(value = "cpu") + private Double cpu; + + /* + * Required memory, e.g. "250Mb" + */ + @JsonProperty(value = "memory") + private String memory; + + /** + * Get the cpu property: Required CPU in cores, e.g. 0.5. + * + * @return the cpu value. + */ + public Double cpu() { + return this.cpu; + } + + /** + * Set the cpu property: Required CPU in cores, e.g. 0.5. + * + * @param cpu the cpu value to set. + * @return the ContainerResources object itself. + */ + public ContainerResources withCpu(Double cpu) { + this.cpu = cpu; + return this; + } + + /** + * Get the memory property: Required memory, e.g. "250Mb". + * + * @return the memory value. + */ + public String memory() { + return this.memory; + } + + /** + * Set the memory property: Required memory, e.g. "250Mb". + * + * @param memory the memory value to set. + * @return the ContainerResources object itself. + */ + public ContainerResources withMemory(String memory) { + this.memory = memory; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerThrottlingData.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerThrottlingData.java new file mode 100644 index 0000000000000..db430df6ab063 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContainerThrottlingData.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ContainerThrottlingData model. */ +@Fluent +public final class ContainerThrottlingData { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContainerThrottlingData.class); + + /* + * The periods property. + */ + @JsonProperty(value = "periods") + private Integer periods; + + /* + * The throttledPeriods property. + */ + @JsonProperty(value = "throttledPeriods") + private Integer throttledPeriods; + + /* + * The throttledTime property. + */ + @JsonProperty(value = "throttledTime") + private Integer throttledTime; + + /** + * Get the periods property: The periods property. + * + * @return the periods value. + */ + public Integer periods() { + return this.periods; + } + + /** + * Set the periods property: The periods property. + * + * @param periods the periods value to set. + * @return the ContainerThrottlingData object itself. + */ + public ContainerThrottlingData withPeriods(Integer periods) { + this.periods = periods; + return this; + } + + /** + * Get the throttledPeriods property: The throttledPeriods property. + * + * @return the throttledPeriods value. + */ + public Integer throttledPeriods() { + return this.throttledPeriods; + } + + /** + * Set the throttledPeriods property: The throttledPeriods property. + * + * @param throttledPeriods the throttledPeriods value to set. + * @return the ContainerThrottlingData object itself. + */ + public ContainerThrottlingData withThrottledPeriods(Integer throttledPeriods) { + this.throttledPeriods = throttledPeriods; + return this; + } + + /** + * Get the throttledTime property: The throttledTime property. + * + * @return the throttledTime value. + */ + public Integer throttledTime() { + return this.throttledTime; + } + + /** + * Set the throttledTime property: The throttledTime property. + * + * @param throttledTime the throttledTime value to set. + * @return the ContainerThrottlingData object itself. + */ + public ContainerThrottlingData withThrottledTime(Integer throttledTime) { + this.throttledTime = throttledTime; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJob.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJob.java new file mode 100644 index 0000000000000..32f0db7ee27d4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJob.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ContinuousWebJobInner; +import java.util.Map; + +/** An immutable client-side representation of ContinuousWebJob. */ +public interface ContinuousWebJob { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the status property: Job status. + * + * @return the status value. + */ + ContinuousWebJobStatus status(); + + /** + * Gets the detailedStatus property: Detailed status. + * + * @return the detailedStatus value. + */ + String detailedStatus(); + + /** + * Gets the logUrl property: Log URL. + * + * @return the logUrl value. + */ + String logUrl(); + + /** + * Gets the runCommand property: Run command. + * + * @return the runCommand value. + */ + String runCommand(); + + /** + * Gets the url property: Job URL. + * + * @return the url value. + */ + String url(); + + /** + * Gets the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + String extraInfoUrl(); + + /** + * Gets the webJobType property: Job type. + * + * @return the webJobType value. + */ + WebJobType webJobType(); + + /** + * Gets the error property: Error information. + * + * @return the error value. + */ + String error(); + + /** + * Gets the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + Boolean usingSdk(); + + /** + * Gets the settings property: Job settings. + * + * @return the settings value. + */ + Map settings(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ContinuousWebJobInner object. + * + * @return the inner object. + */ + ContinuousWebJobInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJobCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJobCollection.java new file mode 100644 index 0000000000000..e62ac8ba1a4f0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJobCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ContinuousWebJobInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu continuous web job information elements. */ +@Fluent +public final class ContinuousWebJobCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ContinuousWebJobCollection.class); + + /* + * 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; + + /** + * 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 ContinuousWebJobCollection object itself. + */ + public ContinuousWebJobCollection 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 ContinuousWebJobCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJobStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJobStatus.java new file mode 100644 index 0000000000000..662345c09c7b6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ContinuousWebJobStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ContinuousWebJobStatus. */ +public enum ContinuousWebJobStatus { + /** Enum value Initializing. */ + INITIALIZING("Initializing"), + + /** Enum value Starting. */ + STARTING("Starting"), + + /** Enum value Running. */ + RUNNING("Running"), + + /** Enum value PendingRestart. */ + PENDING_RESTART("PendingRestart"), + + /** Enum value Stopped. */ + STOPPED("Stopped"); + + /** The actual serialized value for a ContinuousWebJobStatus instance. */ + private final String value; + + ContinuousWebJobStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ContinuousWebJobStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed ContinuousWebJobStatus object, or null if unable to parse. + */ + @JsonCreator + public static ContinuousWebJobStatus fromString(String value) { + ContinuousWebJobStatus[] items = ContinuousWebJobStatus.values(); + for (ContinuousWebJobStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CookieExpiration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CookieExpiration.java new file mode 100644 index 0000000000000..650fcead6b3ed --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CookieExpiration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the session cookie's expiration. */ +@Fluent +public final class CookieExpiration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CookieExpiration.class); + + /* + * The convention used when determining the session cookie's expiration. + */ + @JsonProperty(value = "convention") + private CookieExpirationConvention convention; + + /* + * The time after the request is made when the session cookie should + * expire. + */ + @JsonProperty(value = "timeToExpiration") + private String timeToExpiration; + + /** + * Get the convention property: The convention used when determining the session cookie's expiration. + * + * @return the convention value. + */ + public CookieExpirationConvention convention() { + return this.convention; + } + + /** + * Set the convention property: The convention used when determining the session cookie's expiration. + * + * @param convention the convention value to set. + * @return the CookieExpiration object itself. + */ + public CookieExpiration withConvention(CookieExpirationConvention convention) { + this.convention = convention; + return this; + } + + /** + * Get the timeToExpiration property: The time after the request is made when the session cookie should expire. + * + * @return the timeToExpiration value. + */ + public String timeToExpiration() { + return this.timeToExpiration; + } + + /** + * Set the timeToExpiration property: The time after the request is made when the session cookie should expire. + * + * @param timeToExpiration the timeToExpiration value to set. + * @return the CookieExpiration object itself. + */ + public CookieExpiration withTimeToExpiration(String timeToExpiration) { + this.timeToExpiration = timeToExpiration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CookieExpirationConvention.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CookieExpirationConvention.java new file mode 100644 index 0000000000000..e6e1ced03de3c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CookieExpirationConvention.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for CookieExpirationConvention. */ +public enum CookieExpirationConvention { + /** Enum value FixedTime. */ + FIXED_TIME("FixedTime"), + + /** Enum value IdentityProviderDerived. */ + IDENTITY_PROVIDER_DERIVED("IdentityProviderDerived"); + + /** The actual serialized value for a CookieExpirationConvention instance. */ + private final String value; + + CookieExpirationConvention(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CookieExpirationConvention instance. + * + * @param value the serialized value to parse. + * @return the parsed CookieExpirationConvention object, or null if unable to parse. + */ + @JsonCreator + public static CookieExpirationConvention fromString(String value) { + CookieExpirationConvention[] items = CookieExpirationConvention.values(); + for (CookieExpirationConvention item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CorsSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CorsSettings.java new file mode 100644 index 0000000000000..bf835bdc0cacc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CorsSettings.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Cross-Origin Resource Sharing (CORS) settings for the app. */ +@Fluent +public final class CorsSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CorsSettings.class); + + /* + * Gets or sets the list of origins that should be allowed to make + * cross-origin + * calls (for example: http://example.com:12345). Use "*" to allow all. + */ + @JsonProperty(value = "allowedOrigins") + private List allowedOrigins; + + /* + * Gets or sets whether CORS requests with credentials are allowed. See + * https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials + * for more details. + */ + @JsonProperty(value = "supportCredentials") + private Boolean supportCredentials; + + /** + * Get the allowedOrigins property: Gets or sets the list of origins that should be allowed to make cross-origin + * calls (for example: http://example.com:12345). Use "*" to allow all. + * + * @return the allowedOrigins value. + */ + public List allowedOrigins() { + return this.allowedOrigins; + } + + /** + * Set the allowedOrigins property: Gets or sets the list of origins that should be allowed to make cross-origin + * calls (for example: http://example.com:12345). Use "*" to allow all. + * + * @param allowedOrigins the allowedOrigins value to set. + * @return the CorsSettings object itself. + */ + public CorsSettings withAllowedOrigins(List allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + * Get the supportCredentials property: Gets or sets whether CORS requests with credentials are allowed. See + * https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials for more details. + * + * @return the supportCredentials value. + */ + public Boolean supportCredentials() { + return this.supportCredentials; + } + + /** + * Set the supportCredentials property: Gets or sets whether CORS requests with credentials are allowed. See + * https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials for more details. + * + * @param supportCredentials the supportCredentials value to set. + * @return the CorsSettings object itself. + */ + public CorsSettings withSupportCredentials(Boolean supportCredentials) { + this.supportCredentials = supportCredentials; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmMoveResourceEnvelope.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmMoveResourceEnvelope.java new file mode 100644 index 0000000000000..62f2d66c6ae5f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmMoveResourceEnvelope.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Object with a list of the resources that need to be moved and the resource group they should be moved to. */ +@Fluent +public final class CsmMoveResourceEnvelope { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmMoveResourceEnvelope.class); + + /* + * The targetResourceGroup property. + */ + @JsonProperty(value = "targetResourceGroup") + private String targetResourceGroup; + + /* + * The resources property. + */ + @JsonProperty(value = "resources") + private List resources; + + /** + * Get the targetResourceGroup property: The targetResourceGroup property. + * + * @return the targetResourceGroup value. + */ + public String targetResourceGroup() { + return this.targetResourceGroup; + } + + /** + * Set the targetResourceGroup property: The targetResourceGroup property. + * + * @param targetResourceGroup the targetResourceGroup value to set. + * @return the CsmMoveResourceEnvelope object itself. + */ + public CsmMoveResourceEnvelope withTargetResourceGroup(String targetResourceGroup) { + this.targetResourceGroup = targetResourceGroup; + return this; + } + + /** + * Get the resources property: The resources property. + * + * @return the resources value. + */ + public List resources() { + return this.resources; + } + + /** + * Set the resources property: The resources property. + * + * @param resources the resources value to set. + * @return the CsmMoveResourceEnvelope object itself. + */ + public CsmMoveResourceEnvelope withResources(List resources) { + this.resources = resources; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationCollection.java new file mode 100644 index 0000000000000..7e179901eff4a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Azure resource manager operation metadata. */ +@Fluent +public final class CsmOperationCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmOperationCollection.class); + + /* + * 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; + + /** + * 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 CsmOperationCollection object itself. + */ + public CsmOperationCollection 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 CsmOperationCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDescription.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDescription.java new file mode 100644 index 0000000000000..06734f27c2f08 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDescription.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner; + +/** An immutable client-side representation of CsmOperationDescription. */ +public interface CsmOperationDescription { + /** + * Gets the name property: The name property. + * + * @return the name value. + */ + String name(); + + /** + * Gets the isDataAction property: The isDataAction property. + * + * @return the isDataAction value. + */ + Boolean isDataAction(); + + /** + * Gets the display property: Meta data about operation used for display in portal. + * + * @return the display value. + */ + CsmOperationDisplay display(); + + /** + * Gets the origin property: The origin property. + * + * @return the origin value. + */ + String origin(); + + /** + * Gets the properties property: Properties available for a Microsoft.Web resource provider operation. + * + * @return the properties value. + */ + CsmOperationDescriptionProperties properties(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.CsmOperationDescriptionInner object. + * + * @return the inner object. + */ + CsmOperationDescriptionInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDescriptionProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDescriptionProperties.java new file mode 100644 index 0000000000000..9031bf93e198f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDescriptionProperties.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Properties available for a Microsoft.Web resource provider operation. */ +@Fluent +public final class CsmOperationDescriptionProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmOperationDescriptionProperties.class); + + /* + * Resource metrics service provided by Microsoft.Insights resource + * provider. + */ + @JsonProperty(value = "serviceSpecification") + private ServiceSpecification serviceSpecification; + + /** + * Get the serviceSpecification property: Resource metrics service provided by Microsoft.Insights resource provider. + * + * @return the serviceSpecification value. + */ + public ServiceSpecification serviceSpecification() { + return this.serviceSpecification; + } + + /** + * Set the serviceSpecification property: Resource metrics service provided by Microsoft.Insights resource provider. + * + * @param serviceSpecification the serviceSpecification value to set. + * @return the CsmOperationDescriptionProperties object itself. + */ + public CsmOperationDescriptionProperties withServiceSpecification(ServiceSpecification serviceSpecification) { + this.serviceSpecification = serviceSpecification; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (serviceSpecification() != null) { + serviceSpecification().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDisplay.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDisplay.java new file mode 100644 index 0000000000000..da33edcb19f50 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmOperationDisplay.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Meta data about operation used for display in portal. */ +@Fluent +public final class CsmOperationDisplay { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmOperationDisplay.class); + + /* + * The provider property. + */ + @JsonProperty(value = "provider") + private String provider; + + /* + * The resource property. + */ + @JsonProperty(value = "resource") + private String resource; + + /* + * The operation property. + */ + @JsonProperty(value = "operation") + private String operation; + + /* + * The description property. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the provider property: The provider property. + * + * @return the provider value. + */ + public String provider() { + return this.provider; + } + + /** + * Set the provider property: The provider property. + * + * @param provider the provider value to set. + * @return the CsmOperationDisplay object itself. + */ + public CsmOperationDisplay withProvider(String provider) { + this.provider = provider; + return this; + } + + /** + * Get the resource property: The resource property. + * + * @return the resource value. + */ + public String resource() { + return this.resource; + } + + /** + * Set the resource property: The resource property. + * + * @param resource the resource value to set. + * @return the CsmOperationDisplay object itself. + */ + public CsmOperationDisplay withResource(String resource) { + this.resource = resource; + return this; + } + + /** + * Get the operation property: The operation property. + * + * @return the operation value. + */ + public String operation() { + return this.operation; + } + + /** + * Set the operation property: The operation property. + * + * @param operation the operation value to set. + * @return the CsmOperationDisplay object itself. + */ + public CsmOperationDisplay withOperation(String operation) { + this.operation = operation; + return this; + } + + /** + * Get the description property: The description property. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The description property. + * + * @param description the description value to set. + * @return the CsmOperationDisplay object itself. + */ + public CsmOperationDisplay withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmPublishingCredentialsPoliciesEntity.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmPublishingCredentialsPoliciesEntity.java new file mode 100644 index 0000000000000..d399af7553ef8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmPublishingCredentialsPoliciesEntity.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** An immutable client-side representation of CsmPublishingCredentialsPoliciesEntity. */ +public interface CsmPublishingCredentialsPoliciesEntity { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the allow property: <code>true</code> to allow access to a publishing method; otherwise, + * <code>false</code>. + * + * @return the allow value. + */ + boolean allow(); + + /** + * Gets the inner + * com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner object. + * + * @return the inner object. + */ + CsmPublishingCredentialsPoliciesEntityInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmPublishingProfileOptions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmPublishingProfileOptions.java new file mode 100644 index 0000000000000..d8e982b2dfc95 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmPublishingProfileOptions.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Publishing options for requested profile. */ +@Fluent +public final class CsmPublishingProfileOptions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmPublishingProfileOptions.class); + + /* + * Name of the format. Valid values are: + * FileZilla3 + * WebDeploy -- default + * Ftp + */ + @JsonProperty(value = "format") + private PublishingProfileFormat format; + + /* + * Include the DisasterRecover endpoint if true + */ + @JsonProperty(value = "includeDisasterRecoveryEndpoints") + private Boolean includeDisasterRecoveryEndpoints; + + /** + * Get the format property: Name of the format. Valid values are: FileZilla3 WebDeploy -- default Ftp. + * + * @return the format value. + */ + public PublishingProfileFormat format() { + return this.format; + } + + /** + * Set the format property: Name of the format. Valid values are: FileZilla3 WebDeploy -- default Ftp. + * + * @param format the format value to set. + * @return the CsmPublishingProfileOptions object itself. + */ + public CsmPublishingProfileOptions withFormat(PublishingProfileFormat format) { + this.format = format; + return this; + } + + /** + * Get the includeDisasterRecoveryEndpoints property: Include the DisasterRecover endpoint if true. + * + * @return the includeDisasterRecoveryEndpoints value. + */ + public Boolean includeDisasterRecoveryEndpoints() { + return this.includeDisasterRecoveryEndpoints; + } + + /** + * Set the includeDisasterRecoveryEndpoints property: Include the DisasterRecover endpoint if true. + * + * @param includeDisasterRecoveryEndpoints the includeDisasterRecoveryEndpoints value to set. + * @return the CsmPublishingProfileOptions object itself. + */ + public CsmPublishingProfileOptions withIncludeDisasterRecoveryEndpoints(Boolean includeDisasterRecoveryEndpoints) { + this.includeDisasterRecoveryEndpoints = includeDisasterRecoveryEndpoints; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmSlotEntity.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmSlotEntity.java new file mode 100644 index 0000000000000..24fcf43dacd7a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmSlotEntity.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Deployment slot parameters. */ +@Fluent +public final class CsmSlotEntity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmSlotEntity.class); + + /* + * Destination deployment slot during swap operation. + */ + @JsonProperty(value = "targetSlot", required = true) + private String targetSlot; + + /* + * true to preserve Virtual Network to the slot during swap; + * otherwise, false. + */ + @JsonProperty(value = "preserveVnet", required = true) + private boolean preserveVnet; + + /** + * Get the targetSlot property: Destination deployment slot during swap operation. + * + * @return the targetSlot value. + */ + public String targetSlot() { + return this.targetSlot; + } + + /** + * Set the targetSlot property: Destination deployment slot during swap operation. + * + * @param targetSlot the targetSlot value to set. + * @return the CsmSlotEntity object itself. + */ + public CsmSlotEntity withTargetSlot(String targetSlot) { + this.targetSlot = targetSlot; + return this; + } + + /** + * Get the preserveVnet property: <code>true</code> to preserve Virtual Network to the slot during swap; + * otherwise, <code>false</code>. + * + * @return the preserveVnet value. + */ + public boolean preserveVnet() { + return this.preserveVnet; + } + + /** + * Set the preserveVnet property: <code>true</code> to preserve Virtual Network to the slot during swap; + * otherwise, <code>false</code>. + * + * @param preserveVnet the preserveVnet value to set. + * @return the CsmSlotEntity object itself. + */ + public CsmSlotEntity withPreserveVnet(boolean preserveVnet) { + this.preserveVnet = preserveVnet; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (targetSlot() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property targetSlot in model CsmSlotEntity")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmUsageQuota.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmUsageQuota.java new file mode 100644 index 0000000000000..ba9140ba2802b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmUsageQuota.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of CsmUsageQuota. */ +public interface CsmUsageQuota { + /** + * Gets the unit property: Units of measurement for the quota resource. + * + * @return the unit value. + */ + String unit(); + + /** + * Gets the nextResetTime property: Next reset time for the resource counter. + * + * @return the nextResetTime value. + */ + OffsetDateTime nextResetTime(); + + /** + * Gets the currentValue property: The current value of the resource counter. + * + * @return the currentValue value. + */ + Long currentValue(); + + /** + * Gets the limit property: The resource limit. + * + * @return the limit value. + */ + Long limit(); + + /** + * Gets the name property: Quota name. + * + * @return the name value. + */ + LocalizableString name(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner object. + * + * @return the inner object. + */ + CsmUsageQuotaInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmUsageQuotaCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmUsageQuotaCollection.java new file mode 100644 index 0000000000000..11d6a42f27a4e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CsmUsageQuotaCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmUsageQuotaInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of CSM usage quotas. */ +@Fluent +public final class CsmUsageQuotaCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CsmUsageQuotaCollection.class); + + /* + * 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; + + /** + * 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 CsmUsageQuotaCollection object itself. + */ + public CsmUsageQuotaCollection 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 CsmUsageQuotaCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomDomainStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomDomainStatus.java new file mode 100644 index 0000000000000..d2ad1b7c2d9e5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomDomainStatus.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for CustomDomainStatus. */ +public final class CustomDomainStatus extends ExpandableStringEnum { + /** Static value RetrievingValidationToken for CustomDomainStatus. */ + public static final CustomDomainStatus RETRIEVING_VALIDATION_TOKEN = fromString("RetrievingValidationToken"); + + /** Static value Validating for CustomDomainStatus. */ + public static final CustomDomainStatus VALIDATING = fromString("Validating"); + + /** Static value Adding for CustomDomainStatus. */ + public static final CustomDomainStatus ADDING = fromString("Adding"); + + /** Static value Ready for CustomDomainStatus. */ + public static final CustomDomainStatus READY = fromString("Ready"); + + /** Static value Failed for CustomDomainStatus. */ + public static final CustomDomainStatus FAILED = fromString("Failed"); + + /** Static value Deleting for CustomDomainStatus. */ + public static final CustomDomainStatus DELETING = fromString("Deleting"); + + /** + * Creates or finds a CustomDomainStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding CustomDomainStatus. + */ + @JsonCreator + public static CustomDomainStatus fromString(String name) { + return fromString(name, CustomDomainStatus.class); + } + + /** @return known CustomDomainStatus values. */ + public static Collection values() { + return values(CustomDomainStatus.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameAnalysisResult.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameAnalysisResult.java new file mode 100644 index 0000000000000..a10481ce8adb8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameAnalysisResult.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; + * otherwise, <code>false</code>. + * + * @return the isHostnameAlreadyVerified value. + */ + Boolean isHostnameAlreadyVerified(); + + /** + * Gets the customDomainVerificationTest property: DNS verification test result. + * + * @return the customDomainVerificationTest value. + */ + DnsVerificationTestResult customDomainVerificationTest(); + + /** + * Gets the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. + * + * @return the customDomainVerificationFailureInfo value. + */ + ErrorEntity customDomainVerificationFailureInfo(); + + /** + * Gets the hasConflictOnScaleUnit property: <code>true</code> if there is a conflict on a scale unit; + * otherwise, <code>false</code>. + * + * @return the hasConflictOnScaleUnit value. + */ + Boolean hasConflictOnScaleUnit(); + + /** + * Gets the hasConflictAcrossSubscription property: <code>true</code> if there is a conflict across + * subscriptions; otherwise, <code>false</code>. + * + * @return the hasConflictAcrossSubscription value. + */ + Boolean hasConflictAcrossSubscription(); + + /** + * Gets the conflictingAppResourceId property: Name of the conflicting app on scale unit if it's within the same + * subscription. + * + * @return the conflictingAppResourceId value. + */ + String conflictingAppResourceId(); + + /** + * Gets the cNameRecords property: CName records controller can see for this hostname. + * + * @return the cNameRecords value. + */ + List cNameRecords(); + + /** + * Gets the txtRecords property: TXT records controller can see for this hostname. + * + * @return the txtRecords value. + */ + List txtRecords(); + + /** + * Gets the aRecords property: A records controller can see for this hostname. + * + * @return the aRecords value. + */ + List aRecords(); + + /** + * Gets the alternateCNameRecords property: Alternate CName records controller can see for this hostname. + * + * @return the alternateCNameRecords value. + */ + List alternateCNameRecords(); + + /** + * Gets the alternateTxtRecords property: Alternate TXT records controller can see for this hostname. + * + * @return the alternateTxtRecords value. + */ + List alternateTxtRecords(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameAnalysisResultInner + * object. + * + * @return the inner object. + */ + CustomHostnameAnalysisResultInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameDnsRecordType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameDnsRecordType.java new file mode 100644 index 0000000000000..bd8defef476d7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameDnsRecordType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for CustomHostnameDnsRecordType. */ +public enum CustomHostnameDnsRecordType { + /** Enum value CName. */ + CNAME("CName"), + + /** Enum value A. */ + A("A"); + + /** The actual serialized value for a CustomHostnameDnsRecordType instance. */ + private final String value; + + CustomHostnameDnsRecordType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a CustomHostnameDnsRecordType instance. + * + * @param value the serialized value to parse. + * @return the parsed CustomHostnameDnsRecordType object, or null if unable to parse. + */ + @JsonCreator + public static CustomHostnameDnsRecordType fromString(String value) { + CustomHostnameDnsRecordType[] items = CustomHostnameDnsRecordType.values(); + for (CustomHostnameDnsRecordType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameSites.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameSites.java new file mode 100644 index 0000000000000..458f893582efe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameSites.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameSitesInner; +import java.util.List; + +/** An immutable client-side representation of CustomHostnameSites. */ +public interface CustomHostnameSites { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the customHostname property: The customHostname property. + * + * @return the customHostname value. + */ + String customHostname(); + + /** + * Gets the region property: The region property. + * + * @return the region value. + */ + String region(); + + /** + * Gets the siteResourceIds property: The siteResourceIds property. + * + * @return the siteResourceIds value. + */ + List siteResourceIds(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameSitesInner object. + * + * @return the inner object. + */ + CustomHostnameSitesInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameSitesCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameSitesCollection.java new file mode 100644 index 0000000000000..deec2b9b5d3b5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomHostnameSitesCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.CustomHostnameSitesInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of custom hostname sites. */ +@Fluent +public final class CustomHostnameSitesCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomHostnameSitesCollection.class); + + /* + * 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; + + /** + * 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 CustomHostnameSitesCollection object itself. + */ + public CustomHostnameSitesCollection 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 CustomHostnameSitesCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomOpenIdConnectProvider.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomOpenIdConnectProvider.java new file mode 100644 index 0000000000000..d3c5719a2875c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomOpenIdConnectProvider.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the custom Open ID Connect provider. */ +@Fluent +public final class CustomOpenIdConnectProvider { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomOpenIdConnectProvider.class); + + /* + * 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. + */ + @JsonProperty(value = "registration") + private OpenIdConnectRegistration registration; + + /* + * The configuration settings of the login flow of the custom Open ID + * Connect provider. + */ + @JsonProperty(value = "login") + private OpenIdConnectLogin login; + + /** + * Get the enabled property: <code>false</code> if the custom Open ID provider provider should not be + * enabled; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the custom Open ID provider provider should not be + * enabled; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the CustomOpenIdConnectProvider object itself. + */ + public CustomOpenIdConnectProvider withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the app registration for the custom Open ID Connect + * provider. + * + * @return the registration value. + */ + public OpenIdConnectRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the app registration for the custom Open ID Connect + * provider. + * + * @param registration the registration value to set. + * @return the CustomOpenIdConnectProvider object itself. + */ + public CustomOpenIdConnectProvider withRegistration(OpenIdConnectRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Get the login property: The configuration settings of the login flow of the custom Open ID Connect provider. + * + * @return the login value. + */ + public OpenIdConnectLogin login() { + return this.login; + } + + /** + * Set the login property: The configuration settings of the login flow of the custom Open ID Connect provider. + * + * @param login the login value to set. + * @return the CustomOpenIdConnectProvider object itself. + */ + public CustomOpenIdConnectProvider withLogin(OpenIdConnectLogin login) { + this.login = login; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + if (login() != null) { + login().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomScaleRule.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomScaleRule.java new file mode 100644 index 0000000000000..95dcbd9cb687d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/CustomScaleRule.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Container App container Custom scaling rule. */ +@Fluent +public final class CustomScaleRule { + @JsonIgnore private final ClientLogger logger = new ClientLogger(CustomScaleRule.class); + + /* + * Type of the custom scale rule + * eg: azure-servicebus, redis etc. + */ + @JsonProperty(value = "type") + private String type; + + /* + * Metadata properties to describe custom scale rule. + */ + @JsonProperty(value = "metadata") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map metadata; + + /* + * Authentication secrets for the custom scale rule. + */ + @JsonProperty(value = "auth") + private List auth; + + /** + * Get the type property: Type of the custom scale rule eg: azure-servicebus, redis etc. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Type of the custom scale rule eg: azure-servicebus, redis etc. + * + * @param type the type value to set. + * @return the CustomScaleRule object itself. + */ + public CustomScaleRule withType(String type) { + this.type = type; + return this; + } + + /** + * Get the metadata property: Metadata properties to describe custom scale rule. + * + * @return the metadata value. + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata properties to describe custom scale rule. + * + * @param metadata the metadata value to set. + * @return the CustomScaleRule object itself. + */ + public CustomScaleRule withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the auth property: Authentication secrets for the custom scale rule. + * + * @return the auth value. + */ + public List auth() { + return this.auth; + } + + /** + * Set the auth property: Authentication secrets for the custom scale rule. + * + * @param auth the auth value to set. + * @return the CustomScaleRule object itself. + */ + public CustomScaleRule 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Dapr.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Dapr.java new file mode 100644 index 0000000000000..a3790b7307abc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Dapr.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App Dapr configuration. */ +@Fluent +public final class Dapr { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Dapr.class); + + /* + * Boolean indicating if the Dapr side car is enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Dapr application identifier + */ + @JsonProperty(value = "appId") + private String appId; + + /* + * Port on which the Dapr side car + */ + @JsonProperty(value = "appPort") + private Integer appPort; + + /* + * Collection of Dapr components + */ + @JsonProperty(value = "components") + private List components; + + /** + * Get the enabled property: Boolean indicating if the Dapr side car is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Boolean indicating if the Dapr side car is enabled. + * + * @param enabled the enabled value to set. + * @return the Dapr object itself. + */ + public Dapr withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the appId property: Dapr application identifier. + * + * @return the appId value. + */ + public String appId() { + return this.appId; + } + + /** + * Set the appId property: Dapr application identifier. + * + * @param appId the appId value to set. + * @return the Dapr object itself. + */ + public Dapr withAppId(String appId) { + this.appId = appId; + return this; + } + + /** + * Get the appPort property: Port on which the Dapr side car. + * + * @return the appPort value. + */ + public Integer appPort() { + return this.appPort; + } + + /** + * Set the appPort property: Port on which the Dapr side car. + * + * @param appPort the appPort value to set. + * @return the Dapr object itself. + */ + public Dapr withAppPort(Integer appPort) { + this.appPort = appPort; + return this; + } + + /** + * Get the components property: Collection of Dapr components. + * + * @return the components value. + */ + public List components() { + return this.components; + } + + /** + * Set the components property: Collection of Dapr components. + * + * @param components the components value to set. + * @return the Dapr object itself. + */ + public Dapr withComponents(List components) { + this.components = components; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (components() != null) { + components().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DaprComponent.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DaprComponent.java new file mode 100644 index 0000000000000..6e962a87b7ac0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DaprComponent.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Dapr component configuration. */ +@Fluent +public final class DaprComponent { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DaprComponent.class); + + /* + * Component name + */ + @JsonProperty(value = "name") + private String name; + + /* + * Component type + */ + @JsonProperty(value = "type") + private String type; + + /* + * Component version + */ + @JsonProperty(value = "version") + private String version; + + /* + * Component metadata + */ + @JsonProperty(value = "metadata") + private List metadata; + + /** + * Get the name property: Component name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Component name. + * + * @param name the name value to set. + * @return the DaprComponent object itself. + */ + public DaprComponent withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Component type. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Component type. + * + * @param type the type value to set. + * @return the DaprComponent object itself. + */ + public DaprComponent withType(String type) { + this.type = type; + return this; + } + + /** + * Get the version property: Component version. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Component version. + * + * @param version the version value to set. + * @return the DaprComponent object itself. + */ + public DaprComponent withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the metadata property: Component metadata. + * + * @return the metadata value. + */ + public List metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Component metadata. + * + * @param metadata the metadata value to set. + * @return the DaprComponent object itself. + */ + public DaprComponent withMetadata(List metadata) { + this.metadata = metadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DaprMetadata.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DaprMetadata.java new file mode 100644 index 0000000000000..1c08294c69976 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DaprMetadata.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container App Dapr component metadata. */ +@Fluent +public final class DaprMetadata { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DaprMetadata.class); + + /* + * Metadata property name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Metadata property value. + */ + @JsonProperty(value = "value") + private String value; + + /* + * Name of the Container App secret from which to pull the metadata + * property value. + */ + @JsonProperty(value = "secretRef") + private String secretRef; + + /** + * Get the name property: Metadata property name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Metadata property name. + * + * @param name the name value to set. + * @return the DaprMetadata object itself. + */ + public DaprMetadata withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Metadata property value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Metadata property value. + * + * @param value the value value to set. + * @return the DaprMetadata object itself. + */ + public DaprMetadata withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the secretRef property: Name of the Container App secret from which to pull the metadata property value. + * + * @return the secretRef value. + */ + public String secretRef() { + return this.secretRef; + } + + /** + * Set the secretRef property: Name of the Container App secret from which to pull the metadata property value. + * + * @param secretRef the secretRef value to set. + * @return the DaprMetadata object itself. + */ + public DaprMetadata withSecretRef(String secretRef) { + this.secretRef = secretRef; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataProviderMetadata.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataProviderMetadata.java new file mode 100644 index 0000000000000..aea67381051b1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataProviderMetadata.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Additional configuration for a data providers. */ +@Fluent +public final class DataProviderMetadata { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataProviderMetadata.class); + + /* + * The providerName property. + */ + @JsonProperty(value = "providerName") + private String providerName; + + /* + * Settings for the data provider + */ + @JsonProperty(value = "propertyBag", access = JsonProperty.Access.WRITE_ONLY) + private List propertyBag; + + /** + * Get the providerName property: The providerName property. + * + * @return the providerName value. + */ + public String providerName() { + return this.providerName; + } + + /** + * Set the providerName property: The providerName property. + * + * @param providerName the providerName value to set. + * @return the DataProviderMetadata object itself. + */ + public DataProviderMetadata withProviderName(String providerName) { + this.providerName = providerName; + return this; + } + + /** + * Get the propertyBag property: Settings for the data provider. + * + * @return the propertyBag value. + */ + public List propertyBag() { + return this.propertyBag; + } + + /** + * 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataSource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataSource.java new file mode 100644 index 0000000000000..bf2e92d6135cf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataSource.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Class representing data source used by the detectors. */ +@Fluent +public final class DataSource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataSource.class); + + /* + * Instructions if any for the data source + */ + @JsonProperty(value = "instructions") + private List instructions; + + /* + * Datasource Uri Links + */ + @JsonProperty(value = "dataSourceUri") + private List dataSourceUri; + + /** + * Get the instructions property: Instructions if any for the data source. + * + * @return the instructions value. + */ + public List instructions() { + return this.instructions; + } + + /** + * Set the instructions property: Instructions if any for the data source. + * + * @param instructions the instructions value to set. + * @return the DataSource object itself. + */ + public DataSource withInstructions(List instructions) { + this.instructions = instructions; + return this; + } + + /** + * Get the dataSourceUri property: Datasource Uri Links. + * + * @return the dataSourceUri value. + */ + public List dataSourceUri() { + return this.dataSourceUri; + } + + /** + * Set the dataSourceUri property: Datasource Uri Links. + * + * @param dataSourceUri the dataSourceUri value to set. + * @return the DataSource object itself. + */ + public DataSource withDataSourceUri(List dataSourceUri) { + this.dataSourceUri = dataSourceUri; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataSourceUri() != null) { + dataSourceUri().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataTableResponseColumn.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataTableResponseColumn.java new file mode 100644 index 0000000000000..8ba855d0bd66e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataTableResponseColumn.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Column definition. */ +@Fluent +public final class DataTableResponseColumn { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataTableResponseColumn.class); + + /* + * Name of the column + */ + @JsonProperty(value = "columnName") + private String columnName; + + /* + * Data type which looks like 'String' or 'Int32'. + */ + @JsonProperty(value = "dataType") + private String dataType; + + /* + * Column Type + */ + @JsonProperty(value = "columnType") + private String columnType; + + /** + * Get the columnName property: Name of the column. + * + * @return the columnName value. + */ + public String columnName() { + return this.columnName; + } + + /** + * Set the columnName property: Name of the column. + * + * @param columnName the columnName value to set. + * @return the DataTableResponseColumn object itself. + */ + public DataTableResponseColumn withColumnName(String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get the dataType property: Data type which looks like 'String' or 'Int32'. + * + * @return the dataType value. + */ + public String dataType() { + return this.dataType; + } + + /** + * Set the dataType property: Data type which looks like 'String' or 'Int32'. + * + * @param dataType the dataType value to set. + * @return the DataTableResponseColumn object itself. + */ + public DataTableResponseColumn 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 DataTableResponseColumn object itself. + */ + public DataTableResponseColumn 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataTableResponseObject.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataTableResponseObject.java new file mode 100644 index 0000000000000..c928e8e6a575d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DataTableResponseObject.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Data Table which defines columns and raw row values. */ +@Fluent +public final class DataTableResponseObject { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DataTableResponseObject.class); + + /* + * Name of the table + */ + @JsonProperty(value = "tableName") + private String tableName; + + /* + * List of columns with data types + */ + @JsonProperty(value = "columns") + private List columns; + + /* + * Raw row values + */ + @JsonProperty(value = "rows") + private List> rows; + + /** + * Get the tableName property: Name of the table. + * + * @return the tableName value. + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the tableName property: Name of the table. + * + * @param tableName the tableName value to set. + * @return the DataTableResponseObject object itself. + */ + public DataTableResponseObject withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the columns property: List of columns with data types. + * + * @return the columns value. + */ + public List columns() { + return this.columns; + } + + /** + * Set the columns property: List of columns with data types. + * + * @param columns the columns value to set. + * @return the DataTableResponseObject object itself. + */ + public DataTableResponseObject withColumns(List columns) { + this.columns = columns; + return this; + } + + /** + * Get the rows property: Raw row values. + * + * @return the rows value. + */ + public List> rows() { + return this.rows; + } + + /** + * Set the rows property: Raw row values. + * + * @param rows the rows value to set. + * @return the DataTableResponseObject object itself. + */ + public DataTableResponseObject 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DatabaseBackupSetting.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DatabaseBackupSetting.java new file mode 100644 index 0000000000000..5614c5c3bacc4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DatabaseBackupSetting.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Database backup settings. */ +@Fluent +public final class DatabaseBackupSetting { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseBackupSetting.class); + + /* + * Database type (e.g. SqlAzure / MySql). + */ + @JsonProperty(value = "databaseType", required = true) + private DatabaseType databaseType; + + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Contains a connection string name that is linked to the + * SiteConfig.ConnectionStrings. + * This is used during restore with overwrite connection strings options. + */ + @JsonProperty(value = "connectionStringName") + private String connectionStringName; + + /* + * Contains a connection string to a database which is being backed up or + * restored. If the restore should happen to a new database, the database + * name inside is the new one. + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /** + * Get the databaseType property: Database type (e.g. SqlAzure / MySql). + * + * @return the databaseType value. + */ + public DatabaseType databaseType() { + return this.databaseType; + } + + /** + * Set the databaseType property: Database type (e.g. SqlAzure / MySql). + * + * @param databaseType the databaseType value to set. + * @return the DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withDatabaseType(DatabaseType databaseType) { + this.databaseType = databaseType; + return this; + } + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withName(String name) { + this.name = name; + return this; + } + + /** + * Get the connectionStringName property: Contains a connection string name that is linked to the + * SiteConfig.ConnectionStrings. This is used during restore with overwrite connection strings options. + * + * @return the connectionStringName value. + */ + public String connectionStringName() { + return this.connectionStringName; + } + + /** + * Set the connectionStringName property: Contains a connection string name that is linked to the + * SiteConfig.ConnectionStrings. This is used during restore with overwrite connection strings options. + * + * @param connectionStringName the connectionStringName value to set. + * @return the DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withConnectionStringName(String connectionStringName) { + this.connectionStringName = connectionStringName; + return this; + } + + /** + * Get the connectionString property: Contains a connection string to a database which is being backed up or + * restored. If the restore should happen to a new database, the database name inside is the new one. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString property: Contains a connection string to a database which is being backed up or + * restored. If the restore should happen to a new database, the database name inside is the new one. + * + * @param connectionString the connectionString value to set. + * @return the DatabaseBackupSetting object itself. + */ + public DatabaseBackupSetting withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (databaseType() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property databaseType in model DatabaseBackupSetting")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DatabaseType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DatabaseType.java new file mode 100644 index 0000000000000..dbe5a96632f5e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DatabaseType.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DatabaseType. */ +public final class DatabaseType extends ExpandableStringEnum { + /** Static value SqlAzure for DatabaseType. */ + public static final DatabaseType SQL_AZURE = fromString("SqlAzure"); + + /** Static value MySql for DatabaseType. */ + public static final DatabaseType MY_SQL = fromString("MySql"); + + /** Static value LocalMySql for DatabaseType. */ + public static final DatabaseType LOCAL_MY_SQL = fromString("LocalMySql"); + + /** Static value PostgreSql for DatabaseType. */ + public static final DatabaseType POSTGRE_SQL = fromString("PostgreSql"); + + /** + * Creates or finds a DatabaseType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DatabaseType. + */ + @JsonCreator + public static DatabaseType fromString(String name) { + return fromString(name, DatabaseType.class); + } + + /** @return known DatabaseType values. */ + public static Collection values() { + return values(DatabaseType.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultAuthorizationPolicy.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultAuthorizationPolicy.java new file mode 100644 index 0000000000000..11b85183b2b3c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultAuthorizationPolicy.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the Azure Active Directory default authorization policy. */ +@Fluent +public final class DefaultAuthorizationPolicy { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DefaultAuthorizationPolicy.class); + + /* + * 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. + */ + @JsonProperty(value = "allowedApplications") + private List allowedApplications; + + /** + * Get the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. + * + * @return the allowedPrincipals value. + */ + public AllowedPrincipals allowedPrincipals() { + return this.allowedPrincipals; + } + + /** + * Set the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. + * + * @param allowedPrincipals the allowedPrincipals value to set. + * @return the DefaultAuthorizationPolicy object itself. + */ + public DefaultAuthorizationPolicy withAllowedPrincipals(AllowedPrincipals allowedPrincipals) { + this.allowedPrincipals = allowedPrincipals; + return this; + } + + /** + * Get the allowedApplications property: The configuration settings of the Azure Active Directory allowed + * applications. + * + * @return the allowedApplications value. + */ + public List allowedApplications() { + return this.allowedApplications; + } + + /** + * Set the allowedApplications property: The configuration settings of the Azure Active Directory allowed + * applications. + * + * @param allowedApplications the allowedApplications value to set. + * @return the DefaultAuthorizationPolicy object itself. + */ + public DefaultAuthorizationPolicy withAllowedApplications(List allowedApplications) { + this.allowedApplications = allowedApplications; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (allowedPrincipals() != null) { + allowedPrincipals().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultErrorResponseError.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultErrorResponseError.java new file mode 100644 index 0000000000000..ae10c005a6d8e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultErrorResponseError.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** App Service error response. */ +@Immutable +public final class DefaultErrorResponseError extends ManagementError { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DefaultErrorResponseError.class); + + /* + * More information to debug error. + */ + @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) + private String innererror; + + /** + * Get the innererror property: More information to debug error. + * + * @return the innererror value. + */ + public String getInnererror() { + return this.innererror; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultErrorResponseErrorException.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultErrorResponseErrorException.java new file mode 100644 index 0000000000000..d35ecf6aaef62 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DefaultErrorResponseErrorException.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.appservice.generated.models; + +import com.azure.core.http.HttpResponse; +import com.azure.core.management.exception.ManagementException; + +/** Exception thrown for an invalid response with DefaultErrorResponseError information. */ +public final class DefaultErrorResponseErrorException extends ManagementException { + /** + * Initializes a new instance of the DefaultErrorResponseErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public DefaultErrorResponseErrorException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the DefaultErrorResponseErrorException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public DefaultErrorResponseErrorException(String message, HttpResponse response, DefaultErrorResponseError value) { + super(message, response, value); + } + + @Override + public DefaultErrorResponseError getValue() { + return (DefaultErrorResponseError) super.getValue(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedAppRestoreRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedAppRestoreRequest.java new file mode 100644 index 0000000000000..f9b71e6d3e1ba --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedAppRestoreRequest.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeletedAppRestoreRequestProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details about restoring a deleted app. */ +@Fluent +public final class DeletedAppRestoreRequest extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedAppRestoreRequest.class); + + /* + * DeletedAppRestoreRequest resource specific properties + */ + @JsonProperty(value = "properties") + private DeletedAppRestoreRequestProperties innerProperties; + + /** + * Get the innerProperties property: DeletedAppRestoreRequest resource specific properties. + * + * @return the innerProperties value. + */ + private DeletedAppRestoreRequestProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DeletedAppRestoreRequest withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the deletedSiteId property: ARM resource ID of the deleted app. Example: + * /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + * + * @return the deletedSiteId value. + */ + public String deletedSiteId() { + return this.innerProperties() == null ? null : this.innerProperties().deletedSiteId(); + } + + /** + * Set the deletedSiteId property: ARM resource ID of the deleted app. Example: + * /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}. + * + * @param deletedSiteId the deletedSiteId value to set. + * @return the DeletedAppRestoreRequest object itself. + */ + public DeletedAppRestoreRequest withDeletedSiteId(String deletedSiteId) { + if (this.innerProperties() == null) { + this.innerProperties = new DeletedAppRestoreRequestProperties(); + } + this.innerProperties().withDeletedSiteId(deletedSiteId); + return this; + } + + /** + * Get the recoverConfiguration property: If true, deleted site configuration, in addition to content, will be + * restored. + * + * @return the recoverConfiguration value. + */ + public Boolean recoverConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().recoverConfiguration(); + } + + /** + * Set the recoverConfiguration property: If true, deleted site configuration, in addition to content, will be + * restored. + * + * @param recoverConfiguration the recoverConfiguration value to set. + * @return the DeletedAppRestoreRequest object itself. + */ + public DeletedAppRestoreRequest withRecoverConfiguration(Boolean recoverConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new DeletedAppRestoreRequestProperties(); + } + this.innerProperties().withRecoverConfiguration(recoverConfiguration); + return this; + } + + /** + * Get the snapshotTime property: Point in time to restore the deleted app from, formatted as a DateTime string. If + * unspecified, default value is the time that the app was deleted. + * + * @return the snapshotTime value. + */ + public String snapshotTime() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotTime(); + } + + /** + * Set the snapshotTime property: Point in time to restore the deleted app from, formatted as a DateTime string. If + * unspecified, default value is the time that the app was deleted. + * + * @param snapshotTime the snapshotTime value to set. + * @return the DeletedAppRestoreRequest object itself. + */ + public DeletedAppRestoreRequest withSnapshotTime(String snapshotTime) { + if (this.innerProperties() == null) { + this.innerProperties = new DeletedAppRestoreRequestProperties(); + } + this.innerProperties().withSnapshotTime(snapshotTime); + return this; + } + + /** + * Get the useDRSecondary property: If true, the snapshot is retrieved from DRSecondary endpoint. + * + * @return the useDRSecondary value. + */ + public Boolean useDRSecondary() { + return this.innerProperties() == null ? null : this.innerProperties().useDRSecondary(); + } + + /** + * Set the useDRSecondary property: If true, the snapshot is retrieved from DRSecondary endpoint. + * + * @param useDRSecondary the useDRSecondary value to set. + * @return the DeletedAppRestoreRequest object itself. + */ + public DeletedAppRestoreRequest withUseDRSecondary(Boolean useDRSecondary) { + if (this.innerProperties() == null) { + this.innerProperties = new DeletedAppRestoreRequestProperties(); + } + this.innerProperties().withUseDRSecondary(useDRSecondary); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedSite.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedSite.java new file mode 100644 index 0000000000000..960e59bb43130 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedSite.java @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DeletedSiteInner; + +/** An immutable client-side representation of DeletedSite. */ +public interface DeletedSite { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the deletedSiteId property: Numeric id for the deleted site. + * + * @return the deletedSiteId value. + */ + Integer deletedSiteId(); + + /** + * Gets the deletedTimestamp property: Time in UTC when the app was deleted. + * + * @return the deletedTimestamp value. + */ + String deletedTimestamp(); + + /** + * Gets the subscription property: Subscription containing the deleted site. + * + * @return the subscription value. + */ + String subscription(); + + /** + * Gets the resourceGroup property: ResourceGroup that contained the deleted site. + * + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * Gets the deletedSiteName property: Name of the deleted site. + * + * @return the deletedSiteName value. + */ + String deletedSiteName(); + + /** + * Gets the slot property: Slot of the deleted site. + * + * @return the slot value. + */ + String slot(); + + /** + * Gets the kindPropertiesKind property: Kind of site that was deleted. + * + * @return the kindPropertiesKind value. + */ + String kindPropertiesKind(); + + /** + * Gets the geoRegionName property: Geo Region of the deleted site. + * + * @return the geoRegionName value. + */ + String geoRegionName(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DeletedSiteInner object. + * + * @return the inner object. + */ + DeletedSiteInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedWebAppCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedWebAppCollection.java new file mode 100644 index 0000000000000..093397033bdff --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedWebAppCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeletedSiteInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of deleted apps. */ +@Fluent +public final class DeletedWebAppCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeletedWebAppCollection.class); + + /* + * 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; + + /** + * 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 DeletedWebAppCollection object itself. + */ + public DeletedWebAppCollection 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 DeletedWebAppCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedWebApps.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedWebApps.java new file mode 100644 index 0000000000000..b05c97692dd3d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeletedWebApps.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.appservice.generated.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 DeletedWebApps. */ +public interface DeletedWebApps { + /** + * Description for Get all deleted apps for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted apps. + */ + PagedIterable list(); + + /** + * Description for Get all deleted apps for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted apps. + */ + PagedIterable list(Context context); + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted apps. + */ + PagedIterable listByLocation(String location); + + /** + * Description for Get all deleted apps for a subscription at location. + * + * @param location The location parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted apps. + */ + PagedIterable listByLocation(String location, Context context); + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted app. + */ + DeletedSite getDeletedWebAppByLocation(String location, String deletedSiteId); + + /** + * Description for Get deleted app for a subscription at location. + * + * @param location The location parameter. + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted app. + */ + Response getDeletedWebAppByLocationWithResponse( + String location, String deletedSiteId, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Deployment.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Deployment.java new file mode 100644 index 0000000000000..63d6190b48101 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Deployment.java @@ -0,0 +1,277 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of Deployment. */ +public interface Deployment { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the status property: Deployment status. + * + * @return the status value. + */ + Integer status(); + + /** + * Gets the message property: Details about deployment status. + * + * @return the message value. + */ + String message(); + + /** + * Gets the author property: Who authored the deployment. + * + * @return the author value. + */ + String author(); + + /** + * Gets the deployer property: Who performed the deployment. + * + * @return the deployer value. + */ + String deployer(); + + /** + * Gets the authorEmail property: Author email. + * + * @return the authorEmail value. + */ + String authorEmail(); + + /** + * Gets the startTime property: Start time. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: End time. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the active property: True if deployment is currently active, false if completed and null if not started. + * + * @return the active value. + */ + Boolean active(); + + /** + * Gets the details property: Details on deployment. + * + * @return the details value. + */ + String details(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentInner object. + * + * @return the inner object. + */ + DeploymentInner innerModel(); + + /** The entirety of the Deployment definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The Deployment definition stages. */ + interface DefinitionStages { + /** The first stage of the Deployment definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the Deployment definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @return the next definition stage. + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + /** + * The stage of the Deployment 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.WithKind, + DefinitionStages.WithStatus, + DefinitionStages.WithMessage, + DefinitionStages.WithAuthor, + DefinitionStages.WithDeployer, + DefinitionStages.WithAuthorEmail, + DefinitionStages.WithStartTime, + DefinitionStages.WithEndTime, + DefinitionStages.WithActive, + DefinitionStages.WithDetails { + /** + * Executes the create request. + * + * @return the created resource. + */ + Deployment create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Deployment create(Context context); + } + /** The stage of the Deployment definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the Deployment definition allowing to specify status. */ + interface WithStatus { + /** + * Specifies the status property: Deployment status.. + * + * @param status Deployment status. + * @return the next definition stage. + */ + WithCreate withStatus(Integer status); + } + /** The stage of the Deployment definition allowing to specify message. */ + interface WithMessage { + /** + * Specifies the message property: Details about deployment status.. + * + * @param message Details about deployment status. + * @return the next definition stage. + */ + WithCreate withMessage(String message); + } + /** The stage of the Deployment definition allowing to specify author. */ + interface WithAuthor { + /** + * Specifies the author property: Who authored the deployment.. + * + * @param author Who authored the deployment. + * @return the next definition stage. + */ + WithCreate withAuthor(String author); + } + /** The stage of the Deployment definition allowing to specify deployer. */ + interface WithDeployer { + /** + * Specifies the deployer property: Who performed the deployment.. + * + * @param deployer Who performed the deployment. + * @return the next definition stage. + */ + WithCreate withDeployer(String deployer); + } + /** The stage of the Deployment definition allowing to specify authorEmail. */ + interface WithAuthorEmail { + /** + * Specifies the authorEmail property: Author email.. + * + * @param authorEmail Author email. + * @return the next definition stage. + */ + WithCreate withAuthorEmail(String authorEmail); + } + /** The stage of the Deployment definition allowing to specify startTime. */ + interface WithStartTime { + /** + * Specifies the startTime property: Start time.. + * + * @param startTime Start time. + * @return the next definition stage. + */ + WithCreate withStartTime(OffsetDateTime startTime); + } + /** The stage of the Deployment definition allowing to specify endTime. */ + interface WithEndTime { + /** + * Specifies the endTime property: End time.. + * + * @param endTime End time. + * @return the next definition stage. + */ + WithCreate withEndTime(OffsetDateTime endTime); + } + /** The stage of the Deployment definition allowing to specify active. */ + interface WithActive { + /** + * Specifies the active property: True if deployment is currently active, false if completed and null if not + * started.. + * + * @param active True if deployment is currently active, false if completed and null if not started. + * @return the next definition stage. + */ + WithCreate withActive(Boolean active); + } + /** The stage of the Deployment definition allowing to specify details. */ + interface WithDetails { + /** + * Specifies the details property: Details on deployment.. + * + * @param details Details on deployment. + * @return the next definition stage. + */ + WithCreate withDetails(String details); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Deployment refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Deployment refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeploymentCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeploymentCollection.java new file mode 100644 index 0000000000000..ff1b44c6d8aae --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeploymentCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of app deployments. */ +@Fluent +public final class DeploymentCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DeploymentCollection.class); + + /* + * 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; + + /** + * 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 DeploymentCollection object itself. + */ + public DeploymentCollection 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 DeploymentCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeploymentLocations.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeploymentLocations.java new file mode 100644 index 0000000000000..d6ba23735550d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DeploymentLocations.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironment; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentLocationsInner; +import java.util.List; + +/** An immutable client-side representation of DeploymentLocations. */ +public interface DeploymentLocations { + /** + * Gets the locations property: Available regions. + * + * @return the locations value. + */ + List locations(); + + /** + * Gets the hostingEnvironments property: Available App Service Environments with full descriptions of the + * environments. + * + * @return the hostingEnvironments value. + */ + List hostingEnvironments(); + + /** + * Gets the hostingEnvironmentDeploymentInfos property: Available App Service Environments with basic information. + * + * @return the hostingEnvironmentDeploymentInfos value. + */ + List hostingEnvironmentDeploymentInfos(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentLocationsInner object. + * + * @return the inner object. + */ + DeploymentLocationsInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorAbnormalTimePeriod.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorAbnormalTimePeriod.java new file mode 100644 index 0000000000000..bf5c2d1e21497 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorAbnormalTimePeriod.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Class representing Abnormal Time Period detected. */ +@Fluent +public final class DetectorAbnormalTimePeriod { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorAbnormalTimePeriod.class); + + /* + * Start time of the correlated event + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * End time of the correlated event + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Message describing the event + */ + @JsonProperty(value = "message") + private String message; + + /* + * Represents the name of the Detector + */ + @JsonProperty(value = "source") + private String source; + + /* + * Represents the rank of the Detector + */ + @JsonProperty(value = "priority") + private Double priority; + + /* + * Downtime metadata + */ + @JsonProperty(value = "metaData") + private List> metadata; + + /* + * Represents the type of the Detector + */ + @JsonProperty(value = "type") + private IssueType type; + + /* + * List of proposed solutions + */ + @JsonProperty(value = "solutions") + private List solutions; + + /** + * Get the startTime property: Start time of the correlated event. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time of the correlated event. + * + * @param startTime the startTime value to set. + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: End time of the correlated event. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time of the correlated event. + * + * @param endTime the endTime value to set. + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the message property: Message describing the event. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Message describing the event. + * + * @param message the message value to set. + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the source property: Represents the name of the Detector. + * + * @return the source value. + */ + public String source() { + return this.source; + } + + /** + * Set the source property: Represents the name of the Detector. + * + * @param source the source value to set. + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withSource(String source) { + this.source = source; + return this; + } + + /** + * Get the priority property: Represents the rank of the Detector. + * + * @return the priority value. + */ + public Double priority() { + return this.priority; + } + + /** + * Set the priority property: Represents the rank of the Detector. + * + * @param priority the priority value to set. + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withPriority(Double priority) { + this.priority = priority; + return this; + } + + /** + * Get the metadata property: Downtime metadata. + * + * @return the metadata value. + */ + public List> metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Downtime metadata. + * + * @param metadata the metadata value to set. + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withMetadata(List> metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the type property: Represents the type of the Detector. + * + * @return the type value. + */ + public IssueType type() { + return this.type; + } + + /** + * Set the type property: Represents the type of the Detector. + * + * @param type the type value to set. + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withType(IssueType type) { + this.type = type; + return this; + } + + /** + * Get the solutions property: List of proposed solutions. + * + * @return the solutions value. + */ + public List solutions() { + return this.solutions; + } + + /** + * Set the solutions property: List of proposed solutions. + * + * @param solutions the solutions value to set. + * @return the DetectorAbnormalTimePeriod object itself. + */ + public DetectorAbnormalTimePeriod withSolutions(List solutions) { + this.solutions = solutions; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().forEach(e -> e.forEach(e1 -> e1.validate())); + } + if (solutions() != null) { + solutions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorDefinitionResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorDefinitionResource.java new file mode 100644 index 0000000000000..b382923133cf4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorDefinitionResource.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinitionResourceInner; + +/** An immutable client-side representation of DetectorDefinitionResource. */ +public interface DetectorDefinitionResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the displayName property: Display name of the detector. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the description property: Description of the detector. + * + * @return the description value. + */ + String description(); + + /** + * Gets the rank property: Detector Rank. + * + * @return the rank value. + */ + Double rank(); + + /** + * Gets the isEnabled property: Flag representing whether detector is enabled or not. + * + * @return the isEnabled value. + */ + Boolean isEnabled(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinitionResourceInner + * object. + * + * @return the inner object. + */ + DetectorDefinitionResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorInfo.java new file mode 100644 index 0000000000000..1e6b5b6f1640b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorInfo.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Definition of Detector. */ +@Immutable +public final class DetectorInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorInfo.class); + + /* + * Id of detector + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Name of detector + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Short description of the detector and its purpose. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Author of the detector. + */ + @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) + private String author; + + /* + * Problem category. This serves for organizing group for detectors. + */ + @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) + private String category; + + /* + * List of Support Topics for which this detector is enabled. + */ + @JsonProperty(value = "supportTopicList", access = JsonProperty.Access.WRITE_ONLY) + private List supportTopicList; + + /* + * Analysis Types for which this detector should apply to. + */ + @JsonProperty(value = "analysisType", access = JsonProperty.Access.WRITE_ONLY) + private List analysisType; + + /* + * Whether this detector is an Analysis Detector or not. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private DetectorType type; + + /* + * Defines score of a detector to power ML based matching. + */ + @JsonProperty(value = "score", access = JsonProperty.Access.WRITE_ONLY) + private Float score; + + /** + * Get the id property: Id of detector. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Name of detector. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the description property: Short description of the detector and its purpose. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the author property: Author of the detector. + * + * @return the author value. + */ + public String author() { + return this.author; + } + + /** + * Get the category property: Problem category. This serves for organizing group for detectors. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Get the supportTopicList property: List of Support Topics for which this detector is enabled. + * + * @return the supportTopicList value. + */ + public List supportTopicList() { + return this.supportTopicList; + } + + /** + * Get the analysisType property: Analysis Types for which this detector should apply to. + * + * @return the analysisType value. + */ + public List analysisType() { + return this.analysisType; + } + + /** + * Get the type property: Whether this detector is an Analysis Detector or not. + * + * @return the type value. + */ + public DetectorType type() { + return this.type; + } + + /** + * Get the score property: Defines score of a detector to power ML based matching. + * + * @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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorResponse.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorResponse.java new file mode 100644 index 0000000000000..4247f069aa1bb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorResponse.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner; +import java.util.List; + +/** An immutable client-side representation of DetectorResponse. */ +public interface DetectorResponse { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the metadata property: metadata for the detector. + * + * @return the metadata value. + */ + DetectorInfo metadata(); + + /** + * Gets the dataset property: Data Set. + * + * @return the dataset value. + */ + List dataset(); + + /** + * Gets the status property: Indicates status of the most severe insight. + * + * @return the status value. + */ + Status status(); + + /** + * Gets the dataProvidersMetadata property: Additional configuration for different data providers to be used by the + * UI. + * + * @return the dataProvidersMetadata value. + */ + List dataProvidersMetadata(); + + /** + * Gets the suggestedUtterances property: Suggested utterances where the detector can be applicable. + * + * @return the suggestedUtterances value. + */ + QueryUtterancesResults suggestedUtterances(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner object. + * + * @return the inner object. + */ + DetectorResponseInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorResponseCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorResponseCollection.java new file mode 100644 index 0000000000000..3dd4e5d694cd1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorResponseCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorResponseInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of detector responses. */ +@Fluent +public final class DetectorResponseCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DetectorResponseCollection.class); + + /* + * 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; + + /** + * 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 DetectorResponseCollection object itself. + */ + public DetectorResponseCollection 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 DetectorResponseCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorType.java new file mode 100644 index 0000000000000..d0ae87c70eb98 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DetectorType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for DetectorType. */ +public enum DetectorType { + /** Enum value Detector. */ + DETECTOR("Detector"), + + /** Enum value Analysis. */ + ANALYSIS("Analysis"), + + /** Enum value CategoryOverview. */ + CATEGORY_OVERVIEW("CategoryOverview"); + + /** The actual serialized value for a DetectorType instance. */ + private final String value; + + DetectorType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DetectorType instance. + * + * @param value the serialized value to parse. + * @return the parsed DetectorType object, or null if unable to parse. + */ + @JsonCreator + public static DetectorType fromString(String value) { + DetectorType[] items = DetectorType.values(); + for (DetectorType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticAnalysis.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticAnalysis.java new file mode 100644 index 0000000000000..bab6ec255e541 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticAnalysis.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinition; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticAnalysisInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of DiagnosticAnalysis. */ +public interface DiagnosticAnalysis { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the startTime property: Start time of the period. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: End time of the period. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the abnormalTimePeriods property: List of time periods. + * + * @return the abnormalTimePeriods value. + */ + List abnormalTimePeriods(); + + /** + * Gets the payload property: Data by each detector. + * + * @return the payload value. + */ + List payload(); + + /** + * Gets the nonCorrelatedDetectors property: Data by each detector for detectors that did not corelate. + * + * @return the nonCorrelatedDetectors value. + */ + List nonCorrelatedDetectors(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticAnalysisInner object. + * + * @return the inner object. + */ + DiagnosticAnalysisInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticAnalysisCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticAnalysisCollection.java new file mode 100644 index 0000000000000..d68601a0d9996 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticAnalysisCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AnalysisDefinitionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Diagnostic Analyses. */ +@Fluent +public final class DiagnosticAnalysisCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticAnalysisCollection.class); + + /* + * 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; + + /** + * 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 DiagnosticAnalysisCollection object itself. + */ + public DiagnosticAnalysisCollection 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 DiagnosticAnalysisCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticCategory.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticCategory.java new file mode 100644 index 0000000000000..79aec78c90f29 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticCategory.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticCategoryInner; + +/** An immutable client-side representation of DiagnosticCategory. */ +public interface DiagnosticCategory { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the description property: Description of the diagnostic category. + * + * @return the description value. + */ + String description(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticCategoryInner object. + * + * @return the inner object. + */ + DiagnosticCategoryInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticCategoryCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticCategoryCollection.java new file mode 100644 index 0000000000000..2d124ec0ee2d6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticCategoryCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticCategoryInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Diagnostic Categories. */ +@Fluent +public final class DiagnosticCategoryCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticCategoryCollection.class); + + /* + * 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; + + /** + * 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 DiagnosticCategoryCollection object itself. + */ + public DiagnosticCategoryCollection 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 DiagnosticCategoryCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticData.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticData.java new file mode 100644 index 0000000000000..538845266e850 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticData.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Set of data with rendering instructions. */ +@Fluent +public final class DiagnosticData { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticData.class); + + /* + * Data in table form + */ + @JsonProperty(value = "table") + private DataTableResponseObject table; + + /* + * Properties that describe how the table should be rendered + */ + @JsonProperty(value = "renderingProperties") + private Rendering renderingProperties; + + /** + * Get the table property: Data in table form. + * + * @return the table value. + */ + public DataTableResponseObject table() { + return this.table; + } + + /** + * Set the table property: Data in table form. + * + * @param table the table value to set. + * @return the DiagnosticData object itself. + */ + public DiagnosticData withTable(DataTableResponseObject table) { + this.table = table; + return this; + } + + /** + * Get the renderingProperties property: Properties that describe how the table should be rendered. + * + * @return the renderingProperties value. + */ + public Rendering renderingProperties() { + return this.renderingProperties; + } + + /** + * Set the renderingProperties property: Properties that describe how the table should be rendered. + * + * @param renderingProperties the renderingProperties value to set. + * @return the DiagnosticData object itself. + */ + public DiagnosticData withRenderingProperties(Rendering 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticDetectorCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticDetectorCollection.java new file mode 100644 index 0000000000000..aa1b22fd1ef19 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticDetectorCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinitionResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Diagnostic Detectors. */ +@Fluent +public final class DiagnosticDetectorCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticDetectorCollection.class); + + /* + * 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; + + /** + * 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 DiagnosticDetectorCollection object itself. + */ + public DiagnosticDetectorCollection 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 DiagnosticDetectorCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticDetectorResponse.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticDetectorResponse.java new file mode 100644 index 0000000000000..76d4c80291a39 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticDetectorResponse.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DetectorDefinition; +import com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticDetectorResponseInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of DiagnosticDetectorResponse. */ +public interface DiagnosticDetectorResponse { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the startTime property: Start time of the period. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: End time of the period. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the issueDetected property: Flag representing Issue was detected. + * + * @return the issueDetected value. + */ + Boolean issueDetected(); + + /** + * Gets the detectorDefinition property: Detector's definition. + * + * @return the detectorDefinition value. + */ + DetectorDefinition detectorDefinition(); + + /** + * Gets the metrics property: Metrics provided by the detector. + * + * @return the metrics value. + */ + List metrics(); + + /** + * Gets the abnormalTimePeriods property: List of Correlated events found by the detector. + * + * @return the abnormalTimePeriods value. + */ + List abnormalTimePeriods(); + + /** + * Gets the data property: Additional Data that detector wants to send. + * + * @return the data value. + */ + List> data(); + + /** + * Gets the responseMetadata property: Meta Data. + * + * @return the responseMetadata value. + */ + ResponseMetadata responseMetadata(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DiagnosticDetectorResponseInner + * object. + * + * @return the inner object. + */ + DiagnosticDetectorResponseInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticMetricSample.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticMetricSample.java new file mode 100644 index 0000000000000..098baa07dc620 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticMetricSample.java @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Class representing Diagnostic Metric. */ +@Fluent +public final class DiagnosticMetricSample { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticMetricSample.class); + + /* + * Time at which metric is measured + */ + @JsonProperty(value = "timestamp") + private OffsetDateTime timestamp; + + /* + * Role Instance. Null if this counter is not per instance + * This is returned and should be whichever instance name we desire to be + * returned + * i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) + * where RDWORKERNAME is Machine name below and RoleInstance name in + * parenthesis + */ + @JsonProperty(value = "roleInstance") + private String roleInstance; + + /* + * Total value of the metric. If multiple measurements are made this will + * have sum of all. + */ + @JsonProperty(value = "total") + private Double total; + + /* + * Maximum of the metric sampled during the time period + */ + @JsonProperty(value = "maximum") + private Double maximum; + + /* + * Minimum of the metric sampled during the time period + */ + @JsonProperty(value = "minimum") + private Double minimum; + + /* + * Whether the values are aggregates across all workers or not + */ + @JsonProperty(value = "isAggregated") + private Boolean isAggregated; + + /** + * Get the timestamp property: Time at which metric is measured. + * + * @return the timestamp value. + */ + public OffsetDateTime timestamp() { + return this.timestamp; + } + + /** + * Set the timestamp property: Time at which metric is measured. + * + * @param timestamp the timestamp value to set. + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Get the roleInstance property: Role Instance. Null if this counter is not per instance This is returned and + * should be whichever instance name we desire to be returned i.e. CPU and Memory return RDWORKERNAME + * (LargeDed..._IN_0) where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis. + * + * @return the roleInstance value. + */ + public String roleInstance() { + return this.roleInstance; + } + + /** + * Set the roleInstance property: Role Instance. Null if this counter is not per instance This is returned and + * should be whichever instance name we desire to be returned i.e. CPU and Memory return RDWORKERNAME + * (LargeDed..._IN_0) where RDWORKERNAME is Machine name below and RoleInstance name in parenthesis. + * + * @param roleInstance the roleInstance value to set. + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withRoleInstance(String roleInstance) { + this.roleInstance = roleInstance; + return this; + } + + /** + * Get the total property: Total value of the metric. If multiple measurements are made this will have sum of all. + * + * @return the total value. + */ + public Double total() { + return this.total; + } + + /** + * Set the total property: Total value of the metric. If multiple measurements are made this will have sum of all. + * + * @param total the total value to set. + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withTotal(Double total) { + this.total = total; + return this; + } + + /** + * Get the maximum property: Maximum of the metric sampled during the time period. + * + * @return the maximum value. + */ + public Double maximum() { + return this.maximum; + } + + /** + * Set the maximum property: Maximum of the metric sampled during the time period. + * + * @param maximum the maximum value to set. + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withMaximum(Double maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the minimum property: Minimum of the metric sampled during the time period. + * + * @return the minimum value. + */ + public Double minimum() { + return this.minimum; + } + + /** + * Set the minimum property: Minimum of the metric sampled during the time period. + * + * @param minimum the minimum value to set. + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withMinimum(Double minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the isAggregated property: Whether the values are aggregates across all workers or not. + * + * @return the isAggregated value. + */ + public Boolean isAggregated() { + return this.isAggregated; + } + + /** + * Set the isAggregated property: Whether the values are aggregates across all workers or not. + * + * @param isAggregated the isAggregated value to set. + * @return the DiagnosticMetricSample object itself. + */ + public DiagnosticMetricSample withIsAggregated(Boolean isAggregated) { + this.isAggregated = isAggregated; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticMetricSet.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticMetricSet.java new file mode 100644 index 0000000000000..ce06b11341442 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DiagnosticMetricSet.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Class representing Diagnostic Metric information. */ +@Fluent +public final class DiagnosticMetricSet { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnosticMetricSet.class); + + /* + * Name of the metric + */ + @JsonProperty(value = "name") + private String name; + + /* + * Metric's unit + */ + @JsonProperty(value = "unit") + private String unit; + + /* + * Start time of the period + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * End time of the period + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /* + * Collection of metric values for the selected period based on the + * {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain} + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the name property: Name of the metric. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the metric. + * + * @param name the name value to set. + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withName(String name) { + this.name = name; + return this; + } + + /** + * Get the unit property: Metric's unit. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit property: Metric's unit. + * + * @param unit the unit value to set. + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the startTime property: Start time of the period. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time of the period. + * + * @param startTime the startTime value to set. + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: End time of the period. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time of the period. + * + * @param endTime the endTime value to set. + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the timeGrain property: Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D. + * + * @return the timeGrain value. + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Set the timeGrain property: Presented time grain. Supported grains at the moment are PT1M, PT1H, P1D. + * + * @param timeGrain the timeGrain value to set. + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get the values property: Collection of metric values for the selected period based on the + * {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: Collection of metric values for the selected period based on the + * {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain}. + * + * @param values the values value to set. + * @return the DiagnosticMetricSet object itself. + */ + public DiagnosticMetricSet withValues(List values) { + this.values = values; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (values() != null) { + values().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Diagnostics.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Diagnostics.java new file mode 100644 index 0000000000000..f7ebc677c35bf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Diagnostics.java @@ -0,0 +1,795 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.time.OffsetDateTime; + +/** Resource collection API of Diagnostics. */ +public interface Diagnostics { + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + PagedIterable listHostingEnvironmentDetectorResponses(String resourceGroupName, String name); + + /** + * Description for List Hosting Environment Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + PagedIterable listHostingEnvironmentDetectorResponses( + String resourceGroupName, String name, Context context); + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + DetectorResponse getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName); + + /** + * Description for Get Hosting Environment Detector Response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name App Service Environment Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + Response getHostingEnvironmentDetectorResponseWithResponse( + String resourceGroupName, + String name, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + PagedIterable listSiteDetectorResponses(String resourceGroupName, String siteName); + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + PagedIterable listSiteDetectorResponses( + String resourceGroupName, String siteName, Context context); + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + DetectorResponse getSiteDetectorResponse(String resourceGroupName, String siteName, String detectorName); + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + Response getSiteDetectorResponseWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Categories. + */ + PagedIterable listSiteDiagnosticCategories(String resourceGroupName, String siteName); + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Categories. + */ + PagedIterable listSiteDiagnosticCategories( + String resourceGroupName, String siteName, Context context); + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + DiagnosticCategory getSiteDiagnosticCategory(String resourceGroupName, String siteName, String diagnosticCategory); + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + Response getSiteDiagnosticCategoryWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, Context context); + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Analyses. + */ + PagedIterable listSiteAnalyses( + String resourceGroupName, String siteName, String diagnosticCategory); + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Analyses. + */ + PagedIterable listSiteAnalyses( + String resourceGroupName, String siteName, String diagnosticCategory, Context context); + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + AnalysisDefinition getSiteAnalysis( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName); + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + Response getSiteAnalysisWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, Context context); + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + DiagnosticAnalysis executeSiteAnalysis( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName); + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + Response executeSiteAnalysisWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Detectors. + */ + PagedIterable listSiteDetectors( + String resourceGroupName, String siteName, String diagnosticCategory); + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Detectors. + */ + PagedIterable listSiteDetectors( + String resourceGroupName, String siteName, String diagnosticCategory, Context context); + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + DetectorDefinitionResource getSiteDetector( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName); + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + Response getSiteDetectorWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, Context context); + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + DiagnosticDetectorResponse executeSiteDetector( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory); + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + Response executeSiteDetectorWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + PagedIterable listSiteDetectorResponsesSlot( + String resourceGroupName, String siteName, String slot); + + /** + * Description for List Site Detector Responses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 detector responses. + */ + PagedIterable listSiteDetectorResponsesSlot( + String resourceGroupName, String siteName, String slot, Context context); + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + DetectorResponse getSiteDetectorResponseSlot( + String resourceGroupName, String siteName, String detectorName, String slot); + + /** + * Description for Get site detector response. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Detector. + */ + Response getSiteDetectorResponseSlotWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Categories. + */ + PagedIterable listSiteDiagnosticCategoriesSlot( + String resourceGroupName, String siteName, String slot); + + /** + * Description for Get Diagnostics Categories. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Categories. + */ + PagedIterable listSiteDiagnosticCategoriesSlot( + String resourceGroupName, String siteName, String slot, Context context); + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + DiagnosticCategory getSiteDiagnosticCategorySlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot); + + /** + * Description for Get Diagnostics Category. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing detector definition. + */ + Response getSiteDiagnosticCategorySlotWithResponse( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context); + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Analyses. + */ + PagedIterable listSiteAnalysesSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot); + + /** + * Description for Get Site Analyses. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Analyses. + */ + PagedIterable listSiteAnalysesSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context); + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + AnalysisDefinition getSiteAnalysisSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot); + + /** + * Description for Get Site Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param analysisName Analysis Name. + * @param slot Slot - optional. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return definition of Analysis. + */ + Response getSiteAnalysisSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + Context context); + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + DiagnosticAnalysis executeSiteAnalysisSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String analysisName, String slot); + + /** + * Description for Execute Analysis. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Category Name. + * @param analysisName Analysis Resource Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a diagnostic analysis done on an application. + */ + Response executeSiteAnalysisSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String analysisName, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Detectors. + */ + PagedIterable listSiteDetectorsSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot); + + /** + * Description for Get Detectors. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Diagnostic Detectors. + */ + PagedIterable listSiteDetectorsSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String slot, Context context); + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + DetectorDefinitionResource getSiteDetectorSlot( + String resourceGroupName, String siteName, String diagnosticCategory, String detectorName, String slot); + + /** + * Description for Get Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param diagnosticCategory Diagnostic Category. + * @param detectorName Detector Name. + * @param slot Slot Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return aRM resource for a detector definition. + */ + Response getSiteDetectorSlotWithResponse( + String resourceGroupName, + String siteName, + String diagnosticCategory, + String detectorName, + String slot, + Context context); + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + DiagnosticDetectorResponse executeSiteDetectorSlot( + String resourceGroupName, String siteName, String detectorName, String diagnosticCategory, String slot); + + /** + * Description for Execute Detector. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site Name. + * @param detectorName Detector Resource Name. + * @param diagnosticCategory Category Name. + * @param slot Slot Name. + * @param startTime Start Time. + * @param endTime End Time. + * @param timeGrain Time Grain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing Response from Diagnostic Detectors. + */ + Response executeSiteDetectorSlotWithResponse( + String resourceGroupName, + String siteName, + String detectorName, + String diagnosticCategory, + String slot, + OffsetDateTime startTime, + OffsetDateTime endTime, + String timeGrain, + Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Dimension.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Dimension.java new file mode 100644 index 0000000000000..a3b4039d372bf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Dimension.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dimension of a resource metric. For e.g. instance specific HTTP requests for a web app, where instance name is + * dimension of the metric HTTP request. + */ +@Fluent +public final class Dimension { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Dimension.class); + + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The displayName property. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The internalName property. + */ + @JsonProperty(value = "internalName") + private String internalName; + + /* + * The toBeExportedForShoebox property. + */ + @JsonProperty(value = "toBeExportedForShoebox") + private Boolean toBeExportedForShoebox; + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the Dimension object itself. + */ + public Dimension withName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName property: The displayName property. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The displayName property. + * + * @param displayName the displayName value to set. + * @return the Dimension object itself. + */ + public Dimension withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the internalName property: The internalName property. + * + * @return the internalName value. + */ + public String internalName() { + return this.internalName; + } + + /** + * Set the internalName property: The internalName property. + * + * @param internalName the internalName value to set. + * @return the Dimension object itself. + */ + public Dimension withInternalName(String internalName) { + this.internalName = internalName; + return this; + } + + /** + * Get the toBeExportedForShoebox property: The toBeExportedForShoebox property. + * + * @return the toBeExportedForShoebox value. + */ + public Boolean toBeExportedForShoebox() { + return this.toBeExportedForShoebox; + } + + /** + * Set the toBeExportedForShoebox property: The toBeExportedForShoebox property. + * + * @param toBeExportedForShoebox the toBeExportedForShoebox value to set. + * @return the Dimension object itself. + */ + public Dimension withToBeExportedForShoebox(Boolean toBeExportedForShoebox) { + this.toBeExportedForShoebox = toBeExportedForShoebox; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DnsType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DnsType.java new file mode 100644 index 0000000000000..69477d015edbe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DnsType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for DnsType. */ +public enum DnsType { + /** Enum value AzureDns. */ + AZURE_DNS("AzureDns"), + + /** Enum value DefaultDomainRegistrarDns. */ + DEFAULT_DOMAIN_REGISTRAR_DNS("DefaultDomainRegistrarDns"); + + /** The actual serialized value for a DnsType instance. */ + private final String value; + + DnsType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DnsType instance. + * + * @param value the serialized value to parse. + * @return the parsed DnsType object, or null if unable to parse. + */ + @JsonCreator + public static DnsType fromString(String value) { + DnsType[] items = DnsType.values(); + for (DnsType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DnsVerificationTestResult.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DnsVerificationTestResult.java new file mode 100644 index 0000000000000..b8455cbdb6023 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DnsVerificationTestResult.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for DnsVerificationTestResult. */ +public enum DnsVerificationTestResult { + /** Enum value Passed. */ + PASSED("Passed"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Skipped. */ + SKIPPED("Skipped"); + + /** The actual serialized value for a DnsVerificationTestResult instance. */ + private final String value; + + DnsVerificationTestResult(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DnsVerificationTestResult instance. + * + * @param value the serialized value to parse. + * @return the parsed DnsVerificationTestResult object, or null if unable to parse. + */ + @JsonCreator + public static DnsVerificationTestResult fromString(String value) { + DnsVerificationTestResult[] items = DnsVerificationTestResult.values(); + for (DnsVerificationTestResult item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Domain.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Domain.java new file mode 100644 index 0000000000000..49b21aa9d38b7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Domain.java @@ -0,0 +1,564 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of Domain. */ +public interface Domain { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the contactAdmin property: Administrative contact. + * + * @return the contactAdmin value. + */ + Contact contactAdmin(); + + /** + * Gets the contactBilling property: Billing contact. + * + * @return the contactBilling value. + */ + Contact contactBilling(); + + /** + * Gets the contactRegistrant property: Registrant contact. + * + * @return the contactRegistrant value. + */ + Contact contactRegistrant(); + + /** + * Gets the contactTech property: Technical contact. + * + * @return the contactTech value. + */ + Contact contactTech(); + + /** + * Gets the registrationStatus property: Domain registration status. + * + * @return the registrationStatus value. + */ + DomainStatus registrationStatus(); + + /** + * Gets the provisioningState property: Domain provisioning state. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the nameServers property: Name servers. + * + * @return the nameServers value. + */ + List nameServers(); + + /** + * Gets the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @return the privacy value. + */ + Boolean privacy(); + + /** + * Gets the createdTime property: Domain creation timestamp. + * + * @return the createdTime value. + */ + OffsetDateTime createdTime(); + + /** + * Gets the expirationTime property: Domain expiration timestamp. + * + * @return the expirationTime value. + */ + OffsetDateTime expirationTime(); + + /** + * Gets the lastRenewedTime property: Timestamp when the domain was renewed last time. + * + * @return the lastRenewedTime value. + */ + OffsetDateTime lastRenewedTime(); + + /** + * Gets the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + Boolean autoRenew(); + + /** + * Gets the readyForDnsRecordManagement property: <code>true</code> if Azure can assign this domain to + * App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if + * domain registration status is active and it is hosted on name servers Azure has programmatic access to. + * + * @return the readyForDnsRecordManagement value. + */ + Boolean readyForDnsRecordManagement(); + + /** + * Gets the managedHostNames property: All hostnames derived from the domain and assigned to Azure resources. + * + * @return the managedHostNames value. + */ + List managedHostNames(); + + /** + * Gets the consent property: Legal agreement consent. + * + * @return the consent value. + */ + DomainPurchaseConsent consent(); + + /** + * Gets the domainNotRenewableReasons property: Reasons why domain is not renewable. + * + * @return the domainNotRenewableReasons value. + */ + List domainNotRenewableReasons(); + + /** + * Gets the dnsType property: Current DNS type. + * + * @return the dnsType value. + */ + DnsType dnsType(); + + /** + * Gets the dnsZoneId property: Azure DNS Zone to use. + * + * @return the dnsZoneId value. + */ + String dnsZoneId(); + + /** + * Gets the targetDnsType property: Target DNS type (would be used for migration). + * + * @return the targetDnsType value. + */ + DnsType targetDnsType(); + + /** + * Gets the authCode property: The authCode property. + * + * @return the authCode value. + */ + String authCode(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.DomainInner object. + * + * @return the inner object. + */ + DomainInner innerModel(); + + /** The entirety of the Domain definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The Domain definition stages. */ + interface DefinitionStages { + /** The first stage of the Domain definition. */ + interface Blank extends WithLocation { + } + /** The stage of the Domain 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 Domain definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the Domain definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithKind, + DefinitionStages.WithContactAdmin, + DefinitionStages.WithContactBilling, + DefinitionStages.WithContactRegistrant, + DefinitionStages.WithContactTech, + DefinitionStages.WithPrivacy, + DefinitionStages.WithAutoRenew, + DefinitionStages.WithConsent, + DefinitionStages.WithDnsType, + DefinitionStages.WithDnsZoneId, + DefinitionStages.WithTargetDnsType, + DefinitionStages.WithAuthCode { + /** + * Executes the create request. + * + * @return the created resource. + */ + Domain create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Domain create(Context context); + } + /** The stage of the Domain 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 Domain definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the Domain definition allowing to specify contactAdmin. */ + interface WithContactAdmin { + /** + * Specifies the contactAdmin property: Administrative contact.. + * + * @param contactAdmin Administrative contact. + * @return the next definition stage. + */ + WithCreate withContactAdmin(Contact contactAdmin); + } + /** The stage of the Domain definition allowing to specify contactBilling. */ + interface WithContactBilling { + /** + * Specifies the contactBilling property: Billing contact.. + * + * @param contactBilling Billing contact. + * @return the next definition stage. + */ + WithCreate withContactBilling(Contact contactBilling); + } + /** The stage of the Domain definition allowing to specify contactRegistrant. */ + interface WithContactRegistrant { + /** + * Specifies the contactRegistrant property: Registrant contact.. + * + * @param contactRegistrant Registrant contact. + * @return the next definition stage. + */ + WithCreate withContactRegistrant(Contact contactRegistrant); + } + /** The stage of the Domain definition allowing to specify contactTech. */ + interface WithContactTech { + /** + * Specifies the contactTech property: Technical contact.. + * + * @param contactTech Technical contact. + * @return the next definition stage. + */ + WithCreate withContactTech(Contact contactTech); + } + /** The stage of the Domain definition allowing to specify privacy. */ + interface WithPrivacy { + /** + * Specifies the privacy property: <code>true</code> if domain privacy is enabled for this + * domain; otherwise, <code>false</code>.. + * + * @param privacy <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * @return the next definition stage. + */ + WithCreate withPrivacy(Boolean privacy); + } + /** The stage of the Domain definition allowing to specify autoRenew. */ + interface WithAutoRenew { + /** + * Specifies the autoRenew property: <code>true</code> if the domain should be automatically + * renewed; otherwise, <code>false</code>.. + * + * @param autoRenew <code>true</code> if the domain should be automatically renewed; otherwise, + * <code>false</code>. + * @return the next definition stage. + */ + WithCreate withAutoRenew(Boolean autoRenew); + } + /** The stage of the Domain definition allowing to specify consent. */ + interface WithConsent { + /** + * Specifies the consent property: Legal agreement consent.. + * + * @param consent Legal agreement consent. + * @return the next definition stage. + */ + WithCreate withConsent(DomainPurchaseConsent consent); + } + /** The stage of the Domain definition allowing to specify dnsType. */ + interface WithDnsType { + /** + * Specifies the dnsType property: Current DNS type. + * + * @param dnsType Current DNS type. + * @return the next definition stage. + */ + WithCreate withDnsType(DnsType dnsType); + } + /** The stage of the Domain definition allowing to specify dnsZoneId. */ + interface WithDnsZoneId { + /** + * Specifies the dnsZoneId property: Azure DNS Zone to use. + * + * @param dnsZoneId Azure DNS Zone to use. + * @return the next definition stage. + */ + WithCreate withDnsZoneId(String dnsZoneId); + } + /** The stage of the Domain definition allowing to specify targetDnsType. */ + interface WithTargetDnsType { + /** + * Specifies the targetDnsType property: Target DNS type (would be used for migration). + * + * @param targetDnsType Target DNS type (would be used for migration). + * @return the next definition stage. + */ + WithCreate withTargetDnsType(DnsType targetDnsType); + } + /** The stage of the Domain definition allowing to specify authCode. */ + interface WithAuthCode { + /** + * Specifies the authCode property: The authCode property.. + * + * @param authCode The authCode property. + * @return the next definition stage. + */ + WithCreate withAuthCode(String authCode); + } + } + /** + * Begins update for the Domain resource. + * + * @return the stage of resource update. + */ + Domain.Update update(); + + /** The template for Domain update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithPrivacy, + UpdateStages.WithAutoRenew, + UpdateStages.WithDnsType, + UpdateStages.WithDnsZoneId, + UpdateStages.WithTargetDnsType { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Domain apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Domain apply(Context context); + } + /** The Domain update stages. */ + interface UpdateStages { + /** The stage of the Domain update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the Domain update allowing to specify privacy. */ + interface WithPrivacy { + /** + * Specifies the privacy property: <code>true</code> if domain privacy is enabled for this + * domain; otherwise, <code>false</code>.. + * + * @param privacy <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * @return the next definition stage. + */ + Update withPrivacy(Boolean privacy); + } + /** The stage of the Domain update allowing to specify autoRenew. */ + interface WithAutoRenew { + /** + * Specifies the autoRenew property: <code>true</code> if the domain should be automatically + * renewed; otherwise, <code>false</code>.. + * + * @param autoRenew <code>true</code> if the domain should be automatically renewed; otherwise, + * <code>false</code>. + * @return the next definition stage. + */ + Update withAutoRenew(Boolean autoRenew); + } + /** The stage of the Domain update allowing to specify dnsType. */ + interface WithDnsType { + /** + * Specifies the dnsType property: Current DNS type. + * + * @param dnsType Current DNS type. + * @return the next definition stage. + */ + Update withDnsType(DnsType dnsType); + } + /** The stage of the Domain update allowing to specify dnsZoneId. */ + interface WithDnsZoneId { + /** + * Specifies the dnsZoneId property: Azure DNS Zone to use. + * + * @param dnsZoneId Azure DNS Zone to use. + * @return the next definition stage. + */ + Update withDnsZoneId(String dnsZoneId); + } + /** The stage of the Domain update allowing to specify targetDnsType. */ + interface WithTargetDnsType { + /** + * Specifies the targetDnsType property: Target DNS type (would be used for migration). + * + * @param targetDnsType Target DNS type (would be used for migration). + * @return the next definition stage. + */ + Update withTargetDnsType(DnsType targetDnsType); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Domain refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Domain refresh(Context context); + + /** + * Description for Renew a domain. + * + * @throws com.azure.resourcemanager.appservice.generated.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 renew(); + + /** + * Description for Renew a domain. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response renewWithResponse(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainAvailabilityCheckResult.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainAvailabilityCheckResult.java new file mode 100644 index 0000000000000..b211801be53cb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainAvailabilityCheckResult.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainAvailabilityCheckResultInner; + +/** An immutable client-side representation of DomainAvailabilityCheckResult. */ +public interface DomainAvailabilityCheckResult { + /** + * Gets the name property: Name of the domain. + * + * @return the name value. + */ + String name(); + + /** + * Gets the available property: <code>true</code> if domain can be purchased using CreateDomain API; + * otherwise, <code>false</code>. + * + * @return the available value. + */ + Boolean available(); + + /** + * Gets the domainType property: Valid values are Regular domain: Azure will charge the full price of domain + * registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost + * anything. + * + * @return the domainType value. + */ + DomainType domainType(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DomainAvailabilityCheckResultInner + * object. + * + * @return the inner object. + */ + DomainAvailabilityCheckResultInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainCollection.java new file mode 100644 index 0000000000000..5e9575185a10e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of domains. */ +@Fluent +public final class DomainCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainCollection.class); + + /* + * 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; + + /** + * 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 DomainCollection object itself. + */ + public DomainCollection 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 DomainCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainControlCenterSsoRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainControlCenterSsoRequest.java new file mode 100644 index 0000000000000..f0a3b0c2e7b9e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainControlCenterSsoRequest.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainControlCenterSsoRequestInner; + +/** An immutable client-side representation of DomainControlCenterSsoRequest. */ +public interface DomainControlCenterSsoRequest { + /** + * Gets the url property: URL where the single sign-on request is to be made. + * + * @return the url value. + */ + String url(); + + /** + * Gets the postParameterKey property: Post parameter key. + * + * @return the postParameterKey value. + */ + String postParameterKey(); + + /** + * Gets the postParameterValue property: Post parameter value. Client should use 'application/x-www-form-urlencoded' + * encoding for this value. + * + * @return the postParameterValue value. + */ + String postParameterValue(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DomainControlCenterSsoRequestInner + * object. + * + * @return the inner object. + */ + DomainControlCenterSsoRequestInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainOwnershipIdentifier.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainOwnershipIdentifier.java new file mode 100644 index 0000000000000..102d59654b756 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainOwnershipIdentifier.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.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainOwnershipIdentifierInner; + +/** An immutable client-side representation of DomainOwnershipIdentifier. */ +public interface DomainOwnershipIdentifier { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the ownershipId property: Ownership Id. + * + * @return the ownershipId value. + */ + String ownershipId(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.DomainOwnershipIdentifierInner + * object. + * + * @return the inner object. + */ + DomainOwnershipIdentifierInner innerModel(); + + /** The entirety of the DomainOwnershipIdentifier definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The DomainOwnershipIdentifier definition stages. */ + interface DefinitionStages { + /** The first stage of the DomainOwnershipIdentifier definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the DomainOwnershipIdentifier definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, domainName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @return the next definition stage. + */ + WithCreate withExistingDomain(String resourceGroupName, String domainName); + } + /** + * The stage of the DomainOwnershipIdentifier 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.WithKind, DefinitionStages.WithOwnershipId { + /** + * Executes the create request. + * + * @return the created resource. + */ + DomainOwnershipIdentifier create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DomainOwnershipIdentifier create(Context context); + } + /** The stage of the DomainOwnershipIdentifier definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the DomainOwnershipIdentifier definition allowing to specify ownershipId. */ + interface WithOwnershipId { + /** + * Specifies the ownershipId property: Ownership Id.. + * + * @param ownershipId Ownership Id. + * @return the next definition stage. + */ + WithCreate withOwnershipId(String ownershipId); + } + } + /** + * Begins update for the DomainOwnershipIdentifier resource. + * + * @return the stage of resource update. + */ + DomainOwnershipIdentifier.Update update(); + + /** The template for DomainOwnershipIdentifier update. */ + interface Update extends UpdateStages.WithKind, UpdateStages.WithOwnershipId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DomainOwnershipIdentifier apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DomainOwnershipIdentifier apply(Context context); + } + /** The DomainOwnershipIdentifier update stages. */ + interface UpdateStages { + /** The stage of the DomainOwnershipIdentifier update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the DomainOwnershipIdentifier update allowing to specify ownershipId. */ + interface WithOwnershipId { + /** + * Specifies the ownershipId property: Ownership Id.. + * + * @param ownershipId Ownership Id. + * @return the next definition stage. + */ + Update withOwnershipId(String ownershipId); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DomainOwnershipIdentifier refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DomainOwnershipIdentifier refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainOwnershipIdentifierCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainOwnershipIdentifierCollection.java new file mode 100644 index 0000000000000..7e026f1f1bca3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainOwnershipIdentifierCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainOwnershipIdentifierInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of domain ownership identifiers. */ +@Fluent +public final class DomainOwnershipIdentifierCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainOwnershipIdentifierCollection.class); + + /* + * 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; + + /** + * 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 DomainOwnershipIdentifierCollection object itself. + */ + public DomainOwnershipIdentifierCollection 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 DomainOwnershipIdentifierCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPatchResource.java new file mode 100644 index 0000000000000..480ad8661467e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPatchResource.java @@ -0,0 +1,394 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.DomainPatchResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** ARM resource for a domain. */ +@Fluent +public final class DomainPatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainPatchResource.class); + + /* + * DomainPatchResource resource specific properties + */ + @JsonProperty(value = "properties") + private DomainPatchResourceProperties innerProperties; + + /** + * Get the innerProperties property: DomainPatchResource resource specific properties. + * + * @return the innerProperties value. + */ + private DomainPatchResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public DomainPatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the contactAdmin property: Administrative contact. + * + * @return the contactAdmin value. + */ + public Contact contactAdmin() { + return this.innerProperties() == null ? null : this.innerProperties().contactAdmin(); + } + + /** + * Set the contactAdmin property: Administrative contact. + * + * @param contactAdmin the contactAdmin value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withContactAdmin(Contact contactAdmin) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withContactAdmin(contactAdmin); + return this; + } + + /** + * Get the contactBilling property: Billing contact. + * + * @return the contactBilling value. + */ + public Contact contactBilling() { + return this.innerProperties() == null ? null : this.innerProperties().contactBilling(); + } + + /** + * Set the contactBilling property: Billing contact. + * + * @param contactBilling the contactBilling value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withContactBilling(Contact contactBilling) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withContactBilling(contactBilling); + return this; + } + + /** + * Get the contactRegistrant property: Registrant contact. + * + * @return the contactRegistrant value. + */ + public Contact contactRegistrant() { + return this.innerProperties() == null ? null : this.innerProperties().contactRegistrant(); + } + + /** + * Set the contactRegistrant property: Registrant contact. + * + * @param contactRegistrant the contactRegistrant value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withContactRegistrant(Contact contactRegistrant) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withContactRegistrant(contactRegistrant); + return this; + } + + /** + * Get the contactTech property: Technical contact. + * + * @return the contactTech value. + */ + public Contact contactTech() { + return this.innerProperties() == null ? null : this.innerProperties().contactTech(); + } + + /** + * Set the contactTech property: Technical contact. + * + * @param contactTech the contactTech value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withContactTech(Contact contactTech) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withContactTech(contactTech); + return this; + } + + /** + * Get the registrationStatus property: Domain registration status. + * + * @return the registrationStatus value. + */ + public DomainStatus registrationStatus() { + return this.innerProperties() == null ? null : this.innerProperties().registrationStatus(); + } + + /** + * Get the provisioningState property: Domain provisioning state. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the nameServers property: Name servers. + * + * @return the nameServers value. + */ + public List nameServers() { + return this.innerProperties() == null ? null : this.innerProperties().nameServers(); + } + + /** + * Get the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @return the privacy value. + */ + public Boolean privacy() { + return this.innerProperties() == null ? null : this.innerProperties().privacy(); + } + + /** + * Set the privacy property: <code>true</code> if domain privacy is enabled for this domain; otherwise, + * <code>false</code>. + * + * @param privacy the privacy value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withPrivacy(Boolean privacy) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withPrivacy(privacy); + return this; + } + + /** + * Get the createdTime property: Domain creation timestamp. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.innerProperties() == null ? null : this.innerProperties().createdTime(); + } + + /** + * Get the expirationTime property: Domain expiration timestamp. + * + * @return the expirationTime value. + */ + public OffsetDateTime expirationTime() { + return this.innerProperties() == null ? null : this.innerProperties().expirationTime(); + } + + /** + * Get the lastRenewedTime property: Timestamp when the domain was renewed last time. + * + * @return the lastRenewedTime value. + */ + public OffsetDateTime lastRenewedTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastRenewedTime(); + } + + /** + * Get the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @return the autoRenew value. + */ + public Boolean autoRenew() { + return this.innerProperties() == null ? null : this.innerProperties().autoRenew(); + } + + /** + * Set the autoRenew property: <code>true</code> if the domain should be automatically renewed; + * otherwise, <code>false</code>. + * + * @param autoRenew the autoRenew value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withAutoRenew(Boolean autoRenew) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withAutoRenew(autoRenew); + return this; + } + + /** + * Get the readyForDnsRecordManagement property: <code>true</code> if Azure can assign this domain to + * App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if + * domain registration status is active and it is hosted on name servers Azure has programmatic access to. + * + * @return the readyForDnsRecordManagement value. + */ + public Boolean readyForDnsRecordManagement() { + return this.innerProperties() == null ? null : this.innerProperties().readyForDnsRecordManagement(); + } + + /** + * Get the managedHostNames property: All hostnames derived from the domain and assigned to Azure resources. + * + * @return the managedHostNames value. + */ + public List managedHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().managedHostNames(); + } + + /** + * Get the consent property: Legal agreement consent. + * + * @return the consent value. + */ + public DomainPurchaseConsent consent() { + return this.innerProperties() == null ? null : this.innerProperties().consent(); + } + + /** + * Set the consent property: Legal agreement consent. + * + * @param consent the consent value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withConsent(DomainPurchaseConsent consent) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withConsent(consent); + return this; + } + + /** + * Get the domainNotRenewableReasons property: Reasons why domain is not renewable. + * + * @return the domainNotRenewableReasons value. + */ + public List domainNotRenewableReasons() { + return this.innerProperties() == null ? null : this.innerProperties().domainNotRenewableReasons(); + } + + /** + * Get the dnsType property: Current DNS type. + * + * @return the dnsType value. + */ + public DnsType dnsType() { + return this.innerProperties() == null ? null : this.innerProperties().dnsType(); + } + + /** + * Set the dnsType property: Current DNS type. + * + * @param dnsType the dnsType value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withDnsType(DnsType dnsType) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withDnsType(dnsType); + return this; + } + + /** + * Get the dnsZoneId property: Azure DNS Zone to use. + * + * @return the dnsZoneId value. + */ + public String dnsZoneId() { + return this.innerProperties() == null ? null : this.innerProperties().dnsZoneId(); + } + + /** + * Set the dnsZoneId property: Azure DNS Zone to use. + * + * @param dnsZoneId the dnsZoneId value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withDnsZoneId(String dnsZoneId) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withDnsZoneId(dnsZoneId); + return this; + } + + /** + * Get the targetDnsType property: Target DNS type (would be used for migration). + * + * @return the targetDnsType value. + */ + public DnsType targetDnsType() { + return this.innerProperties() == null ? null : this.innerProperties().targetDnsType(); + } + + /** + * Set the targetDnsType property: Target DNS type (would be used for migration). + * + * @param targetDnsType the targetDnsType value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withTargetDnsType(DnsType targetDnsType) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withTargetDnsType(targetDnsType); + return this; + } + + /** + * Get the authCode property: The authCode property. + * + * @return the authCode value. + */ + public String authCode() { + return this.innerProperties() == null ? null : this.innerProperties().authCode(); + } + + /** + * Set the authCode property: The authCode property. + * + * @param authCode the authCode value to set. + * @return the DomainPatchResource object itself. + */ + public DomainPatchResource withAuthCode(String authCode) { + if (this.innerProperties() == null) { + this.innerProperties = new DomainPatchResourceProperties(); + } + this.innerProperties().withAuthCode(authCode); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPatchResourcePropertiesDomainNotRenewableReasonsItem.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPatchResourcePropertiesDomainNotRenewableReasonsItem.java new file mode 100644 index 0000000000000..77146f69fa35d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPatchResourcePropertiesDomainNotRenewableReasonsItem.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DomainPatchResourcePropertiesDomainNotRenewableReasonsItem. */ +public final class DomainPatchResourcePropertiesDomainNotRenewableReasonsItem + extends ExpandableStringEnum { + /** + * Static value RegistrationStatusNotSupportedForRenewal for + * DomainPatchResourcePropertiesDomainNotRenewableReasonsItem. + */ + public static final DomainPatchResourcePropertiesDomainNotRenewableReasonsItem + REGISTRATION_STATUS_NOT_SUPPORTED_FOR_RENEWAL = fromString("RegistrationStatusNotSupportedForRenewal"); + + /** Static value ExpirationNotInRenewalTimeRange for DomainPatchResourcePropertiesDomainNotRenewableReasonsItem. */ + public static final DomainPatchResourcePropertiesDomainNotRenewableReasonsItem + EXPIRATION_NOT_IN_RENEWAL_TIME_RANGE = fromString("ExpirationNotInRenewalTimeRange"); + + /** Static value SubscriptionNotActive for DomainPatchResourcePropertiesDomainNotRenewableReasonsItem. */ + public static final DomainPatchResourcePropertiesDomainNotRenewableReasonsItem SUBSCRIPTION_NOT_ACTIVE = + fromString("SubscriptionNotActive"); + + /** + * Creates or finds a DomainPatchResourcePropertiesDomainNotRenewableReasonsItem from its string representation. + * + * @param name a name to look for. + * @return the corresponding DomainPatchResourcePropertiesDomainNotRenewableReasonsItem. + */ + @JsonCreator + public static DomainPatchResourcePropertiesDomainNotRenewableReasonsItem fromString(String name) { + return fromString(name, DomainPatchResourcePropertiesDomainNotRenewableReasonsItem.class); + } + + /** @return known DomainPatchResourcePropertiesDomainNotRenewableReasonsItem values. */ + public static Collection values() { + return values(DomainPatchResourcePropertiesDomainNotRenewableReasonsItem.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPropertiesDomainNotRenewableReasonsItem.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPropertiesDomainNotRenewableReasonsItem.java new file mode 100644 index 0000000000000..28042c356406e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPropertiesDomainNotRenewableReasonsItem.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for DomainPropertiesDomainNotRenewableReasonsItem. */ +public final class DomainPropertiesDomainNotRenewableReasonsItem + extends ExpandableStringEnum { + /** Static value RegistrationStatusNotSupportedForRenewal for DomainPropertiesDomainNotRenewableReasonsItem. */ + public static final DomainPropertiesDomainNotRenewableReasonsItem REGISTRATION_STATUS_NOT_SUPPORTED_FOR_RENEWAL = + fromString("RegistrationStatusNotSupportedForRenewal"); + + /** Static value ExpirationNotInRenewalTimeRange for DomainPropertiesDomainNotRenewableReasonsItem. */ + public static final DomainPropertiesDomainNotRenewableReasonsItem EXPIRATION_NOT_IN_RENEWAL_TIME_RANGE = + fromString("ExpirationNotInRenewalTimeRange"); + + /** Static value SubscriptionNotActive for DomainPropertiesDomainNotRenewableReasonsItem. */ + public static final DomainPropertiesDomainNotRenewableReasonsItem SUBSCRIPTION_NOT_ACTIVE = + fromString("SubscriptionNotActive"); + + /** + * Creates or finds a DomainPropertiesDomainNotRenewableReasonsItem from its string representation. + * + * @param name a name to look for. + * @return the corresponding DomainPropertiesDomainNotRenewableReasonsItem. + */ + @JsonCreator + public static DomainPropertiesDomainNotRenewableReasonsItem fromString(String name) { + return fromString(name, DomainPropertiesDomainNotRenewableReasonsItem.class); + } + + /** @return known DomainPropertiesDomainNotRenewableReasonsItem values. */ + public static Collection values() { + return values(DomainPropertiesDomainNotRenewableReasonsItem.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPurchaseConsent.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPurchaseConsent.java new file mode 100644 index 0000000000000..cbec6ad53021b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainPurchaseConsent.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Domain purchase consent object, representing acceptance of applicable legal agreements. */ +@Fluent +public final class DomainPurchaseConsent { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainPurchaseConsent.class); + + /* + * List of applicable legal agreement keys. This list can be retrieved + * using ListLegalAgreements API under TopLevelDomain + * resource. + */ + @JsonProperty(value = "agreementKeys") + private List agreementKeys; + + /* + * Client IP address. + */ + @JsonProperty(value = "agreedBy") + private String agreedBy; + + /* + * Timestamp when the agreements were accepted. + */ + @JsonProperty(value = "agreedAt") + private OffsetDateTime agreedAt; + + /** + * Get the agreementKeys property: List of applicable legal agreement keys. This list can be retrieved using + * ListLegalAgreements API under <code>TopLevelDomain</code> resource. + * + * @return the agreementKeys value. + */ + public List agreementKeys() { + return this.agreementKeys; + } + + /** + * Set the agreementKeys property: List of applicable legal agreement keys. This list can be retrieved using + * ListLegalAgreements API under <code>TopLevelDomain</code> resource. + * + * @param agreementKeys the agreementKeys value to set. + * @return the DomainPurchaseConsent object itself. + */ + public DomainPurchaseConsent withAgreementKeys(List agreementKeys) { + this.agreementKeys = agreementKeys; + return this; + } + + /** + * Get the agreedBy property: Client IP address. + * + * @return the agreedBy value. + */ + public String agreedBy() { + return this.agreedBy; + } + + /** + * Set the agreedBy property: Client IP address. + * + * @param agreedBy the agreedBy value to set. + * @return the DomainPurchaseConsent object itself. + */ + public DomainPurchaseConsent withAgreedBy(String agreedBy) { + this.agreedBy = agreedBy; + return this; + } + + /** + * Get the agreedAt property: Timestamp when the agreements were accepted. + * + * @return the agreedAt value. + */ + public OffsetDateTime agreedAt() { + return this.agreedAt; + } + + /** + * Set the agreedAt property: Timestamp when the agreements were accepted. + * + * @param agreedAt the agreedAt value to set. + * @return the DomainPurchaseConsent object itself. + */ + public DomainPurchaseConsent withAgreedAt(OffsetDateTime agreedAt) { + this.agreedAt = agreedAt; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainRecommendationSearchParameters.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainRecommendationSearchParameters.java new file mode 100644 index 0000000000000..acf477bf678a7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainRecommendationSearchParameters.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Domain recommendation search parameters. */ +@Fluent +public final class DomainRecommendationSearchParameters { + @JsonIgnore private final ClientLogger logger = new ClientLogger(DomainRecommendationSearchParameters.class); + + /* + * Keywords to be used for generating domain recommendations. + */ + @JsonProperty(value = "keywords") + private String keywords; + + /* + * Maximum number of recommendations. + */ + @JsonProperty(value = "maxDomainRecommendations") + private Integer maxDomainRecommendations; + + /** + * Get the keywords property: Keywords to be used for generating domain recommendations. + * + * @return the keywords value. + */ + public String keywords() { + return this.keywords; + } + + /** + * Set the keywords property: Keywords to be used for generating domain recommendations. + * + * @param keywords the keywords value to set. + * @return the DomainRecommendationSearchParameters object itself. + */ + public DomainRecommendationSearchParameters withKeywords(String keywords) { + this.keywords = keywords; + return this; + } + + /** + * Get the maxDomainRecommendations property: Maximum number of recommendations. + * + * @return the maxDomainRecommendations value. + */ + public Integer maxDomainRecommendations() { + return this.maxDomainRecommendations; + } + + /** + * Set the maxDomainRecommendations property: Maximum number of recommendations. + * + * @param maxDomainRecommendations the maxDomainRecommendations value to set. + * @return the DomainRecommendationSearchParameters object itself. + */ + public DomainRecommendationSearchParameters withMaxDomainRecommendations(Integer maxDomainRecommendations) { + this.maxDomainRecommendations = maxDomainRecommendations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainRegistrationProviders.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainRegistrationProviders.java new file mode 100644 index 0000000000000..df51d91deccd2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainRegistrationProviders.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.appservice.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of DomainRegistrationProviders. */ +public interface DomainRegistrationProviders { + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + PagedIterable listOperations(); + + /** + * Description for Implements Csm operations Api to exposes the list of available Csm Apis under the resource + * provider. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + PagedIterable listOperations(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainStatus.java new file mode 100644 index 0000000000000..4d1996bbd54e4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainStatus.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for DomainStatus. */ +public enum DomainStatus { + /** Enum value Active. */ + ACTIVE("Active"), + + /** Enum value Awaiting. */ + AWAITING("Awaiting"), + + /** Enum value Cancelled. */ + CANCELLED("Cancelled"), + + /** Enum value Confiscated. */ + CONFISCATED("Confiscated"), + + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value Excluded. */ + EXCLUDED("Excluded"), + + /** Enum value Expired. */ + EXPIRED("Expired"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Held. */ + HELD("Held"), + + /** Enum value Locked. */ + LOCKED("Locked"), + + /** Enum value Parked. */ + PARKED("Parked"), + + /** Enum value Pending. */ + PENDING("Pending"), + + /** Enum value Reserved. */ + RESERVED("Reserved"), + + /** Enum value Reverted. */ + REVERTED("Reverted"), + + /** Enum value Suspended. */ + SUSPENDED("Suspended"), + + /** Enum value Transferred. */ + TRANSFERRED("Transferred"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value Unlocked. */ + UNLOCKED("Unlocked"), + + /** Enum value Unparked. */ + UNPARKED("Unparked"), + + /** Enum value Updated. */ + UPDATED("Updated"), + + /** Enum value JsonConverterFailed. */ + JSON_CONVERTER_FAILED("JsonConverterFailed"); + + /** The actual serialized value for a DomainStatus instance. */ + private final String value; + + DomainStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DomainStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed DomainStatus object, or null if unable to parse. + */ + @JsonCreator + public static DomainStatus fromString(String value) { + DomainStatus[] items = DomainStatus.values(); + for (DomainStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainType.java new file mode 100644 index 0000000000000..2f4515be6a7d6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/DomainType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for DomainType. */ +public enum DomainType { + /** Enum value Regular. */ + REGULAR("Regular"), + + /** Enum value SoftDeleted. */ + SOFT_DELETED("SoftDeleted"); + + /** The actual serialized value for a DomainType instance. */ + private final String value; + + DomainType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DomainType instance. + * + * @param value the serialized value to parse. + * @return the parsed DomainType object, or null if unable to parse. + */ + @JsonCreator + public static DomainType fromString(String value) { + DomainType[] items = DomainType.values(); + for (DomainType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Domains.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Domains.java new file mode 100644 index 0000000000000..61309d5c96291 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Domains.java @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.NameIdentifierInner; + +/** Resource collection API of Domains. */ +public interface Domains { + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + DomainAvailabilityCheckResult checkAvailability(NameIdentifierInner identifier); + + /** + * Description for Check if a domain is available for registration. + * + * @param identifier Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain availability check result. + */ + Response checkAvailabilityWithResponse( + NameIdentifierInner identifier, Context context); + + /** + * Description for Get all domains in a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 domains. + */ + PagedIterable list(); + + /** + * Description for Get all domains in a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domains. + */ + PagedIterable list(Context context); + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + DomainControlCenterSsoRequest getControlCenterSsoRequest(); + + /** + * Description for Generate a single sign-on request for the domain management portal. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return single sign-on request information for domain management. + */ + Response getControlCenterSsoRequestWithResponse(Context context); + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain name identifiers. + */ + PagedIterable listRecommendations(DomainRecommendationSearchParameters parameters); + + /** + * Description for Get domain name recommendations based on keywords. + * + * @param parameters Search parameters for domain name recommendations. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain name identifiers. + */ + PagedIterable listRecommendations(DomainRecommendationSearchParameters parameters, Context context); + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domains. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all domains in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domains. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + Domain getByResourceGroup(String resourceGroupName, String domainName); + + /** + * Description for Get a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String domainName, Context context); + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 domainName); + + /** + * Description for Delete a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default + * is <code>false</code> which deletes the domain after 24 hours. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse( + String resourceGroupName, String domainName, Boolean forceHardDeleteDomain, Context context); + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain ownership identifiers. + */ + PagedIterable listOwnershipIdentifiers(String resourceGroupName, String domainName); + + /** + * Description for Lists domain ownership identifiers. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain ownership identifiers. + */ + PagedIterable listOwnershipIdentifiers( + String resourceGroupName, String domainName, Context context); + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + DomainOwnershipIdentifier getOwnershipIdentifier(String resourceGroupName, String domainName, String name); + + /** + * Description for Get ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + Response getOwnershipIdentifierWithResponse( + String resourceGroupName, String domainName, String name, Context context); + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteOwnershipIdentifier(String resourceGroupName, String domainName, String name); + + /** + * Description for Delete ownership identifier for domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param name Name of identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteOwnershipIdentifierWithResponse( + String resourceGroupName, String domainName, String name, Context context); + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 renew(String resourceGroupName, String domainName); + + /** + * Description for Renew a domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of the domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response renewWithResponse(String resourceGroupName, String domainName, Context context); + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + Domain transferOut(String resourceGroupName, String domainName); + + /** + * Transfer out domain to another registrar. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param domainName Name of domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + Response transferOutWithResponse(String resourceGroupName, String domainName, Context context); + + /** + * Description for Get a domain. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + Domain getById(String id); + + /** + * Description for Get a domain. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about a domain. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Get ownership identifier for domain. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + DomainOwnershipIdentifier getOwnershipIdentifierById(String id); + + /** + * Description for Get ownership identifier for domain. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return domain ownership Identifier. + */ + Response getOwnershipIdentifierByIdWithResponse(String id, Context context); + + /** + * Description for Delete a domain. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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); + + /** + * Description for Delete a domain. + * + * @param id the resource ID. + * @param forceHardDeleteDomain Specify <code>true</code> to delete the domain immediately. The default + * is <code>false</code> which deletes the domain after 24 hours. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse(String id, Boolean forceHardDeleteDomain, Context context); + + /** + * Description for Delete ownership identifier for domain. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteOwnershipIdentifierById(String id); + + /** + * Description for Delete ownership identifier for domain. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteOwnershipIdentifierByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Domain resource. + * + * @param name resource name. + * @return the first stage of the new Domain definition. + */ + Domain.DefinitionStages.Blank define(String name); + + /** + * Begins definition for a new DomainOwnershipIdentifier resource. + * + * @param name resource name. + * @return the first stage of the new DomainOwnershipIdentifier definition. + */ + DomainOwnershipIdentifier.DefinitionStages.Blank defineOwnershipIdentifier(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnabledConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnabledConfig.java new file mode 100644 index 0000000000000..c1e6e1e63f355 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnabledConfig.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Enabled configuration. */ +@Fluent +public final class EnabledConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EnabledConfig.class); + + /* + * True if configuration is enabled, false if it is disabled and null if + * configuration is not set. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get the enabled property: True if configuration is enabled, false if it is disabled and null if configuration is + * not set. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: True if configuration is enabled, false if it is disabled and null if configuration is + * not set. + * + * @param enabled the enabled value to set. + * @return the EnabledConfig object itself. + */ + public EnabledConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EndpointDependency.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EndpointDependency.java new file mode 100644 index 0000000000000..1578bc3bf4d12 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EndpointDependency.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A domain name that a service is reached at, including details of the current connection status. */ +@Fluent +public final class EndpointDependency { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointDependency.class); + + /* + * The domain name of the dependency. + */ + @JsonProperty(value = "domainName") + private String domainName; + + /* + * The IP Addresses and Ports used when connecting to DomainName. + */ + @JsonProperty(value = "endpointDetails") + private List endpointDetails; + + /** + * Get the domainName property: The domain name of the dependency. + * + * @return the domainName value. + */ + public String domainName() { + return this.domainName; + } + + /** + * Set the domainName property: The domain name of the dependency. + * + * @param domainName the domainName value to set. + * @return the EndpointDependency object itself. + */ + public EndpointDependency withDomainName(String domainName) { + this.domainName = domainName; + return this; + } + + /** + * Get the endpointDetails property: The IP Addresses and Ports used when connecting to DomainName. + * + * @return the endpointDetails value. + */ + public List endpointDetails() { + return this.endpointDetails; + } + + /** + * Set the endpointDetails property: The IP Addresses and Ports used when connecting to DomainName. + * + * @param endpointDetails the endpointDetails value to set. + * @return the EndpointDependency object itself. + */ + public EndpointDependency withEndpointDetails(List endpointDetails) { + this.endpointDetails = endpointDetails; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (endpointDetails() != null) { + endpointDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EndpointDetail.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EndpointDetail.java new file mode 100644 index 0000000000000..53e99075cc6a8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EndpointDetail.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Current TCP connectivity information from the App Service Environment to a single endpoint. */ +@Fluent +public final class EndpointDetail { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EndpointDetail.class); + + /* + * An IP Address that Domain Name currently resolves to. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /* + * The port an endpoint is connected to. + */ + @JsonProperty(value = "port") + private Integer port; + + /* + * The time in milliseconds it takes for a TCP connection to be created + * from the App Service Environment to this IpAddress at this Port. + */ + @JsonProperty(value = "latency") + private Double latency; + + /* + * Whether it is possible to create a TCP connection from the App Service + * Environment to this IpAddress at this Port. + */ + @JsonProperty(value = "isAccessible") + private Boolean isAccessible; + + /** + * Get the ipAddress property: An IP Address that Domain Name currently resolves to. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: An IP Address that Domain Name currently resolves to. + * + * @param ipAddress the ipAddress value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the port property: The port an endpoint is connected to. + * + * @return the port value. + */ + public Integer port() { + return this.port; + } + + /** + * Set the port property: The port an endpoint is connected to. + * + * @param port the port value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withPort(Integer port) { + this.port = port; + return this; + } + + /** + * Get the latency property: The time in milliseconds it takes for a TCP connection to be created from the App + * Service Environment to this IpAddress at this Port. + * + * @return the latency value. + */ + public Double latency() { + return this.latency; + } + + /** + * Set the latency property: The time in milliseconds it takes for a TCP connection to be created from the App + * Service Environment to this IpAddress at this Port. + * + * @param latency the latency value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withLatency(Double latency) { + this.latency = latency; + return this; + } + + /** + * Get the isAccessible property: Whether it is possible to create a TCP connection from the App Service Environment + * to this IpAddress at this Port. + * + * @return the isAccessible value. + */ + public Boolean isAccessible() { + return this.isAccessible; + } + + /** + * Set the isAccessible property: Whether it is possible to create a TCP connection from the App Service Environment + * to this IpAddress at this Port. + * + * @param isAccessible the isAccessible value to set. + * @return the EndpointDetail object itself. + */ + public EndpointDetail withIsAccessible(Boolean isAccessible) { + this.isAccessible = isAccessible; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnterpriseGradeCdnStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnterpriseGradeCdnStatus.java new file mode 100644 index 0000000000000..d6c73579c60fc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnterpriseGradeCdnStatus.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for EnterpriseGradeCdnStatus. */ +public final class EnterpriseGradeCdnStatus extends ExpandableStringEnum { + /** Static value Enabled for EnterpriseGradeCdnStatus. */ + public static final EnterpriseGradeCdnStatus ENABLED = fromString("Enabled"); + + /** Static value Enabling for EnterpriseGradeCdnStatus. */ + public static final EnterpriseGradeCdnStatus ENABLING = fromString("Enabling"); + + /** Static value Disabled for EnterpriseGradeCdnStatus. */ + public static final EnterpriseGradeCdnStatus DISABLED = fromString("Disabled"); + + /** Static value Disabling for EnterpriseGradeCdnStatus. */ + public static final EnterpriseGradeCdnStatus DISABLING = fromString("Disabling"); + + /** + * Creates or finds a EnterpriseGradeCdnStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding EnterpriseGradeCdnStatus. + */ + @JsonCreator + public static EnterpriseGradeCdnStatus fromString(String name) { + return fromString(name, EnterpriseGradeCdnStatus.class); + } + + /** @return known EnterpriseGradeCdnStatus values. */ + public static Collection values() { + return values(EnterpriseGradeCdnStatus.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnvironmentVar.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnvironmentVar.java new file mode 100644 index 0000000000000..689968f1937ec --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/EnvironmentVar.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container App container environment variable. */ +@Fluent +public final class EnvironmentVar { + @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentVar.class); + + /* + * Environment variable name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Non-secret environment variable value. + */ + @JsonProperty(value = "value") + private String value; + + /* + * Name of the Container App secret from which to pull the environment + * variable value. + */ + @JsonProperty(value = "secretRef") + private String secretRef; + + /** + * Get the name property: Environment variable name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Environment variable name. + * + * @param name the name value to set. + * @return the EnvironmentVar object itself. + */ + public EnvironmentVar withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Non-secret environment variable value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Non-secret environment variable value. + * + * @param value the value value to set. + * @return the EnvironmentVar object itself. + */ + public EnvironmentVar withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the secretRef property: Name of the Container App secret from which to pull the environment variable value. + * + * @return the secretRef value. + */ + public String secretRef() { + return this.secretRef; + } + + /** + * Set the secretRef property: Name of the Container App secret from which to pull the environment variable value. + * + * @param secretRef the secretRef value to set. + * @return the EnvironmentVar object itself. + */ + public EnvironmentVar withSecretRef(String secretRef) { + this.secretRef = secretRef; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ErrorEntity.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ErrorEntity.java new file mode 100644 index 0000000000000..27b4e33e2ea84 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ErrorEntity.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Body of the error response returned from the API. */ +@Fluent +public final class ErrorEntity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ErrorEntity.class); + + /* + * Type of error. + */ + @JsonProperty(value = "extendedCode") + private String extendedCode; + + /* + * Message template. + */ + @JsonProperty(value = "messageTemplate") + private String messageTemplate; + + /* + * Parameters for the template. + */ + @JsonProperty(value = "parameters") + private List parameters; + + /* + * Inner errors. + */ + @JsonProperty(value = "innerErrors") + private List innerErrors; + + /* + * Error Details. + */ + @JsonProperty(value = "details") + private List details; + + /* + * The error target. + */ + @JsonProperty(value = "target") + private String target; + + /* + * Basic error code. + */ + @JsonProperty(value = "code") + private String code; + + /* + * Any details of the error. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the extendedCode property: Type of error. + * + * @return the extendedCode value. + */ + public String extendedCode() { + return this.extendedCode; + } + + /** + * Set the extendedCode property: Type of error. + * + * @param extendedCode the extendedCode value to set. + * @return the ErrorEntity object itself. + */ + public ErrorEntity withExtendedCode(String extendedCode) { + this.extendedCode = extendedCode; + return this; + } + + /** + * Get the messageTemplate property: Message template. + * + * @return the messageTemplate value. + */ + public String messageTemplate() { + return this.messageTemplate; + } + + /** + * Set the messageTemplate property: Message template. + * + * @param messageTemplate the messageTemplate value to set. + * @return the ErrorEntity object itself. + */ + public ErrorEntity withMessageTemplate(String messageTemplate) { + this.messageTemplate = messageTemplate; + return this; + } + + /** + * Get the parameters property: Parameters for the template. + * + * @return the parameters value. + */ + public List parameters() { + return this.parameters; + } + + /** + * Set the parameters property: Parameters for the template. + * + * @param parameters the parameters value to set. + * @return the ErrorEntity object itself. + */ + public ErrorEntity withParameters(List parameters) { + this.parameters = parameters; + return this; + } + + /** + * Get the innerErrors property: Inner errors. + * + * @return the innerErrors value. + */ + public List innerErrors() { + return this.innerErrors; + } + + /** + * Set the innerErrors property: Inner errors. + * + * @param innerErrors the innerErrors value to set. + * @return the ErrorEntity object itself. + */ + public ErrorEntity withInnerErrors(List innerErrors) { + this.innerErrors = innerErrors; + return this; + } + + /** + * Get the details property: Error Details. + * + * @return the details value. + */ + public List details() { + return this.details; + } + + /** + * Set the details property: Error Details. + * + * @param details the details value to set. + * @return the ErrorEntity object itself. + */ + public ErrorEntity withDetails(List details) { + this.details = details; + return this; + } + + /** + * Get the target property: The error target. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Set the target property: The error target. + * + * @param target the target value to set. + * @return the ErrorEntity object itself. + */ + public ErrorEntity withTarget(String target) { + this.target = target; + return this; + } + + /** + * Get the code property: Basic error code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: Basic error code. + * + * @param code the code value to set. + * @return the ErrorEntity object itself. + */ + public ErrorEntity withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: Any details of the error. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Any details of the error. + * + * @param message the message value to set. + * @return the ErrorEntity object itself. + */ + public ErrorEntity withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerErrors() != null) { + innerErrors().forEach(e -> e.validate()); + } + if (details() != null) { + details().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Experiments.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Experiments.java new file mode 100644 index 0000000000000..0a1a71416739d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Experiments.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Routing rules in production experiments. */ +@Fluent +public final class Experiments { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Experiments.class); + + /* + * List of ramp-up rules. + */ + @JsonProperty(value = "rampUpRules") + private List rampUpRules; + + /** + * Get the rampUpRules property: List of ramp-up rules. + * + * @return the rampUpRules value. + */ + public List rampUpRules() { + return this.rampUpRules; + } + + /** + * Set the rampUpRules property: List of ramp-up rules. + * + * @param rampUpRules the rampUpRules value to set. + * @return the Experiments object itself. + */ + public Experiments withRampUpRules(List rampUpRules) { + this.rampUpRules = rampUpRules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rampUpRules() != null) { + rampUpRules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ExtendedLocation.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ExtendedLocation.java new file mode 100644 index 0000000000000..d4bb33677bd0d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ExtendedLocation.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Extended Location. */ +@Fluent +public final class ExtendedLocation { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtendedLocation.class); + + /* + * Name of extended location. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Type of extended location. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the name property: Name of extended location. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of 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: Type of extended location. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Facebook.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Facebook.java new file mode 100644 index 0000000000000..ddd3fb8ba4742 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Facebook.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the Facebook provider. */ +@Fluent +public final class Facebook { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Facebook.class); + + /* + * 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. + */ + @JsonProperty(value = "registration") + private AppRegistration registration; + + /* + * The version of the Facebook api to be used while logging in. + */ + @JsonProperty(value = "graphApiVersion") + private String graphApiVersion; + + /* + * The configuration settings of the login flow. + */ + @JsonProperty(value = "login") + private LoginScopes login; + + /** + * Get the enabled property: <code>false</code> if the Facebook provider should not be enabled despite + * the set registration; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the Facebook provider should not be enabled despite + * the set registration; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the Facebook object itself. + */ + public Facebook withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the app registration for the Facebook provider. + * + * @return the registration value. + */ + public AppRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the app registration for the Facebook provider. + * + * @param registration the registration value to set. + * @return the Facebook object itself. + */ + public Facebook withRegistration(AppRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Get the graphApiVersion property: The version of the Facebook api to be used while logging in. + * + * @return the graphApiVersion value. + */ + public String graphApiVersion() { + return this.graphApiVersion; + } + + /** + * Set the graphApiVersion property: The version of the Facebook api to be used while logging in. + * + * @param graphApiVersion the graphApiVersion value to set. + * @return the Facebook object itself. + */ + public Facebook withGraphApiVersion(String graphApiVersion) { + this.graphApiVersion = graphApiVersion; + return this; + } + + /** + * Get the login property: The configuration settings of the login flow. + * + * @return the login value. + */ + public LoginScopes login() { + return this.login; + } + + /** + * Set the login property: The configuration settings of the login flow. + * + * @param login the login value to set. + * @return the Facebook object itself. + */ + public Facebook withLogin(LoginScopes login) { + this.login = login; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + if (login() != null) { + login().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemApplicationLogsConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemApplicationLogsConfig.java new file mode 100644 index 0000000000000..804624029322d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemApplicationLogsConfig.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Application logs to file system configuration. */ +@Fluent +public final class FileSystemApplicationLogsConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FileSystemApplicationLogsConfig.class); + + /* + * Log level. + */ + @JsonProperty(value = "level") + private LogLevel level; + + /** + * Get the level property: Log level. + * + * @return the level value. + */ + public LogLevel level() { + return this.level; + } + + /** + * Set the level property: Log level. + * + * @param level the level value to set. + * @return the FileSystemApplicationLogsConfig object itself. + */ + public FileSystemApplicationLogsConfig withLevel(LogLevel level) { + this.level = level; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemHttpLogsConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemHttpLogsConfig.java new file mode 100644 index 0000000000000..3b451d12cde91 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemHttpLogsConfig.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Http logs to file system configuration. */ +@Fluent +public final class FileSystemHttpLogsConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FileSystemHttpLogsConfig.class); + + /* + * Maximum size in megabytes that http log files can use. + * When reached old log files will be removed to make space for new ones. + * Value can range between 25 and 100. + */ + @JsonProperty(value = "retentionInMb") + private Integer retentionInMb; + + /* + * Retention in days. + * Remove files older than X days. + * 0 or lower means no retention. + */ + @JsonProperty(value = "retentionInDays") + private Integer retentionInDays; + + /* + * True if configuration is enabled, false if it is disabled and null if + * configuration is not set. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Get the retentionInMb property: Maximum size in megabytes that http log files can use. When reached old log files + * will be removed to make space for new ones. Value can range between 25 and 100. + * + * @return the retentionInMb value. + */ + public Integer retentionInMb() { + return this.retentionInMb; + } + + /** + * Set the retentionInMb property: Maximum size in megabytes that http log files can use. When reached old log files + * will be removed to make space for new ones. Value can range between 25 and 100. + * + * @param retentionInMb the retentionInMb value to set. + * @return the FileSystemHttpLogsConfig object itself. + */ + public FileSystemHttpLogsConfig withRetentionInMb(Integer retentionInMb) { + this.retentionInMb = retentionInMb; + return this; + } + + /** + * Get the retentionInDays property: Retention in days. Remove files older than X days. 0 or lower means no + * retention. + * + * @return the retentionInDays value. + */ + public Integer retentionInDays() { + return this.retentionInDays; + } + + /** + * Set the retentionInDays property: Retention in days. Remove files older than X days. 0 or lower means no + * retention. + * + * @param retentionInDays the retentionInDays value to set. + * @return the FileSystemHttpLogsConfig object itself. + */ + public FileSystemHttpLogsConfig withRetentionInDays(Integer retentionInDays) { + this.retentionInDays = retentionInDays; + return this; + } + + /** + * Get the enabled property: True if configuration is enabled, false if it is disabled and null if configuration is + * not set. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: True if configuration is enabled, false if it is disabled and null if configuration is + * not set. + * + * @param enabled the enabled value to set. + * @return the FileSystemHttpLogsConfig object itself. + */ + public FileSystemHttpLogsConfig withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemTokenStore.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemTokenStore.java new file mode 100644 index 0000000000000..cfa905be983a0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FileSystemTokenStore.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the storage of the tokens if a file system is used. */ +@Fluent +public final class FileSystemTokenStore { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FileSystemTokenStore.class); + + /* + * The directory in which the tokens will be stored. + */ + @JsonProperty(value = "directory") + private String directory; + + /** + * Get the directory property: The directory in which the tokens will be stored. + * + * @return the directory value. + */ + public String directory() { + return this.directory; + } + + /** + * Set the directory property: The directory in which the tokens will be stored. + * + * @param directory the directory value to set. + * @return the FileSystemTokenStore object itself. + */ + public FileSystemTokenStore withDirectory(String directory) { + this.directory = directory; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ForwardProxy.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ForwardProxy.java new file mode 100644 index 0000000000000..2c5b5b00013c8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ForwardProxy.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of a forward proxy used to make the requests. */ +@Fluent +public final class ForwardProxy { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ForwardProxy.class); + + /* + * The convention used to determine the url of the request made. + */ + @JsonProperty(value = "convention") + private ForwardProxyConvention convention; + + /* + * The name of the header containing the host of the request. + */ + @JsonProperty(value = "customHostHeaderName") + private String customHostHeaderName; + + /* + * The name of the header containing the scheme of the request. + */ + @JsonProperty(value = "customProtoHeaderName") + private String customProtoHeaderName; + + /** + * Get the convention property: The convention used to determine the url of the request made. + * + * @return the convention value. + */ + public ForwardProxyConvention convention() { + return this.convention; + } + + /** + * Set the convention property: The convention used to determine the url of the request made. + * + * @param convention the convention value to set. + * @return the ForwardProxy object itself. + */ + public ForwardProxy withConvention(ForwardProxyConvention convention) { + this.convention = convention; + return this; + } + + /** + * Get the customHostHeaderName property: The name of the header containing the host of the request. + * + * @return the customHostHeaderName value. + */ + public String customHostHeaderName() { + return this.customHostHeaderName; + } + + /** + * Set the customHostHeaderName property: The name of the header containing the host of the request. + * + * @param customHostHeaderName the customHostHeaderName value to set. + * @return the ForwardProxy object itself. + */ + public ForwardProxy withCustomHostHeaderName(String customHostHeaderName) { + this.customHostHeaderName = customHostHeaderName; + return this; + } + + /** + * Get the customProtoHeaderName property: The name of the header containing the scheme of the request. + * + * @return the customProtoHeaderName value. + */ + public String customProtoHeaderName() { + return this.customProtoHeaderName; + } + + /** + * Set the customProtoHeaderName property: The name of the header containing the scheme of the request. + * + * @param customProtoHeaderName the customProtoHeaderName value to set. + * @return the ForwardProxy object itself. + */ + public ForwardProxy withCustomProtoHeaderName(String customProtoHeaderName) { + this.customProtoHeaderName = customProtoHeaderName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ForwardProxyConvention.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ForwardProxyConvention.java new file mode 100644 index 0000000000000..39a93a2ef522b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ForwardProxyConvention.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ForwardProxyConvention. */ +public enum ForwardProxyConvention { + /** Enum value NoProxy. */ + NO_PROXY("NoProxy"), + + /** Enum value Standard. */ + STANDARD("Standard"), + + /** Enum value Custom. */ + CUSTOM("Custom"); + + /** The actual serialized value for a ForwardProxyConvention instance. */ + private final String value; + + ForwardProxyConvention(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ForwardProxyConvention instance. + * + * @param value the serialized value to parse. + * @return the parsed ForwardProxyConvention object, or null if unable to parse. + */ + @JsonCreator + public static ForwardProxyConvention fromString(String value) { + ForwardProxyConvention[] items = ForwardProxyConvention.values(); + for (ForwardProxyConvention item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrequencyUnit.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrequencyUnit.java new file mode 100644 index 0000000000000..1dede8949f3d3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrequencyUnit.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for FrequencyUnit. */ +public enum FrequencyUnit { + /** Enum value Day. */ + DAY("Day"), + + /** Enum value Hour. */ + HOUR("Hour"); + + /** The actual serialized value for a FrequencyUnit instance. */ + private final String value; + + FrequencyUnit(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FrequencyUnit instance. + * + * @param value the serialized value to parse. + * @return the parsed FrequencyUnit object, or null if unable to parse. + */ + @JsonCreator + public static FrequencyUnit fromString(String value) { + FrequencyUnit[] items = FrequencyUnit.values(); + for (FrequencyUnit item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrontEndConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrontEndConfiguration.java new file mode 100644 index 0000000000000..a66ea51cb8036 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrontEndConfiguration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The FrontEndConfiguration model. */ +@Fluent +public final class FrontEndConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FrontEndConfiguration.class); + + /* + * The kind property. + */ + @JsonProperty(value = "kind") + private FrontEndServiceType kind; + + /** + * Get the kind property: The kind property. + * + * @return the kind value. + */ + public FrontEndServiceType kind() { + return this.kind; + } + + /** + * Set the kind property: The kind property. + * + * @param kind the kind value to set. + * @return the FrontEndConfiguration object itself. + */ + public FrontEndConfiguration withKind(FrontEndServiceType kind) { + this.kind = kind; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrontEndServiceType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrontEndServiceType.java new file mode 100644 index 0000000000000..395083950f38d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FrontEndServiceType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for FrontEndServiceType. */ +public enum FrontEndServiceType { + /** Enum value NodePort. */ + NODE_PORT("NodePort"), + + /** Enum value LoadBalancer. */ + LOAD_BALANCER("LoadBalancer"); + + /** The actual serialized value for a FrontEndServiceType instance. */ + private final String value; + + FrontEndServiceType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a FrontEndServiceType instance. + * + * @param value the serialized value to parse. + * @return the parsed FrontEndServiceType object, or null if unable to parse. + */ + @JsonCreator + public static FrontEndServiceType fromString(String value) { + FrontEndServiceType[] items = FrontEndServiceType.values(); + for (FrontEndServiceType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FtpsState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FtpsState.java new file mode 100644 index 0000000000000..4eeda085841e7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FtpsState.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for FtpsState. */ +public final class FtpsState extends ExpandableStringEnum { + /** Static value AllAllowed for FtpsState. */ + public static final FtpsState ALL_ALLOWED = fromString("AllAllowed"); + + /** Static value FtpsOnly for FtpsState. */ + public static final FtpsState FTPS_ONLY = fromString("FtpsOnly"); + + /** Static value Disabled for FtpsState. */ + public static final FtpsState DISABLED = fromString("Disabled"); + + /** + * Creates or finds a FtpsState from its string representation. + * + * @param name a name to look for. + * @return the corresponding FtpsState. + */ + @JsonCreator + public static FtpsState fromString(String name) { + return fromString(name, FtpsState.class); + } + + /** @return known FtpsState values. */ + public static Collection values() { + return values(FtpsState.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppMajorVersion.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppMajorVersion.java new file mode 100644 index 0000000000000..314bdc046b557 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppMajorVersion.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Function App stack major version. */ +@Immutable +public final class FunctionAppMajorVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionAppMajorVersion.class); + + /* + * Function App stack major version (display only). + */ + @JsonProperty(value = "displayText", access = JsonProperty.Access.WRITE_ONLY) + private String displayText; + + /* + * Function App stack major version name. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /* + * Minor versions associated with the major version. + */ + @JsonProperty(value = "minorVersions", access = JsonProperty.Access.WRITE_ONLY) + private List minorVersions; + + /** + * Get the displayText property: Function App stack major version (display only). + * + * @return the displayText value. + */ + public String displayText() { + return this.displayText; + } + + /** + * Get the value property: Function App stack major version name. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Get the minorVersions property: Minor versions associated with the major version. + * + * @return the minorVersions value. + */ + public List minorVersions() { + return this.minorVersions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (minorVersions() != null) { + minorVersions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppMinorVersion.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppMinorVersion.java new file mode 100644 index 0000000000000..d8e1e2ba264e4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppMinorVersion.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Function App stack minor version. */ +@Immutable +public final class FunctionAppMinorVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionAppMinorVersion.class); + + /* + * Function App stack (display only). + */ + @JsonProperty(value = "displayText", access = JsonProperty.Access.WRITE_ONLY) + private String displayText; + + /* + * Function App stack name. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /* + * Settings associated with the minor version. + */ + @JsonProperty(value = "stackSettings", access = JsonProperty.Access.WRITE_ONLY) + private FunctionAppRuntimes stackSettings; + + /** + * Get the displayText property: Function App stack (display only). + * + * @return the displayText value. + */ + public String displayText() { + return this.displayText; + } + + /** + * Get the value property: Function App stack name. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Get the stackSettings property: Settings associated with the minor version. + * + * @return the stackSettings value. + */ + public FunctionAppRuntimes stackSettings() { + return this.stackSettings; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (stackSettings() != null) { + stackSettings().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppRuntimeSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppRuntimeSettings.java new file mode 100644 index 0000000000000..8532604fba8ea --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppRuntimeSettings.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** Function App runtime settings. */ +@Immutable +public final class FunctionAppRuntimeSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionAppRuntimeSettings.class); + + /* + * Function App stack minor version (runtime only). + */ + @JsonProperty(value = "runtimeVersion", access = JsonProperty.Access.WRITE_ONLY) + private String runtimeVersion; + + /* + * true if remote debugging is supported for the stack; + * otherwise, false. + */ + @JsonProperty(value = "remoteDebuggingSupported", access = JsonProperty.Access.WRITE_ONLY) + private Boolean remoteDebuggingSupported; + + /* + * Application Insights settings associated with the minor version. + */ + @JsonProperty(value = "appInsightsSettings", access = JsonProperty.Access.WRITE_ONLY) + private AppInsightsWebAppStackSettings appInsightsSettings; + + /* + * GitHub Actions settings associated with the minor version. + */ + @JsonProperty(value = "gitHubActionSettings", access = JsonProperty.Access.WRITE_ONLY) + private GitHubActionWebAppStackSettings gitHubActionSettings; + + /* + * Application settings associated with the minor version. + */ + @JsonProperty(value = "appSettingsDictionary", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map appSettingsDictionary; + + /* + * Configuration settings associated with the minor version. + */ + @JsonProperty(value = "siteConfigPropertiesDictionary", access = JsonProperty.Access.WRITE_ONLY) + private SiteConfigPropertiesDictionary siteConfigPropertiesDictionary; + + /* + * List of supported Functions extension versions. + */ + @JsonProperty(value = "supportedFunctionsExtensionVersions", access = JsonProperty.Access.WRITE_ONLY) + private List supportedFunctionsExtensionVersions; + + /* + * true if the stack is in preview; otherwise, + * false. + */ + @JsonProperty(value = "isPreview", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPreview; + + /* + * true if the stack is deprecated; otherwise, + * false. + */ + @JsonProperty(value = "isDeprecated", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDeprecated; + + /* + * true if the stack should be hidden; otherwise, + * false. + */ + @JsonProperty(value = "isHidden", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isHidden; + + /* + * End-of-life date for the minor version. + */ + @JsonProperty(value = "endOfLifeDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endOfLifeDate; + + /* + * true if the stack version is auto-updated; otherwise, + * false. + */ + @JsonProperty(value = "isAutoUpdate", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isAutoUpdate; + + /* + * true if the minor version is early-access; otherwise, + * false. + */ + @JsonProperty(value = "isEarlyAccess", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEarlyAccess; + + /* + * true if the minor version the default; otherwise, + * false. + */ + @JsonProperty(value = "isDefault", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefault; + + /** + * Get the runtimeVersion property: Function App stack minor version (runtime only). + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Get the remoteDebuggingSupported property: <code>true</code> if remote debugging is supported for the + * stack; otherwise, <code>false</code>. + * + * @return the remoteDebuggingSupported value. + */ + public Boolean remoteDebuggingSupported() { + return this.remoteDebuggingSupported; + } + + /** + * Get the appInsightsSettings property: Application Insights settings associated with the minor version. + * + * @return the appInsightsSettings value. + */ + public AppInsightsWebAppStackSettings appInsightsSettings() { + return this.appInsightsSettings; + } + + /** + * Get the gitHubActionSettings property: GitHub Actions settings associated with the minor version. + * + * @return the gitHubActionSettings value. + */ + public GitHubActionWebAppStackSettings gitHubActionSettings() { + return this.gitHubActionSettings; + } + + /** + * Get the appSettingsDictionary property: Application settings associated with the minor version. + * + * @return the appSettingsDictionary value. + */ + public Map appSettingsDictionary() { + return this.appSettingsDictionary; + } + + /** + * Get the siteConfigPropertiesDictionary property: Configuration settings associated with the minor version. + * + * @return the siteConfigPropertiesDictionary value. + */ + public SiteConfigPropertiesDictionary siteConfigPropertiesDictionary() { + return this.siteConfigPropertiesDictionary; + } + + /** + * Get the supportedFunctionsExtensionVersions property: List of supported Functions extension versions. + * + * @return the supportedFunctionsExtensionVersions value. + */ + public List supportedFunctionsExtensionVersions() { + return this.supportedFunctionsExtensionVersions; + } + + /** + * Get the isPreview property: <code>true</code> if the stack is in preview; otherwise, + * <code>false</code>. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Get the isDeprecated property: <code>true</code> if the stack is deprecated; otherwise, + * <code>false</code>. + * + * @return the isDeprecated value. + */ + public Boolean isDeprecated() { + return this.isDeprecated; + } + + /** + * Get the isHidden property: <code>true</code> if the stack should be hidden; otherwise, + * <code>false</code>. + * + * @return the isHidden value. + */ + public Boolean isHidden() { + return this.isHidden; + } + + /** + * Get the endOfLifeDate property: End-of-life date for the minor version. + * + * @return the endOfLifeDate value. + */ + public OffsetDateTime endOfLifeDate() { + return this.endOfLifeDate; + } + + /** + * Get the isAutoUpdate property: <code>true</code> if the stack version is auto-updated; otherwise, + * <code>false</code>. + * + * @return the isAutoUpdate value. + */ + public Boolean isAutoUpdate() { + return this.isAutoUpdate; + } + + /** + * Get the isEarlyAccess property: <code>true</code> if the minor version is early-access; otherwise, + * <code>false</code>. + * + * @return the isEarlyAccess value. + */ + public Boolean isEarlyAccess() { + return this.isEarlyAccess; + } + + /** + * Get the isDefault property: <code>true</code> if the minor version the default; otherwise, + * <code>false</code>. + * + * @return the isDefault value. + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (appInsightsSettings() != null) { + appInsightsSettings().validate(); + } + if (gitHubActionSettings() != null) { + gitHubActionSettings().validate(); + } + if (siteConfigPropertiesDictionary() != null) { + siteConfigPropertiesDictionary().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppRuntimes.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppRuntimes.java new file mode 100644 index 0000000000000..68dac6222f1fb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppRuntimes.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Function App stack runtimes. */ +@Immutable +public final class FunctionAppRuntimes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionAppRuntimes.class); + + /* + * Linux-specific settings associated with the minor version. + */ + @JsonProperty(value = "linuxRuntimeSettings", access = JsonProperty.Access.WRITE_ONLY) + private FunctionAppRuntimeSettings linuxRuntimeSettings; + + /* + * Windows-specific settings associated with the minor version. + */ + @JsonProperty(value = "windowsRuntimeSettings", access = JsonProperty.Access.WRITE_ONLY) + private FunctionAppRuntimeSettings windowsRuntimeSettings; + + /** + * Get the linuxRuntimeSettings property: Linux-specific settings associated with the minor version. + * + * @return the linuxRuntimeSettings value. + */ + public FunctionAppRuntimeSettings linuxRuntimeSettings() { + return this.linuxRuntimeSettings; + } + + /** + * Get the windowsRuntimeSettings property: Windows-specific settings associated with the minor version. + * + * @return the windowsRuntimeSettings value. + */ + public FunctionAppRuntimeSettings windowsRuntimeSettings() { + return this.windowsRuntimeSettings; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linuxRuntimeSettings() != null) { + linuxRuntimeSettings().validate(); + } + if (windowsRuntimeSettings() != null) { + windowsRuntimeSettings().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppStack.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppStack.java new file mode 100644 index 0000000000000..aaa0c57a1afd1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppStack.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionAppStackInner; +import java.util.List; + +/** An immutable client-side representation of FunctionAppStack. */ +public interface FunctionAppStack { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the location property: Function App stack location. + * + * @return the location value. + */ + String location(); + + /** + * Gets the displayText property: Function App stack (display only). + * + * @return the displayText value. + */ + String displayText(); + + /** + * Gets the value property: Function App stack name. + * + * @return the value value. + */ + String value(); + + /** + * Gets the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + List majorVersions(); + + /** + * Gets the preferredOs property: Function App stack preferred OS. + * + * @return the preferredOs value. + */ + StackPreferredOs preferredOs(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.FunctionAppStackInner object. + * + * @return the inner object. + */ + FunctionAppStackInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppStackCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppStackCollection.java new file mode 100644 index 0000000000000..047680a8272f2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionAppStackCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionAppStackInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Function app Stacks. */ +@Fluent +public final class FunctionAppStackCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionAppStackCollection.class); + + /* + * 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; + + /** + * 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 FunctionAppStackCollection object itself. + */ + public FunctionAppStackCollection 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 FunctionAppStackCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionEnvelope.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionEnvelope.java new file mode 100644 index 0000000000000..10e7b5cce070a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionEnvelope.java @@ -0,0 +1,393 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionEnvelopeInner; +import java.util.Map; + +/** An immutable client-side representation of FunctionEnvelope. */ +public interface FunctionEnvelope { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the functionAppId property: Function App ID. + * + * @return the functionAppId value. + */ + String functionAppId(); + + /** + * Gets the scriptRootPathHref property: Script root path URI. + * + * @return the scriptRootPathHref value. + */ + String scriptRootPathHref(); + + /** + * Gets the scriptHref property: Script URI. + * + * @return the scriptHref value. + */ + String scriptHref(); + + /** + * Gets the configHref property: Config URI. + * + * @return the configHref value. + */ + String configHref(); + + /** + * Gets the testDataHref property: Test data URI. + * + * @return the testDataHref value. + */ + String testDataHref(); + + /** + * Gets the secretsFileHref property: Secrets file URI. + * + * @return the secretsFileHref value. + */ + String secretsFileHref(); + + /** + * Gets the href property: Function URI. + * + * @return the href value. + */ + String href(); + + /** + * Gets the config property: Config information. + * + * @return the config value. + */ + Object config(); + + /** + * Gets the files property: File list. + * + * @return the files value. + */ + Map files(); + + /** + * Gets the testData property: Test data used when testing via the Azure Portal. + * + * @return the testData value. + */ + String testData(); + + /** + * Gets the invokeUrlTemplate property: The invocation URL. + * + * @return the invokeUrlTemplate value. + */ + String invokeUrlTemplate(); + + /** + * Gets the language property: The function language. + * + * @return the language value. + */ + String language(); + + /** + * Gets the isDisabled property: Gets or sets a value indicating whether the function is disabled. + * + * @return the isDisabled value. + */ + Boolean isDisabled(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.FunctionEnvelopeInner object. + * + * @return the inner object. + */ + FunctionEnvelopeInner innerModel(); + + /** The entirety of the FunctionEnvelope definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The FunctionEnvelope definition stages. */ + interface DefinitionStages { + /** The first stage of the FunctionEnvelope definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the FunctionEnvelope definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @return the next definition stage. + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + /** + * The stage of the FunctionEnvelope 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.WithKind, + DefinitionStages.WithFunctionAppId, + DefinitionStages.WithScriptRootPathHref, + DefinitionStages.WithScriptHref, + DefinitionStages.WithConfigHref, + DefinitionStages.WithTestDataHref, + DefinitionStages.WithSecretsFileHref, + DefinitionStages.WithHref, + DefinitionStages.WithConfig, + DefinitionStages.WithFiles, + DefinitionStages.WithTestData, + DefinitionStages.WithInvokeUrlTemplate, + DefinitionStages.WithLanguage, + DefinitionStages.WithIsDisabled { + /** + * Executes the create request. + * + * @return the created resource. + */ + FunctionEnvelope create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + FunctionEnvelope create(Context context); + } + /** The stage of the FunctionEnvelope definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the FunctionEnvelope definition allowing to specify functionAppId. */ + interface WithFunctionAppId { + /** + * Specifies the functionAppId property: Function App ID.. + * + * @param functionAppId Function App ID. + * @return the next definition stage. + */ + WithCreate withFunctionAppId(String functionAppId); + } + /** The stage of the FunctionEnvelope definition allowing to specify scriptRootPathHref. */ + interface WithScriptRootPathHref { + /** + * Specifies the scriptRootPathHref property: Script root path URI.. + * + * @param scriptRootPathHref Script root path URI. + * @return the next definition stage. + */ + WithCreate withScriptRootPathHref(String scriptRootPathHref); + } + /** The stage of the FunctionEnvelope definition allowing to specify scriptHref. */ + interface WithScriptHref { + /** + * Specifies the scriptHref property: Script URI.. + * + * @param scriptHref Script URI. + * @return the next definition stage. + */ + WithCreate withScriptHref(String scriptHref); + } + /** The stage of the FunctionEnvelope definition allowing to specify configHref. */ + interface WithConfigHref { + /** + * Specifies the configHref property: Config URI.. + * + * @param configHref Config URI. + * @return the next definition stage. + */ + WithCreate withConfigHref(String configHref); + } + /** The stage of the FunctionEnvelope definition allowing to specify testDataHref. */ + interface WithTestDataHref { + /** + * Specifies the testDataHref property: Test data URI.. + * + * @param testDataHref Test data URI. + * @return the next definition stage. + */ + WithCreate withTestDataHref(String testDataHref); + } + /** The stage of the FunctionEnvelope definition allowing to specify secretsFileHref. */ + interface WithSecretsFileHref { + /** + * Specifies the secretsFileHref property: Secrets file URI.. + * + * @param secretsFileHref Secrets file URI. + * @return the next definition stage. + */ + WithCreate withSecretsFileHref(String secretsFileHref); + } + /** The stage of the FunctionEnvelope definition allowing to specify href. */ + interface WithHref { + /** + * Specifies the href property: Function URI.. + * + * @param href Function URI. + * @return the next definition stage. + */ + WithCreate withHref(String href); + } + /** The stage of the FunctionEnvelope definition allowing to specify config. */ + interface WithConfig { + /** + * Specifies the config property: Config information.. + * + * @param config Config information. + * @return the next definition stage. + */ + WithCreate withConfig(Object config); + } + /** The stage of the FunctionEnvelope definition allowing to specify files. */ + interface WithFiles { + /** + * Specifies the files property: File list.. + * + * @param files File list. + * @return the next definition stage. + */ + WithCreate withFiles(Map files); + } + /** The stage of the FunctionEnvelope definition allowing to specify testData. */ + interface WithTestData { + /** + * Specifies the testData property: Test data used when testing via the Azure Portal.. + * + * @param testData Test data used when testing via the Azure Portal. + * @return the next definition stage. + */ + WithCreate withTestData(String testData); + } + /** The stage of the FunctionEnvelope definition allowing to specify invokeUrlTemplate. */ + interface WithInvokeUrlTemplate { + /** + * Specifies the invokeUrlTemplate property: The invocation URL. + * + * @param invokeUrlTemplate The invocation URL. + * @return the next definition stage. + */ + WithCreate withInvokeUrlTemplate(String invokeUrlTemplate); + } + /** The stage of the FunctionEnvelope definition allowing to specify language. */ + interface WithLanguage { + /** + * Specifies the language property: The function language. + * + * @param language The function language. + * @return the next definition stage. + */ + WithCreate withLanguage(String language); + } + /** The stage of the FunctionEnvelope definition allowing to specify isDisabled. */ + interface WithIsDisabled { + /** + * Specifies the isDisabled property: Gets or sets a value indicating whether the function is disabled. + * + * @param isDisabled Gets or sets a value indicating whether the function is disabled. + * @return the next definition stage. + */ + WithCreate withIsDisabled(Boolean isDisabled); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + FunctionEnvelope refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + FunctionEnvelope refresh(Context context); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listFunctionKeys(); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listFunctionKeysWithResponse(Context context); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + FunctionSecrets listFunctionSecrets(); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + Response listFunctionSecretsWithResponse(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionEnvelopeCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionEnvelopeCollection.java new file mode 100644 index 0000000000000..b1d33f9023ad3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionEnvelopeCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionEnvelopeInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu function information elements. */ +@Fluent +public final class FunctionEnvelopeCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(FunctionEnvelopeCollection.class); + + /* + * 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; + + /** + * 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 FunctionEnvelopeCollection object itself. + */ + public FunctionEnvelopeCollection 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 FunctionEnvelopeCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionSecrets.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionSecrets.java new file mode 100644 index 0000000000000..dbc6345135cf9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/FunctionSecrets.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionSecretsInner; + +/** An immutable client-side representation of FunctionSecrets. */ +public interface FunctionSecrets { + /** + * Gets the key property: Secret key. + * + * @return the key value. + */ + String key(); + + /** + * Gets the triggerUrl property: Trigger URL. + * + * @return the triggerUrl value. + */ + String triggerUrl(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.FunctionSecretsInner object. + * + * @return the inner object. + */ + FunctionSecretsInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GeoRegion.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GeoRegion.java new file mode 100644 index 0000000000000..51408a82f7877 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GeoRegion.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.GeoRegionInner; + +/** An immutable client-side representation of GeoRegion. */ +public interface GeoRegion { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the description property: Region description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the displayName property: Display name for region. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the orgDomain property: Display name for region. + * + * @return the orgDomain value. + */ + String orgDomain(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.GeoRegionInner object. + * + * @return the inner object. + */ + GeoRegionInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GeoRegionCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GeoRegionCollection.java new file mode 100644 index 0000000000000..499caef832eb4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GeoRegionCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.GeoRegionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of geographical regions. */ +@Fluent +public final class GeoRegionCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GeoRegionCollection.class); + + /* + * 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; + + /** + * 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 GeoRegionCollection object itself. + */ + public GeoRegionCollection 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 GeoRegionCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHub.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHub.java new file mode 100644 index 0000000000000..3a9525cdb0580 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHub.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the GitHub provider. */ +@Fluent +public final class GitHub { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GitHub.class); + + /* + * 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. + */ + @JsonProperty(value = "registration") + private ClientRegistration registration; + + /* + * The configuration settings of the login flow. + */ + @JsonProperty(value = "login") + private LoginScopes login; + + /** + * Get the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the GitHub object itself. + */ + public GitHub withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the app registration for the GitHub provider. + * + * @return the registration value. + */ + public ClientRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the app registration for the GitHub provider. + * + * @param registration the registration value to set. + * @return the GitHub object itself. + */ + public GitHub withRegistration(ClientRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Get the login property: The configuration settings of the login flow. + * + * @return the login value. + */ + public LoginScopes login() { + return this.login; + } + + /** + * Set the login property: The configuration settings of the login flow. + * + * @param login the login value to set. + * @return the GitHub object itself. + */ + public GitHub withLogin(LoginScopes login) { + this.login = login; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + if (login() != null) { + login().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionCodeConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionCodeConfiguration.java new file mode 100644 index 0000000000000..4d23639f9e031 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionCodeConfiguration.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The GitHub action code configuration. */ +@Fluent +public final class GitHubActionCodeConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GitHubActionCodeConfiguration.class); + + /* + * Runtime stack is used to determine the workflow file content for code + * base apps. + */ + @JsonProperty(value = "runtimeStack") + private String runtimeStack; + + /* + * Runtime version is used to determine what build version to set in the + * workflow file. + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /** + * Get the runtimeStack property: Runtime stack is used to determine the workflow file content for code base apps. + * + * @return the runtimeStack value. + */ + public String runtimeStack() { + return this.runtimeStack; + } + + /** + * Set the runtimeStack property: Runtime stack is used to determine the workflow file content for code base apps. + * + * @param runtimeStack the runtimeStack value to set. + * @return the GitHubActionCodeConfiguration object itself. + */ + public GitHubActionCodeConfiguration withRuntimeStack(String runtimeStack) { + this.runtimeStack = runtimeStack; + return this; + } + + /** + * Get the runtimeVersion property: Runtime version is used to determine what build version to set in the workflow + * file. + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: Runtime version is used to determine what build version to set in the workflow + * file. + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the GitHubActionCodeConfiguration object itself. + */ + public GitHubActionCodeConfiguration withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionConfiguration.java new file mode 100644 index 0000000000000..ca15bc07ea951 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionConfiguration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The GitHub action configuration. */ +@Fluent +public final class GitHubActionConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GitHubActionConfiguration.class); + + /* + * GitHub Action code configuration. + */ + @JsonProperty(value = "codeConfiguration") + private GitHubActionCodeConfiguration codeConfiguration; + + /* + * GitHub Action container configuration. + */ + @JsonProperty(value = "containerConfiguration") + private GitHubActionContainerConfiguration containerConfiguration; + + /* + * This will help determine the workflow configuration to select. + */ + @JsonProperty(value = "isLinux") + private Boolean isLinux; + + /* + * Workflow option to determine whether the workflow file should be + * generated and written to the repository. + */ + @JsonProperty(value = "generateWorkflowFile") + private Boolean generateWorkflowFile; + + /** + * Get the codeConfiguration property: GitHub Action code configuration. + * + * @return the codeConfiguration value. + */ + public GitHubActionCodeConfiguration codeConfiguration() { + return this.codeConfiguration; + } + + /** + * Set the codeConfiguration property: GitHub Action code configuration. + * + * @param codeConfiguration the codeConfiguration value to set. + * @return the GitHubActionConfiguration object itself. + */ + public GitHubActionConfiguration withCodeConfiguration(GitHubActionCodeConfiguration codeConfiguration) { + this.codeConfiguration = codeConfiguration; + return this; + } + + /** + * Get the containerConfiguration property: GitHub Action container configuration. + * + * @return the containerConfiguration value. + */ + public GitHubActionContainerConfiguration containerConfiguration() { + return this.containerConfiguration; + } + + /** + * Set the containerConfiguration property: GitHub Action container configuration. + * + * @param containerConfiguration the containerConfiguration value to set. + * @return the GitHubActionConfiguration object itself. + */ + public GitHubActionConfiguration withContainerConfiguration( + GitHubActionContainerConfiguration containerConfiguration) { + this.containerConfiguration = containerConfiguration; + return this; + } + + /** + * Get the isLinux property: This will help determine the workflow configuration to select. + * + * @return the isLinux value. + */ + public Boolean isLinux() { + return this.isLinux; + } + + /** + * Set the isLinux property: This will help determine the workflow configuration to select. + * + * @param isLinux the isLinux value to set. + * @return the GitHubActionConfiguration object itself. + */ + public GitHubActionConfiguration withIsLinux(Boolean isLinux) { + this.isLinux = isLinux; + return this; + } + + /** + * Get the generateWorkflowFile property: Workflow option to determine whether the workflow file should be generated + * and written to the repository. + * + * @return the generateWorkflowFile value. + */ + public Boolean generateWorkflowFile() { + return this.generateWorkflowFile; + } + + /** + * Set the generateWorkflowFile property: Workflow option to determine whether the workflow file should be generated + * and written to the repository. + * + * @param generateWorkflowFile the generateWorkflowFile value to set. + * @return the GitHubActionConfiguration object itself. + */ + public GitHubActionConfiguration withGenerateWorkflowFile(Boolean generateWorkflowFile) { + this.generateWorkflowFile = generateWorkflowFile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (codeConfiguration() != null) { + codeConfiguration().validate(); + } + if (containerConfiguration() != null) { + containerConfiguration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionContainerConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionContainerConfiguration.java new file mode 100644 index 0000000000000..9517e71a99fa6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionContainerConfiguration.java @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The GitHub action container configuration. */ +@Fluent +public final class GitHubActionContainerConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GitHubActionContainerConfiguration.class); + + /* + * The server URL for the container registry where the build will be + * hosted. + */ + @JsonProperty(value = "serverUrl") + private String serverUrl; + + /* + * The image name for the build. + */ + @JsonProperty(value = "imageName") + private String imageName; + + /* + * The username used to upload the image to the container registry. + */ + @JsonProperty(value = "username") + private String username; + + /* + * The password used to upload the image to the container registry. + */ + @JsonProperty(value = "password") + private String password; + + /** + * Get the serverUrl property: The server URL for the container registry where the build will be hosted. + * + * @return the serverUrl value. + */ + public String serverUrl() { + return this.serverUrl; + } + + /** + * Set the serverUrl property: The server URL for the container registry where the build will be hosted. + * + * @param serverUrl the serverUrl value to set. + * @return the GitHubActionContainerConfiguration object itself. + */ + public GitHubActionContainerConfiguration withServerUrl(String serverUrl) { + this.serverUrl = serverUrl; + return this; + } + + /** + * Get the imageName property: The image name for the build. + * + * @return the imageName value. + */ + public String imageName() { + return this.imageName; + } + + /** + * Set the imageName property: The image name for the build. + * + * @param imageName the imageName value to set. + * @return the GitHubActionContainerConfiguration object itself. + */ + public GitHubActionContainerConfiguration withImageName(String imageName) { + this.imageName = imageName; + return this; + } + + /** + * Get the username property: The username used to upload the image to the container registry. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: The username used to upload the image to the container registry. + * + * @param username the username value to set. + * @return the GitHubActionContainerConfiguration object itself. + */ + public GitHubActionContainerConfiguration withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the password property: The password used to upload the image to the container registry. + * + * @return the password value. + */ + public String password() { + return this.password; + } + + /** + * Set the password property: The password used to upload the image to the container registry. + * + * @param password the password value to set. + * @return the GitHubActionContainerConfiguration object itself. + */ + public GitHubActionContainerConfiguration withPassword(String password) { + this.password = password; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionWebAppStackSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionWebAppStackSettings.java new file mode 100644 index 0000000000000..6444b43da6df5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GitHubActionWebAppStackSettings.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** GitHub Actions Web App stack settings. */ +@Immutable +public final class GitHubActionWebAppStackSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GitHubActionWebAppStackSettings.class); + + /* + * true if GitHub Actions is supported for the stack; + * otherwise, false. + */ + @JsonProperty(value = "isSupported", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isSupported; + + /* + * The minor version that is supported for GitHub Actions. + */ + @JsonProperty(value = "supportedVersion", access = JsonProperty.Access.WRITE_ONLY) + private String supportedVersion; + + /** + * Get the isSupported property: <code>true</code> if GitHub Actions is supported for the stack; + * otherwise, <code>false</code>. + * + * @return the isSupported value. + */ + public Boolean isSupported() { + return this.isSupported; + } + + /** + * Get the supportedVersion property: The minor version that is supported for GitHub Actions. + * + * @return the supportedVersion value. + */ + public String supportedVersion() { + return this.supportedVersion; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GlobalCsmSkuDescription.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GlobalCsmSkuDescription.java new file mode 100644 index 0000000000000..c8945c2f5c3de --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GlobalCsmSkuDescription.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.CapabilityInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A Global SKU Description. */ +@Fluent +public final class GlobalCsmSkuDescription { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalCsmSkuDescription.class); + + /* + * Name of the resource SKU. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Service Tier of the resource SKU. + */ + @JsonProperty(value = "tier") + private String tier; + + /* + * Size specifier of the resource SKU. + */ + @JsonProperty(value = "size") + private String size; + + /* + * Family code of the resource SKU. + */ + @JsonProperty(value = "family") + private String family; + + /* + * Min, max, and default scale values of the SKU. + */ + @JsonProperty(value = "capacity") + private SkuCapacity capacity; + + /* + * Locations of the SKU. + */ + @JsonProperty(value = "locations") + private List locations; + + /* + * Capabilities of the SKU, e.g., is traffic manager enabled? + */ + @JsonProperty(value = "capabilities") + private List capabilities; + + /** + * Get the name property: Name of the resource SKU. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the resource SKU. + * + * @param name the name value to set. + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier property: Service Tier of the resource SKU. + * + * @return the tier value. + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier property: Service Tier of the resource SKU. + * + * @param tier the tier value to set. + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the size property: Size specifier of the resource SKU. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: Size specifier of the resource SKU. + * + * @param size the size value to set. + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the family property: Family code of the resource SKU. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Set the family property: Family code of the resource SKU. + * + * @param family the family value to set. + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the capacity property: Min, max, and default scale values of the SKU. + * + * @return the capacity value. + */ + public SkuCapacity capacity() { + return this.capacity; + } + + /** + * Set the capacity property: Min, max, and default scale values of the SKU. + * + * @param capacity the capacity value to set. + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withCapacity(SkuCapacity capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the locations property: Locations of the SKU. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations property: Locations of the SKU. + * + * @param locations the locations value to set. + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the capabilities property: Capabilities of the SKU, e.g., is traffic manager enabled?. + * + * @return the capabilities value. + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: Capabilities of the SKU, e.g., is traffic manager enabled?. + * + * @param capabilities the capabilities value to set. + * @return the GlobalCsmSkuDescription object itself. + */ + public GlobalCsmSkuDescription withCapabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (capacity() != null) { + capacity().validate(); + } + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GlobalValidation.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GlobalValidation.java new file mode 100644 index 0000000000000..2cda58dd31ccb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/GlobalValidation.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The configuration settings that determines the validation flow of users using App Service + * Authentication/Authorization. + */ +@Fluent +public final class GlobalValidation { + @JsonIgnore private final ClientLogger logger = new ClientLogger(GlobalValidation.class); + + /* + * true if the authentication flow is required any request is + * made; otherwise, false. + */ + @JsonProperty(value = "requireAuthentication") + private Boolean requireAuthentication; + + /* + * 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 + * 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. + */ + @JsonProperty(value = "excludedPaths") + private List excludedPaths; + + /** + * Get the requireAuthentication property: <code>true</code> if the authentication flow is required any + * request is made; otherwise, <code>false</code>. + * + * @return the requireAuthentication value. + */ + public Boolean requireAuthentication() { + return this.requireAuthentication; + } + + /** + * Set the requireAuthentication property: <code>true</code> if the authentication flow is required any + * request is made; otherwise, <code>false</code>. + * + * @param requireAuthentication the requireAuthentication value to set. + * @return the GlobalValidation object itself. + */ + public GlobalValidation withRequireAuthentication(Boolean requireAuthentication) { + this.requireAuthentication = requireAuthentication; + return this; + } + + /** + * Get the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to + * access the app. + * + * @return the unauthenticatedClientAction value. + */ + public UnauthenticatedClientActionV2 unauthenticatedClientAction() { + return this.unauthenticatedClientAction; + } + + /** + * Set the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to + * access the app. + * + * @param unauthenticatedClientAction the unauthenticatedClientAction value to set. + * @return the GlobalValidation object itself. + */ + public GlobalValidation withUnauthenticatedClientAction(UnauthenticatedClientActionV2 unauthenticatedClientAction) { + this.unauthenticatedClientAction = unauthenticatedClientAction; + return this; + } + + /** + * Get the redirectToProvider property: The default authentication provider to use when multiple providers are + * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". + * + * @return the redirectToProvider value. + */ + public String redirectToProvider() { + return this.redirectToProvider; + } + + /** + * Set the redirectToProvider property: The default authentication provider to use when multiple providers are + * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". + * + * @param redirectToProvider the redirectToProvider value to set. + * @return the GlobalValidation object itself. + */ + public GlobalValidation withRedirectToProvider(String redirectToProvider) { + this.redirectToProvider = redirectToProvider; + return this; + } + + /** + * Get the excludedPaths property: The paths for which unauthenticated flow would not be redirected to the login + * page. + * + * @return the excludedPaths value. + */ + public List excludedPaths() { + return this.excludedPaths; + } + + /** + * Set the excludedPaths property: The paths for which unauthenticated flow would not be redirected to the login + * page. + * + * @param excludedPaths the excludedPaths value to set. + * @return the GlobalValidation object itself. + */ + public GlobalValidation withExcludedPaths(List excludedPaths) { + this.excludedPaths = excludedPaths; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Globals.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Globals.java new file mode 100644 index 0000000000000..7bd88ae05b0dd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Globals.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import java.util.List; + +/** Resource collection API of Globals. */ +public interface Globals { + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted app. + */ + DeletedSite getDeletedWebApp(String deletedSiteId); + + /** + * Description for Get deleted app for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 deleted app. + */ + Response getDeletedWebAppWithResponse(String deletedSiteId, Context context); + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + List getDeletedWebAppSnapshots(String deletedSiteId); + + /** + * Description for Get all deleted apps for a subscription. + * + * @param deletedSiteId The numeric ID of the deleted app, e.g. 12345. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of Snapshot. + */ + Response> getDeletedWebAppSnapshotsWithResponse(String deletedSiteId, Context context); + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 getSubscriptionOperationWithAsyncResponse(String location, String operationId); + + /** + * Description for Gets an operation in a subscription and given region. + * + * @param location Location name. + * @param operationId Operation Id. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response getSubscriptionOperationWithAsyncResponseWithResponse( + String location, String operationId, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Google.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Google.java new file mode 100644 index 0000000000000..badf205a1a106 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Google.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the Google provider. */ +@Fluent +public final class Google { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Google.class); + + /* + * 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. + */ + @JsonProperty(value = "registration") + private ClientRegistration registration; + + /* + * The configuration settings of the login flow. + */ + @JsonProperty(value = "login") + private LoginScopes login; + + /* + * The configuration settings of the Azure Active Directory token + * validation flow. + */ + @JsonProperty(value = "validation") + private AllowedAudiencesValidation validation; + + /** + * Get the enabled property: <code>false</code> if the Google provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the Google provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the Google object itself. + */ + public Google withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the app registration for the Google provider. + * + * @return the registration value. + */ + public ClientRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the app registration for the Google provider. + * + * @param registration the registration value to set. + * @return the Google object itself. + */ + public Google withRegistration(ClientRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Get the login property: The configuration settings of the login flow. + * + * @return the login value. + */ + public LoginScopes login() { + return this.login; + } + + /** + * Set the login property: The configuration settings of the login flow. + * + * @param login the login value to set. + * @return the Google object itself. + */ + public Google withLogin(LoginScopes login) { + this.login = login; + return this; + } + + /** + * Get the validation property: The configuration settings of the Azure Active Directory token validation flow. + * + * @return the validation value. + */ + public AllowedAudiencesValidation validation() { + return this.validation; + } + + /** + * Set the validation property: The configuration settings of the Azure Active Directory token validation flow. + * + * @param validation the validation value to set. + * @return the Google object itself. + */ + public Google withValidation(AllowedAudiencesValidation validation) { + this.validation = validation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + if (login() != null) { + login().validate(); + } + if (validation() != null) { + validation().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HandlerMapping.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HandlerMapping.java new file mode 100644 index 0000000000000..7da29154d0016 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HandlerMapping.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The IIS handler mappings used to define which handler processes HTTP requests with certain extension. For example, it + * is used to configure php-cgi.exe process to handle all HTTP requests with *.php extension. + */ +@Fluent +public final class HandlerMapping { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HandlerMapping.class); + + /* + * Requests with this extension will be handled using the specified FastCGI + * application. + */ + @JsonProperty(value = "extension") + private String extension; + + /* + * The absolute path to the FastCGI application. + */ + @JsonProperty(value = "scriptProcessor") + private String scriptProcessor; + + /* + * Command-line arguments to be passed to the script processor. + */ + @JsonProperty(value = "arguments") + private String arguments; + + /** + * Get the extension property: Requests with this extension will be handled using the specified FastCGI application. + * + * @return the extension value. + */ + public String extension() { + return this.extension; + } + + /** + * Set the extension property: Requests with this extension will be handled using the specified FastCGI application. + * + * @param extension the extension value to set. + * @return the HandlerMapping object itself. + */ + public HandlerMapping withExtension(String extension) { + this.extension = extension; + return this; + } + + /** + * Get the scriptProcessor property: The absolute path to the FastCGI application. + * + * @return the scriptProcessor value. + */ + public String scriptProcessor() { + return this.scriptProcessor; + } + + /** + * Set the scriptProcessor property: The absolute path to the FastCGI application. + * + * @param scriptProcessor the scriptProcessor value to set. + * @return the HandlerMapping object itself. + */ + public HandlerMapping withScriptProcessor(String scriptProcessor) { + this.scriptProcessor = scriptProcessor; + return this; + } + + /** + * Get the arguments property: Command-line arguments to be passed to the script processor. + * + * @return the arguments value. + */ + public String arguments() { + return this.arguments; + } + + /** + * Set the arguments property: Command-line arguments to be passed to the script processor. + * + * @param arguments the arguments value to set. + * @return the HandlerMapping object itself. + */ + public HandlerMapping withArguments(String arguments) { + this.arguments = arguments; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostKeys.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostKeys.java new file mode 100644 index 0000000000000..4cce3426b289e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostKeys.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HostKeysInner; +import java.util.Map; + +/** An immutable client-side representation of HostKeys. */ +public interface HostKeys { + /** + * Gets the masterKey property: Secret key. + * + * @return the masterKey value. + */ + String masterKey(); + + /** + * Gets the functionKeys property: Host level function keys. + * + * @return the functionKeys value. + */ + Map functionKeys(); + + /** + * Gets the systemKeys property: System keys. + * + * @return the systemKeys value. + */ + Map systemKeys(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.HostKeysInner object. + * + * @return the inner object. + */ + HostKeysInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostType.java new file mode 100644 index 0000000000000..6fd922fe15ac1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for HostType. */ +public enum HostType { + /** Enum value Standard. */ + STANDARD("Standard"), + + /** Enum value Repository. */ + REPOSITORY("Repository"); + + /** The actual serialized value for a HostType instance. */ + private final String value; + + HostType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HostType instance. + * + * @param value the serialized value to parse. + * @return the parsed HostType object, or null if unable to parse. + */ + @JsonCreator + public static HostType fromString(String value) { + HostType[] items = HostType.values(); + for (HostType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentDeploymentInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentDeploymentInfo.java new file mode 100644 index 0000000000000..dca428d712a74 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentDeploymentInfo.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information needed to create resources on an App Service Environment. */ +@Fluent +public final class HostingEnvironmentDeploymentInfo { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HostingEnvironmentDeploymentInfo.class); + + /* + * Name of the App Service Environment. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Location of the App Service Environment. + */ + @JsonProperty(value = "location") + private String location; + + /** + * Get the name property: Name of the App Service Environment. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the App Service Environment. + * + * @param name the name value to set. + * @return the HostingEnvironmentDeploymentInfo object itself. + */ + public HostingEnvironmentDeploymentInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get the location property: Location of the App Service Environment. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Location of the App Service Environment. + * + * @param location the location value to set. + * @return the HostingEnvironmentDeploymentInfo object itself. + */ + public HostingEnvironmentDeploymentInfo withLocation(String location) { + this.location = location; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentDiagnostics.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentDiagnostics.java new file mode 100644 index 0000000000000..7594c6e7baa9a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentDiagnostics.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HostingEnvironmentDiagnosticsInner; + +/** An immutable client-side representation of HostingEnvironmentDiagnostics. */ +public interface HostingEnvironmentDiagnostics { + /** + * Gets the name property: Name/identifier of the diagnostics. + * + * @return the name value. + */ + String name(); + + /** + * Gets the diagnosticsOutput property: Diagnostics output. + * + * @return the diagnosticsOutput value. + */ + String diagnosticsOutput(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.HostingEnvironmentDiagnosticsInner + * object. + * + * @return the inner object. + */ + HostingEnvironmentDiagnosticsInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentProfile.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentProfile.java new file mode 100644 index 0000000000000..b54f3c3ebc854 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentProfile.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Specification for an App Service Environment to use for this resource. */ +@Fluent +public final class HostingEnvironmentProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HostingEnvironmentProfile.class); + + /* + * Resource ID of the App Service Environment. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name of the App Service Environment. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Resource type of the App Service Environment. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the id property: Resource ID of the App Service Environment. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of the App Service Environment. + * + * @param id the id value to set. + * @return the HostingEnvironmentProfile object itself. + */ + public HostingEnvironmentProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of the App Service Environment. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Resource type of the App Service Environment. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentStatus.java new file mode 100644 index 0000000000000..3cdcb99e06073 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostingEnvironmentStatus.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for HostingEnvironmentStatus. */ +public enum HostingEnvironmentStatus { + /** Enum value Preparing. */ + PREPARING("Preparing"), + + /** Enum value Ready. */ + READY("Ready"), + + /** Enum value Scaling. */ + SCALING("Scaling"), + + /** Enum value Deleting. */ + DELETING("Deleting"); + + /** The actual serialized value for a HostingEnvironmentStatus instance. */ + private final String value; + + HostingEnvironmentStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HostingEnvironmentStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed HostingEnvironmentStatus object, or null if unable to parse. + */ + @JsonCreator + public static HostingEnvironmentStatus fromString(String value) { + HostingEnvironmentStatus[] items = HostingEnvironmentStatus.values(); + for (HostingEnvironmentStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Hostname.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Hostname.java new file mode 100644 index 0000000000000..6efc56929fdbd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Hostname.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Details of a hostname derived from a domain. */ +@Fluent +public final class Hostname { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Hostname.class); + + /* + * Name of the hostname. + */ + @JsonProperty(value = "name") + private String name; + + /* + * List of apps the hostname is assigned to. This list will have more than + * one app only if the hostname is pointing to a Traffic Manager. + */ + @JsonProperty(value = "siteNames") + private List siteNames; + + /* + * Name of the Azure resource the hostname is assigned to. If it is + * assigned to a Traffic Manager then it will be the Traffic Manager name + * otherwise it will be the app name. + */ + @JsonProperty(value = "azureResourceName") + private String azureResourceName; + + /* + * Type of the Azure resource the hostname is assigned to. + */ + @JsonProperty(value = "azureResourceType") + private AzureResourceType azureResourceType; + + /* + * Type of the DNS record. + */ + @JsonProperty(value = "customHostNameDnsRecordType") + private CustomHostnameDnsRecordType customHostnameDnsRecordType; + + /* + * Type of the hostname. + */ + @JsonProperty(value = "hostNameType") + private HostnameType hostnameType; + + /** + * Get the name property: Name of the hostname. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the hostname. + * + * @param name the name value to set. + * @return the Hostname object itself. + */ + public Hostname withName(String name) { + this.name = name; + return this; + } + + /** + * Get the siteNames property: List of apps the hostname is assigned to. This list will have more than one app only + * if the hostname is pointing to a Traffic Manager. + * + * @return the siteNames value. + */ + public List siteNames() { + return this.siteNames; + } + + /** + * Set the siteNames property: List of apps the hostname is assigned to. This list will have more than one app only + * if the hostname is pointing to a Traffic Manager. + * + * @param siteNames the siteNames value to set. + * @return the Hostname object itself. + */ + public Hostname withSiteNames(List siteNames) { + this.siteNames = siteNames; + return this; + } + + /** + * Get the azureResourceName property: Name of the Azure resource the hostname is assigned to. If it is assigned to + * a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name. + * + * @return the azureResourceName value. + */ + public String azureResourceName() { + return this.azureResourceName; + } + + /** + * Set the azureResourceName property: Name of the Azure resource the hostname is assigned to. If it is assigned to + * a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name. + * + * @param azureResourceName the azureResourceName value to set. + * @return the Hostname object itself. + */ + public Hostname withAzureResourceName(String azureResourceName) { + this.azureResourceName = azureResourceName; + return this; + } + + /** + * Get the azureResourceType property: Type of the Azure resource the hostname is assigned to. + * + * @return the azureResourceType value. + */ + public AzureResourceType azureResourceType() { + return this.azureResourceType; + } + + /** + * Set the azureResourceType property: Type of the Azure resource the hostname is assigned to. + * + * @param azureResourceType the azureResourceType value to set. + * @return the Hostname object itself. + */ + public Hostname withAzureResourceType(AzureResourceType azureResourceType) { + this.azureResourceType = azureResourceType; + return this; + } + + /** + * Get the customHostnameDnsRecordType property: Type of the DNS record. + * + * @return the customHostnameDnsRecordType value. + */ + public CustomHostnameDnsRecordType customHostnameDnsRecordType() { + return this.customHostnameDnsRecordType; + } + + /** + * Set the customHostnameDnsRecordType property: Type of the DNS record. + * + * @param customHostnameDnsRecordType the customHostnameDnsRecordType value to set. + * @return the Hostname object itself. + */ + public Hostname withCustomHostnameDnsRecordType(CustomHostnameDnsRecordType customHostnameDnsRecordType) { + this.customHostnameDnsRecordType = customHostnameDnsRecordType; + return this; + } + + /** + * Get the hostnameType property: Type of the hostname. + * + * @return the hostnameType value. + */ + public HostnameType hostnameType() { + return this.hostnameType; + } + + /** + * Set the hostnameType property: Type of the hostname. + * + * @param hostnameType the hostnameType value to set. + * @return the Hostname object itself. + */ + public Hostname withHostnameType(HostnameType hostnameType) { + this.hostnameType = hostnameType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameBinding.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameBinding.java new file mode 100644 index 0000000000000..c370ff56b6c70 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameBinding.java @@ -0,0 +1,301 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostnameBindingInner; + +/** An immutable client-side representation of HostnameBinding. */ +public interface HostnameBinding { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the siteName property: App Service app name. + * + * @return the siteName value. + */ + String siteName(); + + /** + * Gets the domainId property: Fully qualified ARM domain resource URI. + * + * @return the domainId value. + */ + String domainId(); + + /** + * Gets the azureResourceName property: Azure resource name. + * + * @return the azureResourceName value. + */ + String azureResourceName(); + + /** + * Gets the azureResourceType property: Azure resource type. + * + * @return the azureResourceType value. + */ + AzureResourceType azureResourceType(); + + /** + * Gets the customHostnameDnsRecordType property: Custom DNS record type. + * + * @return the customHostnameDnsRecordType value. + */ + CustomHostnameDnsRecordType customHostnameDnsRecordType(); + + /** + * Gets the hostnameType property: Hostname type. + * + * @return the hostnameType value. + */ + HostnameType hostnameType(); + + /** + * Gets the sslState property: SSL type. + * + * @return the sslState value. + */ + SslState sslState(); + + /** + * Gets the thumbprint property: SSL certificate thumbprint. + * + * @return the thumbprint value. + */ + String thumbprint(); + + /** + * Gets the virtualIp property: Virtual IP address assigned to the hostname if IP based SSL is enabled. + * + * @return the virtualIp value. + */ + String virtualIp(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.HostnameBindingInner object. + * + * @return the inner object. + */ + HostnameBindingInner innerModel(); + + /** The entirety of the HostnameBinding definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The HostnameBinding definition stages. */ + interface DefinitionStages { + /** The first stage of the HostnameBinding definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the HostnameBinding definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @return the next definition stage. + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + /** + * The stage of the HostnameBinding 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.WithKind, + DefinitionStages.WithSiteName, + DefinitionStages.WithDomainId, + DefinitionStages.WithAzureResourceName, + DefinitionStages.WithAzureResourceType, + DefinitionStages.WithCustomHostnameDnsRecordType, + DefinitionStages.WithHostnameType, + DefinitionStages.WithSslState, + DefinitionStages.WithThumbprint { + /** + * Executes the create request. + * + * @return the created resource. + */ + HostnameBinding create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + HostnameBinding create(Context context); + } + /** The stage of the HostnameBinding definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the HostnameBinding definition allowing to specify siteName. */ + interface WithSiteName { + /** + * Specifies the siteName property: App Service app name.. + * + * @param siteName App Service app name. + * @return the next definition stage. + */ + WithCreate withSiteName(String siteName); + } + /** The stage of the HostnameBinding definition allowing to specify domainId. */ + interface WithDomainId { + /** + * Specifies the domainId property: Fully qualified ARM domain resource URI.. + * + * @param domainId Fully qualified ARM domain resource URI. + * @return the next definition stage. + */ + WithCreate withDomainId(String domainId); + } + /** The stage of the HostnameBinding definition allowing to specify azureResourceName. */ + interface WithAzureResourceName { + /** + * Specifies the azureResourceName property: Azure resource name.. + * + * @param azureResourceName Azure resource name. + * @return the next definition stage. + */ + WithCreate withAzureResourceName(String azureResourceName); + } + /** The stage of the HostnameBinding definition allowing to specify azureResourceType. */ + interface WithAzureResourceType { + /** + * Specifies the azureResourceType property: Azure resource type.. + * + * @param azureResourceType Azure resource type. + * @return the next definition stage. + */ + WithCreate withAzureResourceType(AzureResourceType azureResourceType); + } + /** The stage of the HostnameBinding definition allowing to specify customHostnameDnsRecordType. */ + interface WithCustomHostnameDnsRecordType { + /** + * Specifies the customHostnameDnsRecordType property: Custom DNS record type.. + * + * @param customHostnameDnsRecordType Custom DNS record type. + * @return the next definition stage. + */ + WithCreate withCustomHostnameDnsRecordType(CustomHostnameDnsRecordType customHostnameDnsRecordType); + } + /** The stage of the HostnameBinding definition allowing to specify hostnameType. */ + interface WithHostnameType { + /** + * Specifies the hostnameType property: Hostname type.. + * + * @param hostnameType Hostname type. + * @return the next definition stage. + */ + WithCreate withHostnameType(HostnameType hostnameType); + } + /** The stage of the HostnameBinding definition allowing to specify sslState. */ + interface WithSslState { + /** + * Specifies the sslState property: SSL type. + * + * @param sslState SSL type. + * @return the next definition stage. + */ + WithCreate withSslState(SslState sslState); + } + /** The stage of the HostnameBinding definition allowing to specify thumbprint. */ + interface WithThumbprint { + /** + * Specifies the thumbprint property: SSL certificate thumbprint. + * + * @param thumbprint SSL certificate thumbprint. + * @return the next definition stage. + */ + WithCreate withThumbprint(String thumbprint); + } + } + /** + * Begins update for the HostnameBinding resource. + * + * @return the stage of resource update. + */ + HostnameBinding.Update update(); + + /** The template for HostnameBinding update. */ + interface Update extends UpdateStages.WithKind { + /** + * Executes the update request. + * + * @return the updated resource. + */ + HostnameBinding apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + HostnameBinding apply(Context context); + } + /** The HostnameBinding update stages. */ + interface UpdateStages { + /** The stage of the HostnameBinding update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + HostnameBinding refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + HostnameBinding refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameBindingCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameBindingCollection.java new file mode 100644 index 0000000000000..d79a8f8df5a33 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameBindingCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostnameBindingInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of hostname bindings. */ +@Fluent +public final class HostnameBindingCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HostnameBindingCollection.class); + + /* + * 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; + + /** + * 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 HostnameBindingCollection object itself. + */ + public HostnameBindingCollection 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 HostnameBindingCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameSslState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameSslState.java new file mode 100644 index 0000000000000..26a49adb97aa3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameSslState.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** SSL-enabled hostname. */ +@Fluent +public final class HostnameSslState { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HostnameSslState.class); + + /* + * Hostname. + */ + @JsonProperty(value = "name") + private String name; + + /* + * SSL type. + */ + @JsonProperty(value = "sslState") + private SslState sslState; + + /* + * Virtual IP address assigned to the hostname if IP based SSL is enabled. + */ + @JsonProperty(value = "virtualIP") + private String virtualIp; + + /* + * SSL certificate thumbprint. + */ + @JsonProperty(value = "thumbprint") + private String thumbprint; + + /* + * Set to true to update existing hostname. + */ + @JsonProperty(value = "toUpdate") + private Boolean toUpdate; + + /* + * Indicates whether the hostname is a standard or repository hostname. + */ + @JsonProperty(value = "hostType") + private HostType hostType; + + /** + * Get the name property: Hostname. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Hostname. + * + * @param name the name value to set. + * @return the HostnameSslState object itself. + */ + public HostnameSslState withName(String name) { + this.name = name; + return this; + } + + /** + * Get the sslState property: SSL type. + * + * @return the sslState value. + */ + public SslState sslState() { + return this.sslState; + } + + /** + * Set the sslState property: SSL type. + * + * @param sslState the sslState value to set. + * @return the HostnameSslState object itself. + */ + public HostnameSslState withSslState(SslState sslState) { + this.sslState = sslState; + return this; + } + + /** + * Get the virtualIp property: Virtual IP address assigned to the hostname if IP based SSL is enabled. + * + * @return the virtualIp value. + */ + public String virtualIp() { + return this.virtualIp; + } + + /** + * Set the virtualIp property: Virtual IP address assigned to the hostname if IP based SSL is enabled. + * + * @param virtualIp the virtualIp value to set. + * @return the HostnameSslState object itself. + */ + public HostnameSslState withVirtualIp(String virtualIp) { + this.virtualIp = virtualIp; + return this; + } + + /** + * Get the thumbprint property: SSL certificate thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Set the thumbprint property: SSL certificate thumbprint. + * + * @param thumbprint the thumbprint value to set. + * @return the HostnameSslState object itself. + */ + public HostnameSslState withThumbprint(String thumbprint) { + this.thumbprint = thumbprint; + return this; + } + + /** + * Get the toUpdate property: Set to <code>true</code> to update existing hostname. + * + * @return the toUpdate value. + */ + public Boolean toUpdate() { + return this.toUpdate; + } + + /** + * Set the toUpdate property: Set to <code>true</code> to update existing hostname. + * + * @param toUpdate the toUpdate value to set. + * @return the HostnameSslState object itself. + */ + public HostnameSslState withToUpdate(Boolean toUpdate) { + this.toUpdate = toUpdate; + return this; + } + + /** + * Get the hostType property: Indicates whether the hostname is a standard or repository hostname. + * + * @return the hostType value. + */ + public HostType hostType() { + return this.hostType; + } + + /** + * Set the hostType property: Indicates whether the hostname is a standard or repository hostname. + * + * @param hostType the hostType value to set. + * @return the HostnameSslState object itself. + */ + public HostnameSslState withHostType(HostType hostType) { + this.hostType = hostType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameType.java new file mode 100644 index 0000000000000..15126273e4a1f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HostnameType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for HostnameType. */ +public enum HostnameType { + /** Enum value Verified. */ + VERIFIED("Verified"), + + /** Enum value Managed. */ + MANAGED("Managed"); + + /** The actual serialized value for a HostnameType instance. */ + private final String value; + + HostnameType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a HostnameType instance. + * + * @param value the serialized value to parse. + * @return the parsed HostnameType object, or null if unable to parse. + */ + @JsonCreator + public static HostnameType fromString(String value) { + HostnameType[] items = HostnameType.values(); + for (HostnameType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpLogsConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpLogsConfig.java new file mode 100644 index 0000000000000..04772b7851467 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpLogsConfig.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Http logs configuration. */ +@Fluent +public final class HttpLogsConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HttpLogsConfig.class); + + /* + * Http logs to file system configuration. + */ + @JsonProperty(value = "fileSystem") + private FileSystemHttpLogsConfig fileSystem; + + /* + * Http logs to azure blob storage configuration. + */ + @JsonProperty(value = "azureBlobStorage") + private AzureBlobStorageHttpLogsConfig azureBlobStorage; + + /** + * Get the fileSystem property: Http logs to file system configuration. + * + * @return the fileSystem value. + */ + public FileSystemHttpLogsConfig fileSystem() { + return this.fileSystem; + } + + /** + * Set the fileSystem property: Http logs to file system configuration. + * + * @param fileSystem the fileSystem value to set. + * @return the HttpLogsConfig object itself. + */ + public HttpLogsConfig withFileSystem(FileSystemHttpLogsConfig fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Get the azureBlobStorage property: Http logs to azure blob storage configuration. + * + * @return the azureBlobStorage value. + */ + public AzureBlobStorageHttpLogsConfig azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set the azureBlobStorage property: Http logs to azure blob storage configuration. + * + * @param azureBlobStorage the azureBlobStorage value to set. + * @return the HttpLogsConfig object itself. + */ + public HttpLogsConfig withAzureBlobStorage(AzureBlobStorageHttpLogsConfig azureBlobStorage) { + this.azureBlobStorage = azureBlobStorage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fileSystem() != null) { + fileSystem().validate(); + } + if (azureBlobStorage() != null) { + azureBlobStorage().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpScaleRule.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpScaleRule.java new file mode 100644 index 0000000000000..4c9074f32b38c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpScaleRule.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Container App container Custom scaling rule. */ +@Fluent +public final class HttpScaleRule { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HttpScaleRule.class); + + /* + * Metadata properties to describe http scale rule. + */ + @JsonProperty(value = "metadata") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map metadata; + + /* + * Authentication secrets for the custom scale rule. + */ + @JsonProperty(value = "auth") + private List auth; + + /** + * Get the metadata property: Metadata properties to describe http scale rule. + * + * @return the metadata value. + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata properties to describe http scale rule. + * + * @param metadata the metadata value to set. + * @return the HttpScaleRule object itself. + */ + public HttpScaleRule withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the auth property: Authentication secrets for the custom scale rule. + * + * @return the auth value. + */ + public List auth() { + return this.auth; + } + + /** + * Set the auth property: Authentication secrets for the custom scale rule. + * + * @param auth the auth value to set. + * @return the HttpScaleRule object itself. + */ + public HttpScaleRule 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpSettings.java new file mode 100644 index 0000000000000..38f089ec80952 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpSettings.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration settings of the HTTP requests for authentication and authorization requests made against App + * Service Authentication/Authorization. + */ +@Fluent +public final class HttpSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HttpSettings.class); + + /* + * false if the authentication/authorization responses not + * having the HTTPS scheme are permissible; otherwise, true. + */ + @JsonProperty(value = "requireHttps") + private Boolean requireHttps; + + /* + * The configuration settings of the paths HTTP requests. + */ + @JsonProperty(value = "routes") + private HttpSettingsRoutes routes; + + /* + * The configuration settings of a forward proxy used to make the requests. + */ + @JsonProperty(value = "forwardProxy") + private ForwardProxy forwardProxy; + + /** + * Get the requireHttps property: <code>false</code> if the authentication/authorization responses not + * having the HTTPS scheme are permissible; otherwise, <code>true</code>. + * + * @return the requireHttps value. + */ + public Boolean requireHttps() { + return this.requireHttps; + } + + /** + * Set the requireHttps property: <code>false</code> if the authentication/authorization responses not + * having the HTTPS scheme are permissible; otherwise, <code>true</code>. + * + * @param requireHttps the requireHttps value to set. + * @return the HttpSettings object itself. + */ + public HttpSettings withRequireHttps(Boolean requireHttps) { + this.requireHttps = requireHttps; + return this; + } + + /** + * Get the routes property: The configuration settings of the paths HTTP requests. + * + * @return the routes value. + */ + public HttpSettingsRoutes routes() { + return this.routes; + } + + /** + * Set the routes property: The configuration settings of the paths HTTP requests. + * + * @param routes the routes value to set. + * @return the HttpSettings object itself. + */ + public HttpSettings withRoutes(HttpSettingsRoutes routes) { + this.routes = routes; + return this; + } + + /** + * Get the forwardProxy property: The configuration settings of a forward proxy used to make the requests. + * + * @return the forwardProxy value. + */ + public ForwardProxy forwardProxy() { + return this.forwardProxy; + } + + /** + * Set the forwardProxy property: The configuration settings of a forward proxy used to make the requests. + * + * @param forwardProxy the forwardProxy value to set. + * @return the HttpSettings object itself. + */ + public HttpSettings withForwardProxy(ForwardProxy forwardProxy) { + this.forwardProxy = forwardProxy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (routes() != null) { + routes().validate(); + } + if (forwardProxy() != null) { + forwardProxy().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpSettingsRoutes.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpSettingsRoutes.java new file mode 100644 index 0000000000000..114e1bae49cdf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HttpSettingsRoutes.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the paths HTTP requests. */ +@Fluent +public final class HttpSettingsRoutes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HttpSettingsRoutes.class); + + /* + * The prefix that should precede all the authentication/authorization + * paths. + */ + @JsonProperty(value = "apiPrefix") + private String apiPrefix; + + /** + * Get the apiPrefix property: The prefix that should precede all the authentication/authorization paths. + * + * @return the apiPrefix value. + */ + public String apiPrefix() { + return this.apiPrefix; + } + + /** + * Set the apiPrefix property: The prefix that should precede all the authentication/authorization paths. + * + * @param apiPrefix the apiPrefix value to set. + * @return the HttpSettingsRoutes object itself. + */ + public HttpSettingsRoutes withApiPrefix(String apiPrefix) { + this.apiPrefix = apiPrefix; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnection.java new file mode 100644 index 0000000000000..fa9f8f1c21975 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnection.java @@ -0,0 +1,378 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; + +/** An immutable client-side representation of HybridConnection. */ +public interface HybridConnection { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the serviceBusNamespace property: The name of the Service Bus namespace. + * + * @return the serviceBusNamespace value. + */ + String serviceBusNamespace(); + + /** + * Gets the relayName property: The name of the Service Bus relay. + * + * @return the relayName value. + */ + String relayName(); + + /** + * Gets the relayArmUri property: The ARM URI to the Service Bus relay. + * + * @return the relayArmUri value. + */ + String relayArmUri(); + + /** + * Gets the hostname property: The hostname of the endpoint. + * + * @return the hostname value. + */ + String hostname(); + + /** + * Gets the port property: The port of the endpoint. + * + * @return the port value. + */ + Integer port(); + + /** + * Gets the sendKeyName property: The name of the Service Bus key which has Send permissions. This is used to + * authenticate to Service Bus. + * + * @return the sendKeyName value. + */ + String sendKeyName(); + + /** + * Gets the sendKeyValue property: The value of the Service Bus key. This is used to authenticate to Service Bus. In + * ARM this key will not be returned normally, use the POST /listKeys API instead. + * + * @return the sendKeyValue value. + */ + String sendKeyValue(); + + /** + * Gets the serviceBusSuffix property: The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * + * @return the serviceBusSuffix value. + */ + String serviceBusSuffix(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner object. + * + * @return the inner object. + */ + HybridConnectionInner innerModel(); + + /** The entirety of the HybridConnection definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The HybridConnection definition stages. */ + interface DefinitionStages { + /** The first stage of the HybridConnection definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the HybridConnection definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name, namespaceName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @return the next definition stage. + */ + WithCreate withExistingHybridConnectionNamespace( + String resourceGroupName, String name, String namespaceName); + } + /** + * The stage of the HybridConnection 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.WithKind, + DefinitionStages.WithServiceBusNamespace, + DefinitionStages.WithRelayName, + DefinitionStages.WithRelayArmUri, + DefinitionStages.WithHostname, + DefinitionStages.WithPort, + DefinitionStages.WithSendKeyName, + DefinitionStages.WithSendKeyValue, + DefinitionStages.WithServiceBusSuffix { + /** + * Executes the create request. + * + * @return the created resource. + */ + HybridConnection create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + HybridConnection create(Context context); + } + /** The stage of the HybridConnection definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the HybridConnection definition allowing to specify serviceBusNamespace. */ + interface WithServiceBusNamespace { + /** + * Specifies the serviceBusNamespace property: The name of the Service Bus namespace.. + * + * @param serviceBusNamespace The name of the Service Bus namespace. + * @return the next definition stage. + */ + WithCreate withServiceBusNamespace(String serviceBusNamespace); + } + /** The stage of the HybridConnection definition allowing to specify relayName. */ + interface WithRelayName { + /** + * Specifies the relayName property: The name of the Service Bus relay.. + * + * @param relayName The name of the Service Bus relay. + * @return the next definition stage. + */ + WithCreate withRelayName(String relayName); + } + /** The stage of the HybridConnection definition allowing to specify relayArmUri. */ + interface WithRelayArmUri { + /** + * Specifies the relayArmUri property: The ARM URI to the Service Bus relay.. + * + * @param relayArmUri The ARM URI to the Service Bus relay. + * @return the next definition stage. + */ + WithCreate withRelayArmUri(String relayArmUri); + } + /** The stage of the HybridConnection definition allowing to specify hostname. */ + interface WithHostname { + /** + * Specifies the hostname property: The hostname of the endpoint.. + * + * @param hostname The hostname of the endpoint. + * @return the next definition stage. + */ + WithCreate withHostname(String hostname); + } + /** The stage of the HybridConnection definition allowing to specify port. */ + interface WithPort { + /** + * Specifies the port property: The port of the endpoint.. + * + * @param port The port of the endpoint. + * @return the next definition stage. + */ + WithCreate withPort(Integer port); + } + /** The stage of the HybridConnection definition allowing to specify sendKeyName. */ + interface WithSendKeyName { + /** + * Specifies the sendKeyName property: The name of the Service Bus key which has Send permissions. This is + * used to authenticate to Service Bus.. + * + * @param sendKeyName The name of the Service Bus key which has Send permissions. This is used to + * authenticate to Service Bus. + * @return the next definition stage. + */ + WithCreate withSendKeyName(String sendKeyName); + } + /** The stage of the HybridConnection definition allowing to specify sendKeyValue. */ + interface WithSendKeyValue { + /** + * Specifies the sendKeyValue property: The value of the Service Bus key. This is used to authenticate to + * Service Bus. In ARM this key will not be returned normally, use the POST /listKeys API instead.. + * + * @param sendKeyValue The value of the Service Bus key. This is used to authenticate to Service Bus. In ARM + * this key will not be returned normally, use the POST /listKeys API instead. + * @return the next definition stage. + */ + WithCreate withSendKeyValue(String sendKeyValue); + } + /** The stage of the HybridConnection definition allowing to specify serviceBusSuffix. */ + interface WithServiceBusSuffix { + /** + * Specifies the serviceBusSuffix property: The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * + * @param serviceBusSuffix The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * @return the next definition stage. + */ + WithCreate withServiceBusSuffix(String serviceBusSuffix); + } + } + /** + * Begins update for the HybridConnection resource. + * + * @return the stage of resource update. + */ + HybridConnection.Update update(); + + /** The template for HybridConnection update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithRelayArmUri, + UpdateStages.WithHostname, + UpdateStages.WithPort, + UpdateStages.WithSendKeyName, + UpdateStages.WithSendKeyValue, + UpdateStages.WithServiceBusSuffix { + /** + * Executes the update request. + * + * @return the updated resource. + */ + HybridConnection apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + HybridConnection apply(Context context); + } + /** The HybridConnection update stages. */ + interface UpdateStages { + /** The stage of the HybridConnection update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the HybridConnection update allowing to specify relayArmUri. */ + interface WithRelayArmUri { + /** + * Specifies the relayArmUri property: The ARM URI to the Service Bus relay.. + * + * @param relayArmUri The ARM URI to the Service Bus relay. + * @return the next definition stage. + */ + Update withRelayArmUri(String relayArmUri); + } + /** The stage of the HybridConnection update allowing to specify hostname. */ + interface WithHostname { + /** + * Specifies the hostname property: The hostname of the endpoint.. + * + * @param hostname The hostname of the endpoint. + * @return the next definition stage. + */ + Update withHostname(String hostname); + } + /** The stage of the HybridConnection update allowing to specify port. */ + interface WithPort { + /** + * Specifies the port property: The port of the endpoint.. + * + * @param port The port of the endpoint. + * @return the next definition stage. + */ + Update withPort(Integer port); + } + /** The stage of the HybridConnection update allowing to specify sendKeyName. */ + interface WithSendKeyName { + /** + * Specifies the sendKeyName property: The name of the Service Bus key which has Send permissions. This is + * used to authenticate to Service Bus.. + * + * @param sendKeyName The name of the Service Bus key which has Send permissions. This is used to + * authenticate to Service Bus. + * @return the next definition stage. + */ + Update withSendKeyName(String sendKeyName); + } + /** The stage of the HybridConnection update allowing to specify sendKeyValue. */ + interface WithSendKeyValue { + /** + * Specifies the sendKeyValue property: The value of the Service Bus key. This is used to authenticate to + * Service Bus. In ARM this key will not be returned normally, use the POST /listKeys API instead.. + * + * @param sendKeyValue The value of the Service Bus key. This is used to authenticate to Service Bus. In ARM + * this key will not be returned normally, use the POST /listKeys API instead. + * @return the next definition stage. + */ + Update withSendKeyValue(String sendKeyValue); + } + /** The stage of the HybridConnection update allowing to specify serviceBusSuffix. */ + interface WithServiceBusSuffix { + /** + * Specifies the serviceBusSuffix property: The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * + * @param serviceBusSuffix The suffix for the service bus endpoint. By default this is + * .servicebus.windows.net. + * @return the next definition stage. + */ + Update withServiceBusSuffix(String serviceBusSuffix); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + HybridConnection refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + HybridConnection refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionCollection.java new file mode 100644 index 0000000000000..de95fb43d5647 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of hostname bindings. */ +@Fluent +public final class HybridConnectionCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(HybridConnectionCollection.class); + + /* + * 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; + + /** + * 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 HybridConnectionCollection object itself. + */ + public HybridConnectionCollection 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 HybridConnectionCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionKey.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionKey.java new file mode 100644 index 0000000000000..c70ff56ce6666 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionKey.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionKeyInner; + +/** An immutable client-side representation of HybridConnectionKey. */ +public interface HybridConnectionKey { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the sendKeyName property: The name of the send key. + * + * @return the sendKeyName value. + */ + String sendKeyName(); + + /** + * Gets the sendKeyValue property: The value of the send key. + * + * @return the sendKeyValue value. + */ + String sendKeyValue(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionKeyInner object. + * + * @return the inner object. + */ + HybridConnectionKeyInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionLimits.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionLimits.java new file mode 100644 index 0000000000000..2f7e6e160d5d4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/HybridConnectionLimits.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionLimitsInner; + +/** An immutable client-side representation of HybridConnectionLimits. */ +public interface HybridConnectionLimits { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the current property: The current number of Hybrid Connections. + * + * @return the current value. + */ + Integer current(); + + /** + * Gets the maximum property: The maximum number of Hybrid Connections allowed. + * + * @return the maximum value. + */ + Integer maximum(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionLimitsInner object. + * + * @return the inner object. + */ + HybridConnectionLimitsInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Identifier.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Identifier.java new file mode 100644 index 0000000000000..0bc060448a852 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Identifier.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; + +/** An immutable client-side representation of Identifier. */ +public interface Identifier { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the value property: String representation of the identity. + * + * @return the value value. + */ + String value(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner object. + * + * @return the inner object. + */ + IdentifierInner innerModel(); + + /** The entirety of the Identifier definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The Identifier definition stages. */ + interface DefinitionStages { + /** The first stage of the Identifier definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the Identifier definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @return the next definition stage. + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + /** + * The stage of the Identifier 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.WithKind, DefinitionStages.WithValue { + /** + * Executes the create request. + * + * @return the created resource. + */ + Identifier create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Identifier create(Context context); + } + /** The stage of the Identifier definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the Identifier definition allowing to specify value. */ + interface WithValue { + /** + * Specifies the value property: String representation of the identity.. + * + * @param value String representation of the identity. + * @return the next definition stage. + */ + WithCreate withValue(String value); + } + } + /** + * Begins update for the Identifier resource. + * + * @return the stage of resource update. + */ + Identifier.Update update(); + + /** The template for Identifier update. */ + interface Update extends UpdateStages.WithKind, UpdateStages.WithValue { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Identifier apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Identifier apply(Context context); + } + /** The Identifier update stages. */ + interface UpdateStages { + /** The stage of the Identifier update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the Identifier update allowing to specify value. */ + interface WithValue { + /** + * Specifies the value property: String representation of the identity.. + * + * @param value String representation of the identity. + * @return the next definition stage. + */ + Update withValue(String value); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Identifier refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Identifier refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IdentifierCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IdentifierCollection.java new file mode 100644 index 0000000000000..2afd1d8923e70 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IdentifierCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of identifiers. */ +@Fluent +public final class IdentifierCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentifierCollection.class); + + /* + * 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; + + /** + * 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 IdentifierCollection object itself. + */ + public IdentifierCollection 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 IdentifierCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IdentityProviders.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IdentityProviders.java new file mode 100644 index 0000000000000..9e04ca2ad91e1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IdentityProviders.java @@ -0,0 +1,303 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The configuration settings of each of the identity providers used to configure App Service + * Authentication/Authorization. + */ +@Fluent +public final class IdentityProviders { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IdentityProviders.class); + + /* + * The configuration settings of the Azure Active directory provider. + */ + @JsonProperty(value = "azureActiveDirectory") + private AzureActiveDirectory azureActiveDirectory; + + /* + * The configuration settings of the Facebook provider. + */ + @JsonProperty(value = "facebook") + private Facebook facebook; + + /* + * The configuration settings of the GitHub provider. + */ + @JsonProperty(value = "gitHub") + private GitHub gitHub; + + /* + * The configuration settings of the Google provider. + */ + @JsonProperty(value = "google") + private Google google; + + /* + * The configuration settings of the legacy Microsoft Account provider. + */ + @JsonProperty(value = "legacyMicrosoftAccount") + private LegacyMicrosoftAccount legacyMicrosoftAccount; + + /* + * The configuration settings of the Twitter provider. + */ + @JsonProperty(value = "twitter") + private Twitter twitter; + + /* + * The configuration settings of the Apple provider. + */ + @JsonProperty(value = "apple") + private Apple apple; + + /* + * The configuration settings of the Azure Static Web Apps provider. + */ + @JsonProperty(value = "azureStaticWebApps") + private AzureStaticWebApps azureStaticWebApps; + + /* + * 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; + + /** + * Get the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. + * + * @return the azureActiveDirectory value. + */ + public AzureActiveDirectory azureActiveDirectory() { + return this.azureActiveDirectory; + } + + /** + * Set the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. + * + * @param azureActiveDirectory the azureActiveDirectory value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withAzureActiveDirectory(AzureActiveDirectory azureActiveDirectory) { + this.azureActiveDirectory = azureActiveDirectory; + return this; + } + + /** + * Get the facebook property: The configuration settings of the Facebook provider. + * + * @return the facebook value. + */ + public Facebook facebook() { + return this.facebook; + } + + /** + * Set the facebook property: The configuration settings of the Facebook provider. + * + * @param facebook the facebook value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withFacebook(Facebook facebook) { + this.facebook = facebook; + return this; + } + + /** + * Get the gitHub property: The configuration settings of the GitHub provider. + * + * @return the gitHub value. + */ + public GitHub gitHub() { + return this.gitHub; + } + + /** + * Set the gitHub property: The configuration settings of the GitHub provider. + * + * @param gitHub the gitHub value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withGitHub(GitHub gitHub) { + this.gitHub = gitHub; + return this; + } + + /** + * Get the google property: The configuration settings of the Google provider. + * + * @return the google value. + */ + public Google google() { + return this.google; + } + + /** + * Set the google property: The configuration settings of the Google provider. + * + * @param google the google value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withGoogle(Google google) { + this.google = google; + return this; + } + + /** + * Get the legacyMicrosoftAccount property: The configuration settings of the legacy Microsoft Account provider. + * + * @return the legacyMicrosoftAccount value. + */ + public LegacyMicrosoftAccount legacyMicrosoftAccount() { + return this.legacyMicrosoftAccount; + } + + /** + * Set the legacyMicrosoftAccount property: The configuration settings of the legacy Microsoft Account provider. + * + * @param legacyMicrosoftAccount the legacyMicrosoftAccount value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withLegacyMicrosoftAccount(LegacyMicrosoftAccount legacyMicrosoftAccount) { + this.legacyMicrosoftAccount = legacyMicrosoftAccount; + return this; + } + + /** + * Get the twitter property: The configuration settings of the Twitter provider. + * + * @return the twitter value. + */ + public Twitter twitter() { + return this.twitter; + } + + /** + * Set the twitter property: The configuration settings of the Twitter provider. + * + * @param twitter the twitter value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withTwitter(Twitter twitter) { + this.twitter = twitter; + return this; + } + + /** + * Get the apple property: The configuration settings of the Apple provider. + * + * @return the apple value. + */ + public Apple apple() { + return this.apple; + } + + /** + * Set the apple property: The configuration settings of the Apple provider. + * + * @param apple the apple value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withApple(Apple apple) { + this.apple = apple; + return this; + } + + /** + * Get the azureStaticWebApps property: The configuration settings of the Azure Static Web Apps provider. + * + * @return the azureStaticWebApps value. + */ + public AzureStaticWebApps azureStaticWebApps() { + return this.azureStaticWebApps; + } + + /** + * Set the azureStaticWebApps property: The configuration settings of the Azure Static Web Apps provider. + * + * @param azureStaticWebApps the azureStaticWebApps value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withAzureStaticWebApps(AzureStaticWebApps azureStaticWebApps) { + this.azureStaticWebApps = azureStaticWebApps; + return this; + } + + /** + * Get the customOpenIdConnectProviders property: The map of the name of the alias of each custom Open ID Connect + * provider to the configuration settings of the custom Open ID Connect provider. + * + * @return the customOpenIdConnectProviders value. + */ + public Map customOpenIdConnectProviders() { + return this.customOpenIdConnectProviders; + } + + /** + * Set the customOpenIdConnectProviders property: The map of the name of the alias of each custom Open ID Connect + * provider to the configuration settings of the custom Open ID Connect provider. + * + * @param customOpenIdConnectProviders the customOpenIdConnectProviders value to set. + * @return the IdentityProviders object itself. + */ + public IdentityProviders withCustomOpenIdConnectProviders( + Map customOpenIdConnectProviders) { + this.customOpenIdConnectProviders = customOpenIdConnectProviders; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureActiveDirectory() != null) { + azureActiveDirectory().validate(); + } + if (facebook() != null) { + facebook().validate(); + } + if (gitHub() != null) { + gitHub().validate(); + } + if (google() != null) { + google().validate(); + } + if (legacyMicrosoftAccount() != null) { + legacyMicrosoftAccount().validate(); + } + if (twitter() != null) { + twitter().validate(); + } + if (apple() != null) { + apple().validate(); + } + if (azureStaticWebApps() != null) { + azureStaticWebApps().validate(); + } + if (customOpenIdConnectProviders() != null) { + customOpenIdConnectProviders() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InAvailabilityReasonType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InAvailabilityReasonType.java new file mode 100644 index 0000000000000..755b43d133acb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InAvailabilityReasonType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for InAvailabilityReasonType. */ +public final class InAvailabilityReasonType extends ExpandableStringEnum { + /** Static value Invalid for InAvailabilityReasonType. */ + public static final InAvailabilityReasonType INVALID = fromString("Invalid"); + + /** Static value AlreadyExists for InAvailabilityReasonType. */ + public static final InAvailabilityReasonType ALREADY_EXISTS = fromString("AlreadyExists"); + + /** + * Creates or finds a InAvailabilityReasonType from its string representation. + * + * @param name a name to look for. + * @return the corresponding InAvailabilityReasonType. + */ + @JsonCreator + public static InAvailabilityReasonType fromString(String name) { + return fromString(name, InAvailabilityReasonType.class); + } + + /** @return known InAvailabilityReasonType values. */ + public static Collection values() { + return values(InAvailabilityReasonType.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InboundEnvironmentEndpoint.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InboundEnvironmentEndpoint.java new file mode 100644 index 0000000000000..f87fbe57cf6d4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InboundEnvironmentEndpoint.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.InboundEnvironmentEndpointInner; +import java.util.List; + +/** An immutable client-side representation of InboundEnvironmentEndpoint. */ +public interface InboundEnvironmentEndpoint { + /** + * Gets the description property: Short text describing the purpose of the network traffic. + * + * @return the description value. + */ + String description(); + + /** + * Gets the endpoints property: The IP addresses that network traffic will originate from in cidr notation. + * + * @return the endpoints value. + */ + List endpoints(); + + /** + * Gets the ports property: The ports that network traffic will arrive to the App Service Environment at. + * + * @return the ports value. + */ + List ports(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.InboundEnvironmentEndpointInner + * object. + * + * @return the inner object. + */ + InboundEnvironmentEndpointInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InboundEnvironmentEndpointCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InboundEnvironmentEndpointCollection.java new file mode 100644 index 0000000000000..cce1a0f5670a2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InboundEnvironmentEndpointCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.InboundEnvironmentEndpointInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Inbound Environment Endpoints. */ +@Fluent +public final class InboundEnvironmentEndpointCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(InboundEnvironmentEndpointCollection.class); + + /* + * 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; + + /** + * 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 InboundEnvironmentEndpointCollection object itself. + */ + public InboundEnvironmentEndpointCollection 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 InboundEnvironmentEndpointCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Ingress.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Ingress.java new file mode 100644 index 0000000000000..69a4d0d86f86f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Ingress.java @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App Ingress configuration. */ +@Fluent +public final class Ingress { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Ingress.class); + + /* + * Hostname. + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /* + * Bool indicating if app exposes an external http endpoint + */ + @JsonProperty(value = "external") + private Boolean external; + + /* + * Target Port in containers for traffic from ingress + */ + @JsonProperty(value = "targetPort") + private Integer targetPort; + + /* + * Ingress transport protocol + */ + @JsonProperty(value = "transport") + private IngressTransportMethod transport; + + /* + * The traffic property. + */ + @JsonProperty(value = "traffic") + private List traffic; + + /* + * 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; + + /** + * Get the fqdn property: Hostname. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Get the external property: Bool indicating if app exposes an external http endpoint. + * + * @return the external value. + */ + public Boolean external() { + return this.external; + } + + /** + * Set the external property: Bool indicating if app exposes an external http endpoint. + * + * @param external the external value to set. + * @return the Ingress object itself. + */ + public Ingress withExternal(Boolean external) { + this.external = external; + return this; + } + + /** + * Get the targetPort property: Target Port in containers for traffic from ingress. + * + * @return the targetPort value. + */ + public Integer targetPort() { + return this.targetPort; + } + + /** + * Set the targetPort property: Target Port in containers for traffic from ingress. + * + * @param targetPort the targetPort value to set. + * @return the Ingress object itself. + */ + public Ingress withTargetPort(Integer targetPort) { + this.targetPort = targetPort; + return this; + } + + /** + * Get the transport property: Ingress transport protocol. + * + * @return the transport value. + */ + public IngressTransportMethod transport() { + return this.transport; + } + + /** + * Set the transport property: Ingress transport protocol. + * + * @param transport the transport value to set. + * @return the Ingress object itself. + */ + public Ingress withTransport(IngressTransportMethod transport) { + this.transport = transport; + return this; + } + + /** + * Get the traffic property: The traffic property. + * + * @return the traffic value. + */ + public List traffic() { + return this.traffic; + } + + /** + * Set the traffic property: The traffic property. + * + * @param traffic the traffic value to set. + * @return the Ingress object itself. + */ + public Ingress withTraffic(List traffic) { + this.traffic = traffic; + return this; + } + + /** + * Get the allowInsecure property: Bool indicating if HTTP connections to is allowed. If set to false HTTP + * connections are automatically redirected to HTTPS connections. + * + * @return the allowInsecure value. + */ + public Boolean allowInsecure() { + return this.allowInsecure; + } + + /** + * Set the allowInsecure property: Bool indicating if HTTP connections to is allowed. If set to false HTTP + * connections are automatically redirected to HTTPS connections. + * + * @param allowInsecure the allowInsecure value to set. + * @return the Ingress object itself. + */ + public Ingress withAllowInsecure(Boolean allowInsecure) { + this.allowInsecure = allowInsecure; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (traffic() != null) { + traffic().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IngressTransportMethod.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IngressTransportMethod.java new file mode 100644 index 0000000000000..8dcfce38dc7cd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IngressTransportMethod.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for IngressTransportMethod. */ +public final class IngressTransportMethod extends ExpandableStringEnum { + /** Static value auto for IngressTransportMethod. */ + public static final IngressTransportMethod AUTO = fromString("auto"); + + /** Static value http for IngressTransportMethod. */ + public static final IngressTransportMethod HTTP = fromString("http"); + + /** Static value http2 for IngressTransportMethod. */ + public static final IngressTransportMethod HTTP2 = fromString("http2"); + + /** + * Creates or finds a IngressTransportMethod from its string representation. + * + * @param name a name to look for. + * @return the corresponding IngressTransportMethod. + */ + @JsonCreator + public static IngressTransportMethod fromString(String name) { + return fromString(name, IngressTransportMethod.class); + } + + /** @return known IngressTransportMethod values. */ + public static Collection values() { + return values(IngressTransportMethod.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InsightStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InsightStatus.java new file mode 100644 index 0000000000000..47925e5f9287a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/InsightStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for InsightStatus. */ +public enum InsightStatus { + /** Enum value Critical. */ + CRITICAL("Critical"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Info. */ + INFO("Info"), + + /** Enum value Success. */ + SUCCESS("Success"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a InsightStatus instance. */ + private final String value; + + InsightStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a InsightStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed InsightStatus object, or null if unable to parse. + */ + @JsonCreator + public static InsightStatus fromString(String value) { + InsightStatus[] items = InsightStatus.values(); + for (InsightStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IpFilterTag.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IpFilterTag.java new file mode 100644 index 0000000000000..d6fd73ada1354 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IpFilterTag.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for IpFilterTag. */ +public final class IpFilterTag extends ExpandableStringEnum { + /** Static value Default for IpFilterTag. */ + public static final IpFilterTag DEFAULT = fromString("Default"); + + /** Static value XffProxy for IpFilterTag. */ + public static final IpFilterTag XFF_PROXY = fromString("XffProxy"); + + /** Static value ServiceTag for IpFilterTag. */ + public static final IpFilterTag SERVICE_TAG = fromString("ServiceTag"); + + /** + * Creates or finds a IpFilterTag from its string representation. + * + * @param name a name to look for. + * @return the corresponding IpFilterTag. + */ + @JsonCreator + public static IpFilterTag fromString(String name) { + return fromString(name, IpFilterTag.class); + } + + /** @return known IpFilterTag values. */ + public static Collection values() { + return values(IpFilterTag.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IpSecurityRestriction.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IpSecurityRestriction.java new file mode 100644 index 0000000000000..05cfa7977e18a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IpSecurityRestriction.java @@ -0,0 +1,368 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** IP security restriction on an app. */ +@Fluent +public final class IpSecurityRestriction { + @JsonIgnore private final ClientLogger logger = new ClientLogger(IpSecurityRestriction.class); + + /* + * IP address the security restriction is valid for. + * It can be in form of pure ipv4 address (required SubnetMask property) or + * CIDR notation such as ipv4/mask (leading bit match). For CIDR, + * SubnetMask property must not be specified. + */ + @JsonProperty(value = "ipAddress") + private String ipAddress; + + /* + * Subnet mask for the range of IP addresses the restriction is valid for. + */ + @JsonProperty(value = "subnetMask") + private String subnetMask; + + /* + * Virtual network resource id + */ + @JsonProperty(value = "vnetSubnetResourceId") + private String vnetSubnetResourceId; + + /* + * (internal) Vnet traffic tag + */ + @JsonProperty(value = "vnetTrafficTag") + private Integer vnetTrafficTag; + + /* + * (internal) Subnet traffic tag + */ + @JsonProperty(value = "subnetTrafficTag") + private Integer subnetTrafficTag; + + /* + * Allow or Deny access for this IP range. + */ + @JsonProperty(value = "action") + private String action; + + /* + * Defines what this IP filter will be used for. This is to support IP + * filtering on proxies. + */ + @JsonProperty(value = "tag") + private IpFilterTag tag; + + /* + * Priority of IP restriction rule. + */ + @JsonProperty(value = "priority") + private Integer priority; + + /* + * IP restriction rule name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * IP restriction rule description. + */ + @JsonProperty(value = "description") + private String description; + + /* + * IP restriction rule headers. + * X-Forwarded-Host + * (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). + * The matching logic is .. + * - If the property is null or empty (default), all hosts(or lack of) are + * allowed. + * - A value is compared using ordinal-ignore-case (excluding port number). + * - Subdomain wildcards are permitted but don't match the root domain. For + * example, *.contoso.com matches the subdomain foo.contoso.com + * but not the root domain contoso.com or multi-level foo.bar.contoso.com + * - Unicode host names are allowed but are converted to Punycode for + * matching. + * + * X-Forwarded-For + * (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). + * The matching logic is .. + * - If the property is null or empty (default), any forwarded-for chains + * (or lack of) are allowed. + * - If any address (excluding port number) in the chain (comma separated) + * matches the CIDR defined by the property. + * + * X-Azure-FDID and X-FD-HealthProbe. + * The matching logic is exact match. + */ + @JsonProperty(value = "headers") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map> headers; + + /** + * Get the ipAddress property: IP address the security restriction is valid for. It can be in form of pure ipv4 + * address (required SubnetMask property) or CIDR notation such as ipv4/mask (leading bit match). For CIDR, + * SubnetMask property must not be specified. + * + * @return the ipAddress value. + */ + public String ipAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress property: IP address the security restriction is valid for. It can be in form of pure ipv4 + * address (required SubnetMask property) or CIDR notation such as ipv4/mask (leading bit match). For CIDR, + * SubnetMask property must not be specified. + * + * @param ipAddress the ipAddress value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * Get the subnetMask property: Subnet mask for the range of IP addresses the restriction is valid for. + * + * @return the subnetMask value. + */ + public String subnetMask() { + return this.subnetMask; + } + + /** + * Set the subnetMask property: Subnet mask for the range of IP addresses the restriction is valid for. + * + * @param subnetMask the subnetMask value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withSubnetMask(String subnetMask) { + this.subnetMask = subnetMask; + return this; + } + + /** + * Get the vnetSubnetResourceId property: Virtual network resource id. + * + * @return the vnetSubnetResourceId value. + */ + public String vnetSubnetResourceId() { + return this.vnetSubnetResourceId; + } + + /** + * Set the vnetSubnetResourceId property: Virtual network resource id. + * + * @param vnetSubnetResourceId the vnetSubnetResourceId value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withVnetSubnetResourceId(String vnetSubnetResourceId) { + this.vnetSubnetResourceId = vnetSubnetResourceId; + return this; + } + + /** + * Get the vnetTrafficTag property: (internal) Vnet traffic tag. + * + * @return the vnetTrafficTag value. + */ + public Integer vnetTrafficTag() { + return this.vnetTrafficTag; + } + + /** + * Set the vnetTrafficTag property: (internal) Vnet traffic tag. + * + * @param vnetTrafficTag the vnetTrafficTag value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withVnetTrafficTag(Integer vnetTrafficTag) { + this.vnetTrafficTag = vnetTrafficTag; + return this; + } + + /** + * Get the subnetTrafficTag property: (internal) Subnet traffic tag. + * + * @return the subnetTrafficTag value. + */ + public Integer subnetTrafficTag() { + return this.subnetTrafficTag; + } + + /** + * Set the subnetTrafficTag property: (internal) Subnet traffic tag. + * + * @param subnetTrafficTag the subnetTrafficTag value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withSubnetTrafficTag(Integer subnetTrafficTag) { + this.subnetTrafficTag = subnetTrafficTag; + return this; + } + + /** + * Get the action property: Allow or Deny access for this IP range. + * + * @return the action value. + */ + public String action() { + return this.action; + } + + /** + * Set the action property: Allow or Deny access for this IP range. + * + * @param action the action value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withAction(String action) { + this.action = action; + return this; + } + + /** + * Get the tag property: Defines what this IP filter will be used for. This is to support IP filtering on proxies. + * + * @return the tag value. + */ + public IpFilterTag tag() { + return this.tag; + } + + /** + * Set the tag property: Defines what this IP filter will be used for. This is to support IP filtering on proxies. + * + * @param tag the tag value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withTag(IpFilterTag tag) { + this.tag = tag; + return this; + } + + /** + * Get the priority property: Priority of IP restriction rule. + * + * @return the priority value. + */ + public Integer priority() { + return this.priority; + } + + /** + * Set the priority property: Priority of IP restriction rule. + * + * @param priority the priority value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withPriority(Integer priority) { + this.priority = priority; + return this; + } + + /** + * Get the name property: IP restriction rule name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: IP restriction rule name. + * + * @param name the name value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: IP restriction rule description. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: IP restriction rule description. + * + * @param description the description value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the headers property: IP restriction rule headers. X-Forwarded-Host + * (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is .. - + * If the property is null or empty (default), all hosts(or lack of) are allowed. - A value is compared using + * ordinal-ignore-case (excluding port number). - Subdomain wildcards are permitted but don't match the root domain. + * For example, *.contoso.com matches the subdomain foo.contoso.com but not the root domain contoso.com or + * multi-level foo.bar.contoso.com - Unicode host names are allowed but are converted to Punycode for matching. + * + *

X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). The + * matching logic is .. - If the property is null or empty (default), any forwarded-for chains (or lack of) are + * allowed. - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the + * property. + * + *

X-Azure-FDID and X-FD-HealthProbe. The matching logic is exact match. + * + * @return the headers value. + */ + public Map> headers() { + return this.headers; + } + + /** + * Set the headers property: IP restriction rule headers. X-Forwarded-Host + * (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is .. - + * If the property is null or empty (default), all hosts(or lack of) are allowed. - A value is compared using + * ordinal-ignore-case (excluding port number). - Subdomain wildcards are permitted but don't match the root domain. + * For example, *.contoso.com matches the subdomain foo.contoso.com but not the root domain contoso.com or + * multi-level foo.bar.contoso.com - Unicode host names are allowed but are converted to Punycode for matching. + * + *

X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). The + * matching logic is .. - If the property is null or empty (default), any forwarded-for chains (or lack of) are + * allowed. - If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the + * property. + * + *

X-Azure-FDID and X-FD-HealthProbe. The matching logic is exact match. + * + * @param headers the headers value to set. + * @return the IpSecurityRestriction object itself. + */ + public IpSecurityRestriction withHeaders(Map> headers) { + this.headers = headers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IssueType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IssueType.java new file mode 100644 index 0000000000000..cc04f0272406f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/IssueType.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for IssueType. */ +public enum IssueType { + /** Enum value ServiceIncident. */ + SERVICE_INCIDENT("ServiceIncident"), + + /** Enum value AppDeployment. */ + APP_DEPLOYMENT("AppDeployment"), + + /** Enum value AppCrash. */ + APP_CRASH("AppCrash"), + + /** Enum value RuntimeIssueDetected. */ + RUNTIME_ISSUE_DETECTED("RuntimeIssueDetected"), + + /** Enum value AseDeployment. */ + ASE_DEPLOYMENT("AseDeployment"), + + /** Enum value UserIssue. */ + USER_ISSUE("UserIssue"), + + /** Enum value PlatformIssue. */ + PLATFORM_ISSUE("PlatformIssue"), + + /** Enum value Other. */ + OTHER("Other"); + + /** The actual serialized value for a IssueType instance. */ + private final String value; + + IssueType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a IssueType instance. + * + * @param value the serialized value to parse. + * @return the parsed IssueType object, or null if unable to parse. + */ + @JsonCreator + public static IssueType fromString(String value) { + IssueType[] items = IssueType.values(); + for (IssueType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/JwtClaimChecks.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/JwtClaimChecks.java new file mode 100644 index 0000000000000..037e176fc1bff --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/JwtClaimChecks.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the checks that should be made while validating the JWT Claims. */ +@Fluent +public final class JwtClaimChecks { + @JsonIgnore private final ClientLogger logger = new ClientLogger(JwtClaimChecks.class); + + /* + * The list of the allowed groups. + */ + @JsonProperty(value = "allowedGroups") + private List allowedGroups; + + /* + * The list of the allowed client applications. + */ + @JsonProperty(value = "allowedClientApplications") + private List allowedClientApplications; + + /** + * Get the allowedGroups property: The list of the allowed groups. + * + * @return the allowedGroups value. + */ + public List allowedGroups() { + return this.allowedGroups; + } + + /** + * Set the allowedGroups property: The list of the allowed groups. + * + * @param allowedGroups the allowedGroups value to set. + * @return the JwtClaimChecks object itself. + */ + public JwtClaimChecks withAllowedGroups(List allowedGroups) { + this.allowedGroups = allowedGroups; + return this; + } + + /** + * Get the allowedClientApplications property: The list of the allowed client applications. + * + * @return the allowedClientApplications value. + */ + public List allowedClientApplications() { + return this.allowedClientApplications; + } + + /** + * Set the allowedClientApplications property: The list of the allowed client applications. + * + * @param allowedClientApplications the allowedClientApplications value to set. + * @return the JwtClaimChecks object itself. + */ + public JwtClaimChecks withAllowedClientApplications(List allowedClientApplications) { + this.allowedClientApplications = allowedClientApplications; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyInfo.java new file mode 100644 index 0000000000000..041df3e836f39 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyInfo.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.KeyInfoInner; + +/** An immutable client-side representation of KeyInfo. */ +public interface KeyInfo { + /** + * Gets the name property: Key name. + * + * @return the name value. + */ + String name(); + + /** + * Gets the value property: Key value. + * + * @return the value value. + */ + String value(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.KeyInfoInner object. + * + * @return the inner object. + */ + KeyInfoInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyValuePairStringObject.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyValuePairStringObject.java new file mode 100644 index 0000000000000..d2c8b8ce5e188 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyValuePairStringObject.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The KeyValuePairStringObject model. */ +@Immutable +public final class KeyValuePairStringObject { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyValuePairStringObject.class); + + /* + * The key property. + */ + @JsonProperty(value = "key", access = JsonProperty.Access.WRITE_ONLY) + private String key; + + /* + * Any object + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private Object value; + + /** + * Get the key property: The key property. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Get the value property: Any object. + * + * @return the value value. + */ + public Object value() { + return this.value; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyVaultSecretStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyVaultSecretStatus.java new file mode 100644 index 0000000000000..814739ac696c5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KeyVaultSecretStatus.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for KeyVaultSecretStatus. */ +public enum KeyVaultSecretStatus { + /** Enum value Initialized. */ + INITIALIZED("Initialized"), + + /** Enum value WaitingOnCertificateOrder. */ + WAITING_ON_CERTIFICATE_ORDER("WaitingOnCertificateOrder"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value CertificateOrderFailed. */ + CERTIFICATE_ORDER_FAILED("CertificateOrderFailed"), + + /** Enum value OperationNotPermittedOnKeyVault. */ + OPERATION_NOT_PERMITTED_ON_KEY_VAULT("OperationNotPermittedOnKeyVault"), + + /** Enum value AzureServiceUnauthorizedToAccessKeyVault. */ + AZURE_SERVICE_UNAUTHORIZED_TO_ACCESS_KEY_VAULT("AzureServiceUnauthorizedToAccessKeyVault"), + + /** Enum value KeyVaultDoesNotExist. */ + KEY_VAULT_DOES_NOT_EXIST("KeyVaultDoesNotExist"), + + /** Enum value KeyVaultSecretDoesNotExist. */ + KEY_VAULT_SECRET_DOES_NOT_EXIST("KeyVaultSecretDoesNotExist"), + + /** Enum value UnknownError. */ + UNKNOWN_ERROR("UnknownError"), + + /** Enum value ExternalPrivateKey. */ + EXTERNAL_PRIVATE_KEY("ExternalPrivateKey"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a KeyVaultSecretStatus instance. */ + private final String value; + + KeyVaultSecretStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a KeyVaultSecretStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed KeyVaultSecretStatus object, or null if unable to parse. + */ + @JsonCreator + public static KeyVaultSecretStatus fromString(String value) { + KeyVaultSecretStatus[] items = KeyVaultSecretStatus.values(); + for (KeyVaultSecretStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironment.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironment.java new file mode 100644 index 0000000000000..62cd4e64e1b5d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironment.java @@ -0,0 +1,428 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.KubeEnvironmentInner; +import java.util.Map; + +/** An immutable client-side representation of KubeEnvironment. */ +public interface KubeEnvironment { + /** + * 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: Extended Location. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the provisioningState property: Provisioning state of the Kubernetes Environment. + * + * @return the provisioningState value. + */ + KubeEnvironmentProvisioningState provisioningState(); + + /** + * Gets the deploymentErrors property: Any errors that occurred during deployment or deployment validation. + * + * @return the deploymentErrors value. + */ + String deploymentErrors(); + + /** + * Gets the internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @return the internalLoadBalancerEnabled value. + */ + Boolean internalLoadBalancerEnabled(); + + /** + * Gets the defaultDomain property: Default Domain Name for the cluster. + * + * @return the defaultDomain value. + */ + String defaultDomain(); + + /** + * Gets the staticIp property: Static IP of the KubeEnvironment. + * + * @return the staticIp value. + */ + String staticIp(); + + /** + * Gets the environmentType property: Type of Kubernetes Environment. Only supported for Container App Environments + * with value as Managed. + * + * @return the environmentType value. + */ + String environmentType(); + + /** + * Gets the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @return the arcConfiguration value. + */ + ArcConfiguration arcConfiguration(); + + /** + * Gets the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to + * a destination. Currently only "log-analytics" is supported. + * + * @return the appLogsConfiguration value. + */ + AppLogsConfiguration appLogsConfiguration(); + + /** + * Gets the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @return the containerAppsConfiguration value. + */ + ContainerAppsConfiguration containerAppsConfiguration(); + + /** + * Gets the aksResourceId property: The aksResourceID property. + * + * @return the aksResourceId value. + */ + String aksResourceId(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.KubeEnvironmentInner object. + * + * @return the inner object. + */ + KubeEnvironmentInner innerModel(); + + /** The entirety of the KubeEnvironment definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The KubeEnvironment definition stages. */ + interface DefinitionStages { + /** The first stage of the KubeEnvironment definition. */ + interface Blank extends WithLocation { + } + /** The stage of the KubeEnvironment 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 KubeEnvironment definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the KubeEnvironment 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.WithKind, + DefinitionStages.WithInternalLoadBalancerEnabled, + DefinitionStages.WithStaticIp, + DefinitionStages.WithEnvironmentType, + DefinitionStages.WithArcConfiguration, + DefinitionStages.WithAppLogsConfiguration, + DefinitionStages.WithContainerAppsConfiguration, + DefinitionStages.WithAksResourceId { + /** + * Executes the create request. + * + * @return the created resource. + */ + KubeEnvironment create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + KubeEnvironment create(Context context); + } + /** The stage of the KubeEnvironment 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 KubeEnvironment definition allowing to specify extendedLocation. */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: Extended Location.. + * + * @param extendedLocation Extended Location. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + /** The stage of the KubeEnvironment definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the KubeEnvironment definition allowing to specify internalLoadBalancerEnabled. */ + interface WithInternalLoadBalancerEnabled { + /** + * Specifies the internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @param internalLoadBalancerEnabled Only visible within Vnet/Subnet. + * @return the next definition stage. + */ + WithCreate withInternalLoadBalancerEnabled(Boolean internalLoadBalancerEnabled); + } + /** The stage of the KubeEnvironment definition allowing to specify staticIp. */ + interface WithStaticIp { + /** + * Specifies the staticIp property: Static IP of the KubeEnvironment. + * + * @param staticIp Static IP of the KubeEnvironment. + * @return the next definition stage. + */ + WithCreate withStaticIp(String staticIp); + } + /** The stage of the KubeEnvironment definition allowing to specify environmentType. */ + interface WithEnvironmentType { + /** + * Specifies the environmentType property: Type of Kubernetes Environment. Only supported for Container App + * Environments with value as Managed. + * + * @param environmentType Type of Kubernetes Environment. Only supported for Container App Environments with + * value as Managed. + * @return the next definition stage. + */ + WithCreate withEnvironmentType(String environmentType); + } + /** The stage of the KubeEnvironment definition allowing to specify arcConfiguration. */ + interface WithArcConfiguration { + /** + * Specifies the arcConfiguration property: Cluster configuration which determines the ARC cluster + * components types. Eg: Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc.. + * + * @param arcConfiguration Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * @return the next definition stage. + */ + WithCreate withArcConfiguration(ArcConfiguration arcConfiguration); + } + /** The stage of the KubeEnvironment definition allowing to specify appLogsConfiguration. */ + interface WithAppLogsConfiguration { + /** + * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is supported. + * + * @param appLogsConfiguration Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * @return the next definition stage. + */ + WithCreate withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); + } + /** The stage of the KubeEnvironment definition allowing to specify containerAppsConfiguration. */ + interface WithContainerAppsConfiguration { + /** + * Specifies the containerAppsConfiguration property: Cluster configuration for Container Apps Environments + * to configure Dapr Instrumentation Key and VNET Configuration. + * + * @param containerAppsConfiguration Cluster configuration for Container Apps Environments to configure Dapr + * Instrumentation Key and VNET Configuration. + * @return the next definition stage. + */ + WithCreate withContainerAppsConfiguration(ContainerAppsConfiguration containerAppsConfiguration); + } + /** The stage of the KubeEnvironment definition allowing to specify aksResourceId. */ + interface WithAksResourceId { + /** + * Specifies the aksResourceId property: The aksResourceID property.. + * + * @param aksResourceId The aksResourceID property. + * @return the next definition stage. + */ + WithCreate withAksResourceId(String aksResourceId); + } + } + /** + * Begins update for the KubeEnvironment resource. + * + * @return the stage of resource update. + */ + KubeEnvironment.Update update(); + + /** The template for KubeEnvironment update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithArcConfiguration, + UpdateStages.WithAppLogsConfiguration, + UpdateStages.WithContainerAppsConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + KubeEnvironment apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + KubeEnvironment apply(Context context); + } + /** The KubeEnvironment update stages. */ + interface UpdateStages { + /** The stage of the KubeEnvironment update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the KubeEnvironment update allowing to specify arcConfiguration. */ + interface WithArcConfiguration { + /** + * Specifies the arcConfiguration property: Cluster configuration which determines the ARC cluster + * components types. Eg: Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc.. + * + * @param arcConfiguration Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * @return the next definition stage. + */ + Update withArcConfiguration(ArcConfiguration arcConfiguration); + } + /** The stage of the KubeEnvironment update allowing to specify appLogsConfiguration. */ + interface WithAppLogsConfiguration { + /** + * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is supported. + * + * @param appLogsConfiguration Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * @return the next definition stage. + */ + Update withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); + } + /** The stage of the KubeEnvironment update allowing to specify containerAppsConfiguration. */ + interface WithContainerAppsConfiguration { + /** + * Specifies the containerAppsConfiguration property: Cluster configuration for Container Apps Environments + * to configure Dapr Instrumentation Key and VNET Configuration. + * + * @param containerAppsConfiguration Cluster configuration for Container Apps Environments to configure Dapr + * Instrumentation Key and VNET Configuration. + * @return the next definition stage. + */ + Update withContainerAppsConfiguration(ContainerAppsConfiguration containerAppsConfiguration); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + KubeEnvironment refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + KubeEnvironment refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentCollection.java new file mode 100644 index 0000000000000..4540767a8aabe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.KubeEnvironmentInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kubernetes Environments. */ +@Fluent +public final class KubeEnvironmentCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubeEnvironmentCollection.class); + + /* + * 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; + + /** + * 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 KubeEnvironmentCollection object itself. + */ + public KubeEnvironmentCollection 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 KubeEnvironmentCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentPatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentPatchResource.java new file mode 100644 index 0000000000000..99012eb539e4b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentPatchResource.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.KubeEnvironmentPatchResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ARM resource for a KubeEnvironment when patching. */ +@Fluent +public final class KubeEnvironmentPatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubeEnvironmentPatchResource.class); + + /* + * KubeEnvironmentPatchResource resource specific properties + */ + @JsonProperty(value = "properties") + private KubeEnvironmentPatchResourceProperties innerProperties; + + /** + * Get the innerProperties property: KubeEnvironmentPatchResource resource specific properties. + * + * @return the innerProperties value. + */ + private KubeEnvironmentPatchResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public KubeEnvironmentPatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Kubernetes Environment. + * + * @return the provisioningState value. + */ + public KubeEnvironmentProvisioningState 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 internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @return the internalLoadBalancerEnabled value. + */ + public Boolean internalLoadBalancerEnabled() { + return this.innerProperties() == null ? null : this.innerProperties().internalLoadBalancerEnabled(); + } + + /** + * Set the internalLoadBalancerEnabled property: Only visible within Vnet/Subnet. + * + * @param internalLoadBalancerEnabled the internalLoadBalancerEnabled value to set. + * @return the KubeEnvironmentPatchResource object itself. + */ + public KubeEnvironmentPatchResource withInternalLoadBalancerEnabled(Boolean internalLoadBalancerEnabled) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentPatchResourceProperties(); + } + this.innerProperties().withInternalLoadBalancerEnabled(internalLoadBalancerEnabled); + return this; + } + + /** + * 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 KubeEnvironment. + * + * @return the staticIp value. + */ + public String staticIp() { + return this.innerProperties() == null ? null : this.innerProperties().staticIp(); + } + + /** + * Set the staticIp property: Static IP of the KubeEnvironment. + * + * @param staticIp the staticIp value to set. + * @return the KubeEnvironmentPatchResource object itself. + */ + public KubeEnvironmentPatchResource withStaticIp(String staticIp) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentPatchResourceProperties(); + } + this.innerProperties().withStaticIp(staticIp); + return this; + } + + /** + * Get the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @return the arcConfiguration value. + */ + public ArcConfiguration arcConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().arcConfiguration(); + } + + /** + * Set the arcConfiguration property: Cluster configuration which determines the ARC cluster components types. Eg: + * Choosing between BuildService kind, FrontEnd Service ArtifactsStorageType etc. + * + * @param arcConfiguration the arcConfiguration value to set. + * @return the KubeEnvironmentPatchResource object itself. + */ + public KubeEnvironmentPatchResource withArcConfiguration(ArcConfiguration arcConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentPatchResourceProperties(); + } + this.innerProperties().withArcConfiguration(arcConfiguration); + return this; + } + + /** + * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * + * @return the appLogsConfiguration value. + */ + public AppLogsConfiguration appLogsConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().appLogsConfiguration(); + } + + /** + * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a + * destination. Currently only "log-analytics" is supported. + * + * @param appLogsConfiguration the appLogsConfiguration value to set. + * @return the KubeEnvironmentPatchResource object itself. + */ + public KubeEnvironmentPatchResource withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentPatchResourceProperties(); + } + this.innerProperties().withAppLogsConfiguration(appLogsConfiguration); + return this; + } + + /** + * Get the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @return the containerAppsConfiguration value. + */ + public ContainerAppsConfiguration containerAppsConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().containerAppsConfiguration(); + } + + /** + * Set the containerAppsConfiguration property: Cluster configuration for Container Apps Environments to configure + * Dapr Instrumentation Key and VNET Configuration. + * + * @param containerAppsConfiguration the containerAppsConfiguration value to set. + * @return the KubeEnvironmentPatchResource object itself. + */ + public KubeEnvironmentPatchResource withContainerAppsConfiguration( + ContainerAppsConfiguration containerAppsConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentPatchResourceProperties(); + } + this.innerProperties().withContainerAppsConfiguration(containerAppsConfiguration); + return this; + } + + /** + * Get the aksResourceId property: The aksResourceID property. + * + * @return the aksResourceId value. + */ + public String aksResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().aksResourceId(); + } + + /** + * Set the aksResourceId property: The aksResourceID property. + * + * @param aksResourceId the aksResourceId value to set. + * @return the KubeEnvironmentPatchResource object itself. + */ + public KubeEnvironmentPatchResource withAksResourceId(String aksResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new KubeEnvironmentPatchResourceProperties(); + } + this.innerProperties().withAksResourceId(aksResourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentProfile.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentProfile.java new file mode 100644 index 0000000000000..2ad2a6b7e5dbf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentProfile.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Specification for a Kubernetes Environment to use for this resource. */ +@Fluent +public final class KubeEnvironmentProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(KubeEnvironmentProfile.class); + + /* + * Resource ID of the Kubernetes Environment. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name of the Kubernetes Environment. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Resource type of the Kubernetes Environment. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get the id property: Resource ID of the Kubernetes Environment. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource ID of the Kubernetes Environment. + * + * @param id the id value to set. + * @return the KubeEnvironmentProfile object itself. + */ + public KubeEnvironmentProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of the Kubernetes Environment. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Resource type of the Kubernetes Environment. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentProvisioningState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentProvisioningState.java new file mode 100644 index 0000000000000..1d7800cf67f33 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironmentProvisioningState.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for KubeEnvironmentProvisioningState. */ +public enum KubeEnvironmentProvisioningState { + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Canceled. */ + CANCELED("Canceled"), + + /** Enum value Waiting. */ + WAITING("Waiting"), + + /** Enum value InitializationInProgress. */ + INITIALIZATION_IN_PROGRESS("InitializationInProgress"), + + /** Enum value InfrastructureSetupInProgress. */ + INFRASTRUCTURE_SETUP_IN_PROGRESS("InfrastructureSetupInProgress"), + + /** Enum value InfrastructureSetupComplete. */ + INFRASTRUCTURE_SETUP_COMPLETE("InfrastructureSetupComplete"), + + /** Enum value ScheduledForDelete. */ + SCHEDULED_FOR_DELETE("ScheduledForDelete"), + + /** Enum value UpgradeRequested. */ + UPGRADE_REQUESTED("UpgradeRequested"), + + /** Enum value UpgradeFailed. */ + UPGRADE_FAILED("UpgradeFailed"); + + /** The actual serialized value for a KubeEnvironmentProvisioningState instance. */ + private final String value; + + KubeEnvironmentProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a KubeEnvironmentProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed KubeEnvironmentProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static KubeEnvironmentProvisioningState fromString(String value) { + KubeEnvironmentProvisioningState[] items = KubeEnvironmentProvisioningState.values(); + for (KubeEnvironmentProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironments.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironments.java new file mode 100644 index 0000000000000..666a7f911eac2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/KubeEnvironments.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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 KubeEnvironments. */ +public interface KubeEnvironments { + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes Environments. + */ + PagedIterable list(); + + /** + * Description for Get all Kubernetes Environments for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes Environments. + */ + PagedIterable list(Context context); + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes Environments. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Get all the Kubernetes Environments in a resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes Environments. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + KubeEnvironment getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Delete a Kubernetes Environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the Kubernetes Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name, Context context); + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + KubeEnvironment getById(String id); + + /** + * Description for Get the properties of a Kubernetes Environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kubernetes cluster specialized for web workloads by Azure App Service. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Delete a Kubernetes Environment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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); + + /** + * Description for Delete a Kubernetes Environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 KubeEnvironment resource. + * + * @param name resource name. + * @return the first stage of the new KubeEnvironment definition. + */ + KubeEnvironment.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LegacyMicrosoftAccount.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LegacyMicrosoftAccount.java new file mode 100644 index 0000000000000..98c678025b26b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LegacyMicrosoftAccount.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the legacy Microsoft Account provider. */ +@Fluent +public final class LegacyMicrosoftAccount { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LegacyMicrosoftAccount.class); + + /* + * false if the legacy Microsoft Account 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 legacy + * Microsoft Account provider. + */ + @JsonProperty(value = "registration") + private ClientRegistration registration; + + /* + * The configuration settings of the login flow. + */ + @JsonProperty(value = "login") + private LoginScopes login; + + /* + * The configuration settings of the legacy Microsoft Account provider + * token validation flow. + */ + @JsonProperty(value = "validation") + private AllowedAudiencesValidation validation; + + /** + * Get the enabled property: <code>false</code> if the legacy Microsoft Account provider should not be + * enabled despite the set registration; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the legacy Microsoft Account provider should not be + * enabled despite the set registration; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the LegacyMicrosoftAccount object itself. + */ + public LegacyMicrosoftAccount withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the app registration for the legacy Microsoft + * Account provider. + * + * @return the registration value. + */ + public ClientRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the app registration for the legacy Microsoft + * Account provider. + * + * @param registration the registration value to set. + * @return the LegacyMicrosoftAccount object itself. + */ + public LegacyMicrosoftAccount withRegistration(ClientRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Get the login property: The configuration settings of the login flow. + * + * @return the login value. + */ + public LoginScopes login() { + return this.login; + } + + /** + * Set the login property: The configuration settings of the login flow. + * + * @param login the login value to set. + * @return the LegacyMicrosoftAccount object itself. + */ + public LegacyMicrosoftAccount withLogin(LoginScopes login) { + this.login = login; + return this; + } + + /** + * Get the validation property: The configuration settings of the legacy Microsoft Account provider token validation + * flow. + * + * @return the validation value. + */ + public AllowedAudiencesValidation validation() { + return this.validation; + } + + /** + * Set the validation property: The configuration settings of the legacy Microsoft Account provider token validation + * flow. + * + * @param validation the validation value to set. + * @return the LegacyMicrosoftAccount object itself. + */ + public LegacyMicrosoftAccount withValidation(AllowedAudiencesValidation validation) { + this.validation = validation; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + if (login() != null) { + login().validate(); + } + if (validation() != null) { + validation().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LinuxJavaContainerSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LinuxJavaContainerSettings.java new file mode 100644 index 0000000000000..1e4c8fca4f1c4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LinuxJavaContainerSettings.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Linux Java Container settings. */ +@Immutable +public final class LinuxJavaContainerSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LinuxJavaContainerSettings.class); + + /* + * Java 11 version (runtime only). + */ + @JsonProperty(value = "java11Runtime", access = JsonProperty.Access.WRITE_ONLY) + private String java11Runtime; + + /* + * Java 8 version (runtime only). + */ + @JsonProperty(value = "java8Runtime", access = JsonProperty.Access.WRITE_ONLY) + private String java8Runtime; + + /* + * true if the stack is in preview; otherwise, + * false. + */ + @JsonProperty(value = "isPreview", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPreview; + + /* + * true if the stack is deprecated; otherwise, + * false. + */ + @JsonProperty(value = "isDeprecated", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDeprecated; + + /* + * true if the stack should be hidden; otherwise, + * false. + */ + @JsonProperty(value = "isHidden", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isHidden; + + /* + * End-of-life date for the minor version. + */ + @JsonProperty(value = "endOfLifeDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endOfLifeDate; + + /* + * true if the stack version is auto-updated; otherwise, + * false. + */ + @JsonProperty(value = "isAutoUpdate", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isAutoUpdate; + + /* + * true if the minor version is early-access; otherwise, + * false. + */ + @JsonProperty(value = "isEarlyAccess", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEarlyAccess; + + /** + * Get the java11Runtime property: Java 11 version (runtime only). + * + * @return the java11Runtime value. + */ + public String java11Runtime() { + return this.java11Runtime; + } + + /** + * Get the java8Runtime property: Java 8 version (runtime only). + * + * @return the java8Runtime value. + */ + public String java8Runtime() { + return this.java8Runtime; + } + + /** + * Get the isPreview property: <code>true</code> if the stack is in preview; otherwise, + * <code>false</code>. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Get the isDeprecated property: <code>true</code> if the stack is deprecated; otherwise, + * <code>false</code>. + * + * @return the isDeprecated value. + */ + public Boolean isDeprecated() { + return this.isDeprecated; + } + + /** + * Get the isHidden property: <code>true</code> if the stack should be hidden; otherwise, + * <code>false</code>. + * + * @return the isHidden value. + */ + public Boolean isHidden() { + return this.isHidden; + } + + /** + * Get the endOfLifeDate property: End-of-life date for the minor version. + * + * @return the endOfLifeDate value. + */ + public OffsetDateTime endOfLifeDate() { + return this.endOfLifeDate; + } + + /** + * Get the isAutoUpdate property: <code>true</code> if the stack version is auto-updated; otherwise, + * <code>false</code>. + * + * @return the isAutoUpdate value. + */ + public Boolean isAutoUpdate() { + return this.isAutoUpdate; + } + + /** + * Get the isEarlyAccess property: <code>true</code> if the minor version is early-access; otherwise, + * <code>false</code>. + * + * @return the isEarlyAccess value. + */ + public Boolean isEarlyAccess() { + return this.isEarlyAccess; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoadBalancingMode.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoadBalancingMode.java new file mode 100644 index 0000000000000..574ebefb03c8a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoadBalancingMode.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for LoadBalancingMode. */ +public final class LoadBalancingMode extends ExpandableStringEnum { + /** Static value None for LoadBalancingMode. */ + public static final LoadBalancingMode NONE = fromString("None"); + + /** Static value Web for LoadBalancingMode. */ + public static final LoadBalancingMode WEB = fromString("Web"); + + /** Static value Publishing for LoadBalancingMode. */ + public static final LoadBalancingMode PUBLISHING = fromString("Publishing"); + + /** Static value Web, Publishing for LoadBalancingMode. */ + public static final LoadBalancingMode WEB_PUBLISHING = fromString("Web, Publishing"); + + /** + * Creates or finds a LoadBalancingMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding LoadBalancingMode. + */ + @JsonCreator + public static LoadBalancingMode fromString(String name) { + return fromString(name, LoadBalancingMode.class); + } + + /** @return known LoadBalancingMode values. */ + public static Collection values() { + return values(LoadBalancingMode.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LocalizableString.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LocalizableString.java new file mode 100644 index 0000000000000..44f65f1e4a7bf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LocalizableString.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Localizable string object containing the name and a localized value. */ +@Fluent +public final class LocalizableString { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LocalizableString.class); + + /* + * Non-localized name. + */ + @JsonProperty(value = "value") + private String value; + + /* + * Localized name. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * Get the value property: Non-localized name. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Non-localized name. + * + * @param value the value value to set. + * @return the LocalizableString object itself. + */ + public LocalizableString withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the localizedValue property: Localized name. + * + * @return the localizedValue value. + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localizedValue property: Localized name. + * + * @param localizedValue the localizedValue value to set. + * @return the LocalizableString object itself. + */ + public LocalizableString withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogAnalyticsConfiguration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogAnalyticsConfiguration.java new file mode 100644 index 0000000000000..1d3e9b5fa9637 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogAnalyticsConfiguration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The LogAnalyticsConfiguration model. */ +@Fluent +public final class LogAnalyticsConfiguration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LogAnalyticsConfiguration.class); + + /* + * The customerId property. + */ + @JsonProperty(value = "customerId") + private String customerId; + + /* + * The sharedKey property. + */ + @JsonProperty(value = "sharedKey") + private String sharedKey; + + /** + * Get the customerId property: The customerId property. + * + * @return the customerId value. + */ + public String customerId() { + return this.customerId; + } + + /** + * Set the customerId property: The customerId property. + * + * @param customerId the customerId value to set. + * @return the LogAnalyticsConfiguration object itself. + */ + public LogAnalyticsConfiguration withCustomerId(String customerId) { + this.customerId = customerId; + return this; + } + + /** + * Get the sharedKey property: The sharedKey property. + * + * @return the sharedKey value. + */ + public String sharedKey() { + return this.sharedKey; + } + + /** + * Set the sharedKey property: The sharedKey property. + * + * @param sharedKey the sharedKey value to set. + * @return the LogAnalyticsConfiguration object itself. + */ + public LogAnalyticsConfiguration withSharedKey(String sharedKey) { + this.sharedKey = sharedKey; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogLevel.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogLevel.java new file mode 100644 index 0000000000000..c0804c86dcfb0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogLevel.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for LogLevel. */ +public enum LogLevel { + /** Enum value Off. */ + OFF("Off"), + + /** Enum value Verbose. */ + VERBOSE("Verbose"), + + /** Enum value Information. */ + INFORMATION("Information"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a LogLevel instance. */ + private final String value; + + LogLevel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a LogLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed LogLevel object, or null if unable to parse. + */ + @JsonCreator + public static LogLevel fromString(String value) { + LogLevel[] items = LogLevel.values(); + for (LogLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogSpecification.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogSpecification.java new file mode 100644 index 0000000000000..f2cfab089fce6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LogSpecification.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Log Definition of a single resource metric. */ +@Fluent +public final class LogSpecification { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LogSpecification.class); + + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The displayName property. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The blobDuration property. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /* + * The logFilterPattern property. + */ + @JsonProperty(value = "logFilterPattern") + private String logFilterPattern; + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the LogSpecification object itself. + */ + public LogSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName property: The displayName property. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The displayName property. + * + * @param displayName the displayName value to set. + * @return the LogSpecification object itself. + */ + public LogSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the blobDuration property: The blobDuration property. + * + * @return the blobDuration value. + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set the blobDuration property: The blobDuration property. + * + * @param blobDuration the blobDuration value to set. + * @return the LogSpecification object itself. + */ + public LogSpecification withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + + /** + * Get the logFilterPattern property: The logFilterPattern property. + * + * @return the logFilterPattern value. + */ + public String logFilterPattern() { + return this.logFilterPattern; + } + + /** + * Set the logFilterPattern property: The logFilterPattern property. + * + * @param logFilterPattern the logFilterPattern value to set. + * @return the LogSpecification object itself. + */ + public LogSpecification withLogFilterPattern(String logFilterPattern) { + this.logFilterPattern = logFilterPattern; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Login.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Login.java new file mode 100644 index 0000000000000..1761121c74470 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Login.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the login flow of users using App Service Authentication/Authorization. */ +@Fluent +public final class Login { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Login.class); + + /* + * The routes that specify the endpoints used for login and logout + * requests. + */ + @JsonProperty(value = "routes") + private LoginRoutes routes; + + /* + * The configuration settings of the token store. + */ + @JsonProperty(value = "tokenStore") + private TokenStore tokenStore; + + /* + * true if the fragments from the request are preserved after + * the login request is made; otherwise, false. + */ + @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. + * Note that URLs within the current domain are always implicitly allowed. + */ + @JsonProperty(value = "allowedExternalRedirectUrls") + private List allowedExternalRedirectUrls; + + /* + * The configuration settings of the session cookie's expiration. + */ + @JsonProperty(value = "cookieExpiration") + private CookieExpiration cookieExpiration; + + /* + * The configuration settings of the nonce used in the login flow. + */ + @JsonProperty(value = "nonce") + private Nonce nonce; + + /** + * Get the routes property: The routes that specify the endpoints used for login and logout requests. + * + * @return the routes value. + */ + public LoginRoutes routes() { + return this.routes; + } + + /** + * Set the routes property: The routes that specify the endpoints used for login and logout requests. + * + * @param routes the routes value to set. + * @return the Login object itself. + */ + public Login withRoutes(LoginRoutes routes) { + this.routes = routes; + return this; + } + + /** + * Get the tokenStore property: The configuration settings of the token store. + * + * @return the tokenStore value. + */ + public TokenStore tokenStore() { + return this.tokenStore; + } + + /** + * Set the tokenStore property: The configuration settings of the token store. + * + * @param tokenStore the tokenStore value to set. + * @return the Login object itself. + */ + public Login withTokenStore(TokenStore tokenStore) { + this.tokenStore = tokenStore; + return this; + } + + /** + * Get the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request + * are preserved after the login request is made; otherwise, <code>false</code>. + * + * @return the preserveUrlFragmentsForLogins value. + */ + public Boolean preserveUrlFragmentsForLogins() { + return this.preserveUrlFragmentsForLogins; + } + + /** + * Set the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request + * are preserved after the login request is made; otherwise, <code>false</code>. + * + * @param preserveUrlFragmentsForLogins the preserveUrlFragmentsForLogins value to set. + * @return the Login object itself. + */ + public Login withPreserveUrlFragmentsForLogins(Boolean preserveUrlFragmentsForLogins) { + this.preserveUrlFragmentsForLogins = preserveUrlFragmentsForLogins; + return this; + } + + /** + * Get the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or + * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting + * typically only needed by Windows Store application backends. Note that URLs within the current domain are always + * implicitly allowed. + * + * @return the allowedExternalRedirectUrls value. + */ + public List allowedExternalRedirectUrls() { + return this.allowedExternalRedirectUrls; + } + + /** + * Set the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or + * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting + * typically only needed by Windows Store application backends. Note that URLs within the current domain are always + * implicitly allowed. + * + * @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set. + * @return the Login object itself. + */ + public Login withAllowedExternalRedirectUrls(List allowedExternalRedirectUrls) { + this.allowedExternalRedirectUrls = allowedExternalRedirectUrls; + return this; + } + + /** + * Get the cookieExpiration property: The configuration settings of the session cookie's expiration. + * + * @return the cookieExpiration value. + */ + public CookieExpiration cookieExpiration() { + return this.cookieExpiration; + } + + /** + * Set the cookieExpiration property: The configuration settings of the session cookie's expiration. + * + * @param cookieExpiration the cookieExpiration value to set. + * @return the Login object itself. + */ + public Login withCookieExpiration(CookieExpiration cookieExpiration) { + this.cookieExpiration = cookieExpiration; + return this; + } + + /** + * Get the nonce property: The configuration settings of the nonce used in the login flow. + * + * @return the nonce value. + */ + public Nonce nonce() { + return this.nonce; + } + + /** + * Set the nonce property: The configuration settings of the nonce used in the login flow. + * + * @param nonce the nonce value to set. + * @return the Login object itself. + */ + public Login withNonce(Nonce nonce) { + this.nonce = nonce; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (routes() != null) { + routes().validate(); + } + if (tokenStore() != null) { + tokenStore().validate(); + } + if (cookieExpiration() != null) { + cookieExpiration().validate(); + } + if (nonce() != null) { + nonce().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoginRoutes.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoginRoutes.java new file mode 100644 index 0000000000000..5b495c82acc5c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoginRoutes.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The routes that specify the endpoints used for login and logout requests. */ +@Fluent +public final class LoginRoutes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LoginRoutes.class); + + /* + * The endpoint at which a logout request should be made. + */ + @JsonProperty(value = "logoutEndpoint") + private String logoutEndpoint; + + /** + * Get the logoutEndpoint property: The endpoint at which a logout request should be made. + * + * @return the logoutEndpoint value. + */ + public String logoutEndpoint() { + return this.logoutEndpoint; + } + + /** + * Set the logoutEndpoint property: The endpoint at which a logout request should be made. + * + * @param logoutEndpoint the logoutEndpoint value to set. + * @return the LoginRoutes object itself. + */ + public LoginRoutes withLogoutEndpoint(String logoutEndpoint) { + this.logoutEndpoint = logoutEndpoint; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoginScopes.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoginScopes.java new file mode 100644 index 0000000000000..e03ad7348e673 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/LoginScopes.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the login flow, including the scopes that should be requested. */ +@Fluent +public final class LoginScopes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LoginScopes.class); + + /* + * A list of the scopes that should be requested while authenticating. + */ + @JsonProperty(value = "scopes") + private List scopes; + + /** + * Get the scopes property: A list of the scopes that should be requested while authenticating. + * + * @return the scopes value. + */ + public List scopes() { + return this.scopes; + } + + /** + * Set the scopes property: A list of the scopes that should be requested while authenticating. + * + * @param scopes the scopes value to set. + * @return the LoginScopes object itself. + */ + public LoginScopes withScopes(List scopes) { + this.scopes = scopes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeploy.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeploy.java new file mode 100644 index 0000000000000..a4c2654ee5451 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeploy.java @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** MSDeploy ARM PUT information. */ +@Fluent +public final class MSDeploy extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MSDeploy.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private MSDeployProperties innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private MSDeployProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public MSDeploy withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the addOnPackages property: List of Add-On packages. Add-On packages implicitly enable the Do Not Delete + * MSDeploy rule. + * + * @return the addOnPackages value. + */ + public List addOnPackages() { + return this.innerProperties() == null ? null : this.innerProperties().addOnPackages(); + } + + /** + * Set the addOnPackages property: List of Add-On packages. Add-On packages implicitly enable the Do Not Delete + * MSDeploy rule. + * + * @param addOnPackages the addOnPackages value to set. + * @return the MSDeploy object itself. + */ + public MSDeploy withAddOnPackages(List addOnPackages) { + if (this.innerProperties() == null) { + this.innerProperties = new MSDeployProperties(); + } + this.innerProperties().withAddOnPackages(addOnPackages); + return this; + } + + /** + * Get the packageUri property: Package URI. + * + * @return the packageUri value. + */ + public String packageUri() { + return this.innerProperties() == null ? null : this.innerProperties().packageUri(); + } + + /** + * Set the packageUri property: Package URI. + * + * @param packageUri the packageUri value to set. + * @return the MSDeploy object itself. + */ + public MSDeploy withPackageUri(String packageUri) { + if (this.innerProperties() == null) { + this.innerProperties = new MSDeployProperties(); + } + this.innerProperties().withPackageUri(packageUri); + return this; + } + + /** + * Get the connectionString property: SQL Connection String. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.innerProperties() == null ? null : this.innerProperties().connectionString(); + } + + /** + * Set the connectionString property: SQL Connection String. + * + * @param connectionString the connectionString value to set. + * @return the MSDeploy object itself. + */ + public MSDeploy withConnectionString(String connectionString) { + if (this.innerProperties() == null) { + this.innerProperties = new MSDeployProperties(); + } + this.innerProperties().withConnectionString(connectionString); + return this; + } + + /** + * Get the dbType property: Database Type. + * + * @return the dbType value. + */ + public String dbType() { + return this.innerProperties() == null ? null : this.innerProperties().dbType(); + } + + /** + * Set the dbType property: Database Type. + * + * @param dbType the dbType value to set. + * @return the MSDeploy object itself. + */ + public MSDeploy withDbType(String dbType) { + if (this.innerProperties() == null) { + this.innerProperties = new MSDeployProperties(); + } + this.innerProperties().withDbType(dbType); + return this; + } + + /** + * Get the setParametersXmlFileUri property: URI of MSDeploy Parameters file. Must not be set if SetParameters is + * used. + * + * @return the setParametersXmlFileUri value. + */ + public String setParametersXmlFileUri() { + return this.innerProperties() == null ? null : this.innerProperties().setParametersXmlFileUri(); + } + + /** + * Set the setParametersXmlFileUri property: URI of MSDeploy Parameters file. Must not be set if SetParameters is + * used. + * + * @param setParametersXmlFileUri the setParametersXmlFileUri value to set. + * @return the MSDeploy object itself. + */ + public MSDeploy withSetParametersXmlFileUri(String setParametersXmlFileUri) { + if (this.innerProperties() == null) { + this.innerProperties = new MSDeployProperties(); + } + this.innerProperties().withSetParametersXmlFileUri(setParametersXmlFileUri); + return this; + } + + /** + * Get the setParameters property: MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + * + * @return the setParameters value. + */ + public Map setParameters() { + return this.innerProperties() == null ? null : this.innerProperties().setParameters(); + } + + /** + * Set the setParameters property: MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + * + * @param setParameters the setParameters value to set. + * @return the MSDeploy object itself. + */ + public MSDeploy withSetParameters(Map setParameters) { + if (this.innerProperties() == null) { + this.innerProperties = new MSDeployProperties(); + } + this.innerProperties().withSetParameters(setParameters); + return this; + } + + /** + * Get the skipAppData property: Controls whether the MSDeploy operation skips the App_Data directory. If set to + * <code>true</code>, the existing App_Data directory on the destination will not be deleted, and any + * App_Data directory in the source will be ignored. Setting is <code>false</code> by default. + * + * @return the skipAppData value. + */ + public Boolean skipAppData() { + return this.innerProperties() == null ? null : this.innerProperties().skipAppData(); + } + + /** + * Set the skipAppData property: Controls whether the MSDeploy operation skips the App_Data directory. If set to + * <code>true</code>, the existing App_Data directory on the destination will not be deleted, and any + * App_Data directory in the source will be ignored. Setting is <code>false</code> by default. + * + * @param skipAppData the skipAppData value to set. + * @return the MSDeploy object itself. + */ + public MSDeploy withSkipAppData(Boolean skipAppData) { + if (this.innerProperties() == null) { + this.innerProperties = new MSDeployProperties(); + } + this.innerProperties().withSkipAppData(skipAppData); + return this; + } + + /** + * Get the appOffline property: Sets the AppOffline rule while the MSDeploy operation executes. Setting is + * <code>false</code> by default. + * + * @return the appOffline value. + */ + public Boolean appOffline() { + return this.innerProperties() == null ? null : this.innerProperties().appOffline(); + } + + /** + * Set the appOffline property: Sets the AppOffline rule while the MSDeploy operation executes. Setting is + * <code>false</code> by default. + * + * @param appOffline the appOffline value to set. + * @return the MSDeploy object itself. + */ + public MSDeploy withAppOffline(Boolean appOffline) { + if (this.innerProperties() == null) { + this.innerProperties = new MSDeployProperties(); + } + this.innerProperties().withAppOffline(appOffline); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployCore.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployCore.java new file mode 100644 index 0000000000000..0675ba88c19ee --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployCore.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** MSDeploy ARM PUT core information. */ +@Fluent +public class MSDeployCore { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MSDeployCore.class); + + /* + * Package URI + */ + @JsonProperty(value = "packageUri") + private String packageUri; + + /* + * SQL Connection String + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /* + * Database Type + */ + @JsonProperty(value = "dbType") + private String dbType; + + /* + * URI of MSDeploy Parameters file. Must not be set if SetParameters is + * used. + */ + @JsonProperty(value = "setParametersXmlFileUri") + private String setParametersXmlFileUri; + + /* + * MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + */ + @JsonProperty(value = "setParameters") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map setParameters; + + /* + * Controls whether the MSDeploy operation skips the App_Data directory. + * If set to true, the existing App_Data directory on the + * destination + * will not be deleted, and any App_Data directory in the source will be + * ignored. + * Setting is false by default. + */ + @JsonProperty(value = "skipAppData") + private Boolean skipAppData; + + /* + * Sets the AppOffline rule while the MSDeploy operation executes. + * Setting is false by default. + */ + @JsonProperty(value = "appOffline") + private Boolean appOffline; + + /** + * Get the packageUri property: Package URI. + * + * @return the packageUri value. + */ + public String packageUri() { + return this.packageUri; + } + + /** + * Set the packageUri property: Package URI. + * + * @param packageUri the packageUri value to set. + * @return the MSDeployCore object itself. + */ + public MSDeployCore withPackageUri(String packageUri) { + this.packageUri = packageUri; + return this; + } + + /** + * Get the connectionString property: SQL Connection String. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString property: SQL Connection String. + * + * @param connectionString the connectionString value to set. + * @return the MSDeployCore object itself. + */ + public MSDeployCore withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Get the dbType property: Database Type. + * + * @return the dbType value. + */ + public String dbType() { + return this.dbType; + } + + /** + * Set the dbType property: Database Type. + * + * @param dbType the dbType value to set. + * @return the MSDeployCore object itself. + */ + public MSDeployCore withDbType(String dbType) { + this.dbType = dbType; + return this; + } + + /** + * Get the setParametersXmlFileUri property: URI of MSDeploy Parameters file. Must not be set if SetParameters is + * used. + * + * @return the setParametersXmlFileUri value. + */ + public String setParametersXmlFileUri() { + return this.setParametersXmlFileUri; + } + + /** + * Set the setParametersXmlFileUri property: URI of MSDeploy Parameters file. Must not be set if SetParameters is + * used. + * + * @param setParametersXmlFileUri the setParametersXmlFileUri value to set. + * @return the MSDeployCore object itself. + */ + public MSDeployCore withSetParametersXmlFileUri(String setParametersXmlFileUri) { + this.setParametersXmlFileUri = setParametersXmlFileUri; + return this; + } + + /** + * Get the setParameters property: MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + * + * @return the setParameters value. + */ + public Map setParameters() { + return this.setParameters; + } + + /** + * Set the setParameters property: MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. + * + * @param setParameters the setParameters value to set. + * @return the MSDeployCore object itself. + */ + public MSDeployCore withSetParameters(Map setParameters) { + this.setParameters = setParameters; + return this; + } + + /** + * Get the skipAppData property: Controls whether the MSDeploy operation skips the App_Data directory. If set to + * <code>true</code>, the existing App_Data directory on the destination will not be deleted, and any + * App_Data directory in the source will be ignored. Setting is <code>false</code> by default. + * + * @return the skipAppData value. + */ + public Boolean skipAppData() { + return this.skipAppData; + } + + /** + * Set the skipAppData property: Controls whether the MSDeploy operation skips the App_Data directory. If set to + * <code>true</code>, the existing App_Data directory on the destination will not be deleted, and any + * App_Data directory in the source will be ignored. Setting is <code>false</code> by default. + * + * @param skipAppData the skipAppData value to set. + * @return the MSDeployCore object itself. + */ + public MSDeployCore withSkipAppData(Boolean skipAppData) { + this.skipAppData = skipAppData; + return this; + } + + /** + * Get the appOffline property: Sets the AppOffline rule while the MSDeploy operation executes. Setting is + * <code>false</code> by default. + * + * @return the appOffline value. + */ + public Boolean appOffline() { + return this.appOffline; + } + + /** + * Set the appOffline property: Sets the AppOffline rule while the MSDeploy operation executes. Setting is + * <code>false</code> by default. + * + * @param appOffline the appOffline value to set. + * @return the MSDeployCore object itself. + */ + public MSDeployCore withAppOffline(Boolean appOffline) { + this.appOffline = appOffline; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLog.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLog.java new file mode 100644 index 0000000000000..adc8169151e4b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLog.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployLogInner; +import java.util.List; + +/** An immutable client-side representation of MSDeployLog. */ +public interface MSDeployLog { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the entries property: List of log entry messages. + * + * @return the entries value. + */ + List entries(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployLogInner object. + * + * @return the inner object. + */ + MSDeployLogInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLogEntry.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLogEntry.java new file mode 100644 index 0000000000000..8c7a5f5b0a40b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLogEntry.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** MSDeploy log entry. */ +@Immutable +public final class MSDeployLogEntry { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MSDeployLogEntry.class); + + /* + * Timestamp of log entry + */ + @JsonProperty(value = "time", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime time; + + /* + * Log entry type + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private MSDeployLogEntryType type; + + /* + * Log entry message + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** + * Get the time property: Timestamp of log entry. + * + * @return the time value. + */ + public OffsetDateTime time() { + return this.time; + } + + /** + * Get the type property: Log entry type. + * + * @return the type value. + */ + public MSDeployLogEntryType type() { + return this.type; + } + + /** + * Get the message property: Log entry message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLogEntryType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLogEntryType.java new file mode 100644 index 0000000000000..444c94bf61053 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployLogEntryType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for MSDeployLogEntryType. */ +public enum MSDeployLogEntryType { + /** Enum value Message. */ + MESSAGE("Message"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a MSDeployLogEntryType instance. */ + private final String value; + + MSDeployLogEntryType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MSDeployLogEntryType instance. + * + * @param value the serialized value to parse. + * @return the parsed MSDeployLogEntryType object, or null if unable to parse. + */ + @JsonCreator + public static MSDeployLogEntryType fromString(String value) { + MSDeployLogEntryType[] items = MSDeployLogEntryType.values(); + for (MSDeployLogEntryType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployProvisioningState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployProvisioningState.java new file mode 100644 index 0000000000000..5896182a6feaa --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployProvisioningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for MSDeployProvisioningState. */ +public enum MSDeployProvisioningState { + /** Enum value accepted. */ + ACCEPTED("accepted"), + + /** Enum value running. */ + RUNNING("running"), + + /** Enum value succeeded. */ + SUCCEEDED("succeeded"), + + /** Enum value failed. */ + FAILED("failed"), + + /** Enum value canceled. */ + CANCELED("canceled"); + + /** The actual serialized value for a MSDeployProvisioningState instance. */ + private final String value; + + MSDeployProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MSDeployProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed MSDeployProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static MSDeployProvisioningState fromString(String value) { + MSDeployProvisioningState[] items = MSDeployProvisioningState.values(); + for (MSDeployProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployStatus.java new file mode 100644 index 0000000000000..553380b6d088e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MSDeployStatus.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployStatusInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of MSDeployStatus. */ +public interface MSDeployStatus { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the deployer property: Username of deployer. + * + * @return the deployer value. + */ + String deployer(); + + /** + * Gets the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + MSDeployProvisioningState provisioningState(); + + /** + * Gets the startTime property: Start time of deploy operation. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: End time of deploy operation. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the complete property: Whether the deployment operation has completed. + * + * @return the complete value. + */ + Boolean complete(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.MSDeployStatusInner object. + * + * @return the inner object. + */ + MSDeployStatusInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedPipelineMode.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedPipelineMode.java new file mode 100644 index 0000000000000..10ad026f27ba1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedPipelineMode.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ManagedPipelineMode. */ +public enum ManagedPipelineMode { + /** Enum value Integrated. */ + INTEGRATED("Integrated"), + + /** Enum value Classic. */ + CLASSIC("Classic"); + + /** The actual serialized value for a ManagedPipelineMode instance. */ + private final String value; + + ManagedPipelineMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ManagedPipelineMode instance. + * + * @param value the serialized value to parse. + * @return the parsed ManagedPipelineMode object, or null if unable to parse. + */ + @JsonCreator + public static ManagedPipelineMode fromString(String value) { + ManagedPipelineMode[] items = ManagedPipelineMode.values(); + for (ManagedPipelineMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedServiceIdentity.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedServiceIdentity.java new file mode 100644 index 0000000000000..d1c9b2f0b2bda --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedServiceIdentity.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** Managed service identity. */ +@Fluent +public class ManagedServiceIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedServiceIdentity.class); + + /* + * Type of managed service identity. + */ + @JsonProperty(value = "type") + private ManagedServiceIdentityType type; + + /* + * Tenant of managed service identity. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /* + * Principal Id of managed service identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The list of user assigned identities associated with the resource. The + * user identity dictionary key references will be ARM resource ids in the + * form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} + */ + @JsonProperty(value = "userAssignedIdentities") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map userAssignedIdentities; + + /** + * Get the type property: Type of managed service identity. + * + * @return the type value. + */ + public ManagedServiceIdentityType type() { + return this.type; + } + + /** + * Set the type property: Type of managed service identity. + * + * @param type the type value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { + this.type = type; + return this; + } + + /** + * Get the tenantId property: Tenant of managed service identity. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the principalId property: Principal Id of managed service identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the userAssignedIdentities property: The list of user assigned identities associated with the resource. The + * user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * + * @return the userAssignedIdentities value. + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * Set the userAssignedIdentities property: The list of user assigned identities associated with the resource. The + * user identity dictionary key references will be ARM resource ids in the form: + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * + * @param userAssignedIdentities the userAssignedIdentities value to set. + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (userAssignedIdentities() != null) { + userAssignedIdentities() + .values() + .forEach( + e -> { + if (e != null) { + e.validate(); + } + }); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedServiceIdentityType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedServiceIdentityType.java new file mode 100644 index 0000000000000..18e283c05cff5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ManagedServiceIdentityType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ManagedServiceIdentityType. */ +public enum ManagedServiceIdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"), + + /** Enum value UserAssigned. */ + USER_ASSIGNED("UserAssigned"), + + /** Enum value SystemAssigned, UserAssigned. */ + SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a ManagedServiceIdentityType instance. */ + private final String value; + + ManagedServiceIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ManagedServiceIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed ManagedServiceIdentityType object, or null if unable to parse. + */ + @JsonCreator + public static ManagedServiceIdentityType fromString(String value) { + ManagedServiceIdentityType[] items = ManagedServiceIdentityType.values(); + for (ManagedServiceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MetricAvailability.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MetricAvailability.java new file mode 100644 index 0000000000000..73fe0e3c60e49 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MetricAvailability.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Retention policy of a resource metric. */ +@Fluent +public final class MetricAvailability { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricAvailability.class); + + /* + * The timeGrain property. + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /* + * The blobDuration property. + */ + @JsonProperty(value = "blobDuration") + private String blobDuration; + + /** + * Get the timeGrain property: The timeGrain property. + * + * @return the timeGrain value. + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Set the timeGrain property: The timeGrain property. + * + * @param timeGrain the timeGrain value to set. + * @return the MetricAvailability object itself. + */ + public MetricAvailability withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get the blobDuration property: The blobDuration property. + * + * @return the blobDuration value. + */ + public String blobDuration() { + return this.blobDuration; + } + + /** + * Set the blobDuration property: The blobDuration property. + * + * @param blobDuration the blobDuration value to set. + * @return the MetricAvailability object itself. + */ + public MetricAvailability withBlobDuration(String blobDuration) { + this.blobDuration = blobDuration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MetricSpecification.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MetricSpecification.java new file mode 100644 index 0000000000000..0d704a280b33f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MetricSpecification.java @@ -0,0 +1,473 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Definition of a single resource metric. */ +@Fluent +public final class MetricSpecification { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MetricSpecification.class); + + /* + * The name property. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The displayName property. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * The displayDescription property. + */ + @JsonProperty(value = "displayDescription") + private String displayDescription; + + /* + * The unit property. + */ + @JsonProperty(value = "unit") + private String unit; + + /* + * The aggregationType property. + */ + @JsonProperty(value = "aggregationType") + private String aggregationType; + + /* + * The supportsInstanceLevelAggregation property. + */ + @JsonProperty(value = "supportsInstanceLevelAggregation") + private Boolean supportsInstanceLevelAggregation; + + /* + * The enableRegionalMdmAccount property. + */ + @JsonProperty(value = "enableRegionalMdmAccount") + private Boolean enableRegionalMdmAccount; + + /* + * The sourceMdmAccount property. + */ + @JsonProperty(value = "sourceMdmAccount") + private String sourceMdmAccount; + + /* + * The sourceMdmNamespace property. + */ + @JsonProperty(value = "sourceMdmNamespace") + private String sourceMdmNamespace; + + /* + * The metricFilterPattern property. + */ + @JsonProperty(value = "metricFilterPattern") + private String metricFilterPattern; + + /* + * The fillGapWithZero property. + */ + @JsonProperty(value = "fillGapWithZero") + private Boolean fillGapWithZero; + + /* + * The isInternal property. + */ + @JsonProperty(value = "isInternal") + private Boolean isInternal; + + /* + * The dimensions property. + */ + @JsonProperty(value = "dimensions") + private List dimensions; + + /* + * The category property. + */ + @JsonProperty(value = "category") + private String category; + + /* + * The availabilities property. + */ + @JsonProperty(value = "availabilities") + private List availabilities; + + /* + * The supportedTimeGrainTypes property. + */ + @JsonProperty(value = "supportedTimeGrainTypes") + private List supportedTimeGrainTypes; + + /* + * The supportedAggregationTypes property. + */ + @JsonProperty(value = "supportedAggregationTypes") + private List supportedAggregationTypes; + + /** + * Get the name property: The name property. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name property. + * + * @param name the name value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withName(String name) { + this.name = name; + return this; + } + + /** + * Get the displayName property: The displayName property. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The displayName property. + * + * @param displayName the displayName value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the displayDescription property: The displayDescription property. + * + * @return the displayDescription value. + */ + public String displayDescription() { + return this.displayDescription; + } + + /** + * Set the displayDescription property: The displayDescription property. + * + * @param displayDescription the displayDescription value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDisplayDescription(String displayDescription) { + this.displayDescription = displayDescription; + return this; + } + + /** + * Get the unit property: The unit property. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit property: The unit property. + * + * @param unit the unit value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the aggregationType property: The aggregationType property. + * + * @return the aggregationType value. + */ + public String aggregationType() { + return this.aggregationType; + } + + /** + * Set the aggregationType property: The aggregationType property. + * + * @param aggregationType the aggregationType value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAggregationType(String aggregationType) { + this.aggregationType = aggregationType; + return this; + } + + /** + * Get the supportsInstanceLevelAggregation property: The supportsInstanceLevelAggregation property. + * + * @return the supportsInstanceLevelAggregation value. + */ + public Boolean supportsInstanceLevelAggregation() { + return this.supportsInstanceLevelAggregation; + } + + /** + * Set the supportsInstanceLevelAggregation property: The supportsInstanceLevelAggregation property. + * + * @param supportsInstanceLevelAggregation the supportsInstanceLevelAggregation value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportsInstanceLevelAggregation(Boolean supportsInstanceLevelAggregation) { + this.supportsInstanceLevelAggregation = supportsInstanceLevelAggregation; + return this; + } + + /** + * Get the enableRegionalMdmAccount property: The enableRegionalMdmAccount property. + * + * @return the enableRegionalMdmAccount value. + */ + public Boolean enableRegionalMdmAccount() { + return this.enableRegionalMdmAccount; + } + + /** + * Set the enableRegionalMdmAccount property: The enableRegionalMdmAccount property. + * + * @param enableRegionalMdmAccount the enableRegionalMdmAccount value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withEnableRegionalMdmAccount(Boolean enableRegionalMdmAccount) { + this.enableRegionalMdmAccount = enableRegionalMdmAccount; + return this; + } + + /** + * Get the sourceMdmAccount property: The sourceMdmAccount property. + * + * @return the sourceMdmAccount value. + */ + public String sourceMdmAccount() { + return this.sourceMdmAccount; + } + + /** + * Set the sourceMdmAccount property: The sourceMdmAccount property. + * + * @param sourceMdmAccount the sourceMdmAccount value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmAccount(String sourceMdmAccount) { + this.sourceMdmAccount = sourceMdmAccount; + return this; + } + + /** + * Get the sourceMdmNamespace property: The sourceMdmNamespace property. + * + * @return the sourceMdmNamespace value. + */ + public String sourceMdmNamespace() { + return this.sourceMdmNamespace; + } + + /** + * Set the sourceMdmNamespace property: The sourceMdmNamespace property. + * + * @param sourceMdmNamespace the sourceMdmNamespace value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSourceMdmNamespace(String sourceMdmNamespace) { + this.sourceMdmNamespace = sourceMdmNamespace; + return this; + } + + /** + * Get the metricFilterPattern property: The metricFilterPattern property. + * + * @return the metricFilterPattern value. + */ + public String metricFilterPattern() { + return this.metricFilterPattern; + } + + /** + * Set the metricFilterPattern property: The metricFilterPattern property. + * + * @param metricFilterPattern the metricFilterPattern value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withMetricFilterPattern(String metricFilterPattern) { + this.metricFilterPattern = metricFilterPattern; + return this; + } + + /** + * Get the fillGapWithZero property: The fillGapWithZero property. + * + * @return the fillGapWithZero value. + */ + public Boolean fillGapWithZero() { + return this.fillGapWithZero; + } + + /** + * Set the fillGapWithZero property: The fillGapWithZero property. + * + * @param fillGapWithZero the fillGapWithZero value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withFillGapWithZero(Boolean fillGapWithZero) { + this.fillGapWithZero = fillGapWithZero; + return this; + } + + /** + * Get the isInternal property: The isInternal property. + * + * @return the isInternal value. + */ + public Boolean isInternal() { + return this.isInternal; + } + + /** + * Set the isInternal property: The isInternal property. + * + * @param isInternal the isInternal value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withIsInternal(Boolean isInternal) { + this.isInternal = isInternal; + return this; + } + + /** + * Get the dimensions property: The dimensions property. + * + * @return the dimensions value. + */ + public List dimensions() { + return this.dimensions; + } + + /** + * Set the dimensions property: The dimensions property. + * + * @param dimensions the dimensions value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withDimensions(List dimensions) { + this.dimensions = dimensions; + return this; + } + + /** + * Get the category property: The category property. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Set the category property: The category property. + * + * @param category the category value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withCategory(String category) { + this.category = category; + return this; + } + + /** + * Get the availabilities property: The availabilities property. + * + * @return the availabilities value. + */ + public List availabilities() { + return this.availabilities; + } + + /** + * Set the availabilities property: The availabilities property. + * + * @param availabilities the availabilities value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withAvailabilities(List availabilities) { + this.availabilities = availabilities; + return this; + } + + /** + * Get the supportedTimeGrainTypes property: The supportedTimeGrainTypes property. + * + * @return the supportedTimeGrainTypes value. + */ + public List supportedTimeGrainTypes() { + return this.supportedTimeGrainTypes; + } + + /** + * Set the supportedTimeGrainTypes property: The supportedTimeGrainTypes property. + * + * @param supportedTimeGrainTypes the supportedTimeGrainTypes value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedTimeGrainTypes(List supportedTimeGrainTypes) { + this.supportedTimeGrainTypes = supportedTimeGrainTypes; + return this; + } + + /** + * Get the supportedAggregationTypes property: The supportedAggregationTypes property. + * + * @return the supportedAggregationTypes value. + */ + public List supportedAggregationTypes() { + return this.supportedAggregationTypes; + } + + /** + * Set the supportedAggregationTypes property: The supportedAggregationTypes property. + * + * @param supportedAggregationTypes the supportedAggregationTypes value to set. + * @return the MetricSpecification object itself. + */ + public MetricSpecification withSupportedAggregationTypes(List supportedAggregationTypes) { + this.supportedAggregationTypes = supportedAggregationTypes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dimensions() != null) { + dimensions().forEach(e -> e.validate()); + } + if (availabilities() != null) { + availabilities().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MigrateMySqlRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MigrateMySqlRequest.java new file mode 100644 index 0000000000000..ed8929ea5f95a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MigrateMySqlRequest.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.MigrateMySqlRequestProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** MySQL migration request. */ +@Fluent +public final class MigrateMySqlRequest extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(MigrateMySqlRequest.class); + + /* + * MigrateMySqlRequest resource specific properties + */ + @JsonProperty(value = "properties") + private MigrateMySqlRequestProperties innerProperties; + + /** + * Get the innerProperties property: MigrateMySqlRequest resource specific properties. + * + * @return the innerProperties value. + */ + private MigrateMySqlRequestProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public MigrateMySqlRequest withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the connectionString property: Connection string to the remote MySQL database. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.innerProperties() == null ? null : this.innerProperties().connectionString(); + } + + /** + * Set the connectionString property: Connection string to the remote MySQL database. + * + * @param connectionString the connectionString value to set. + * @return the MigrateMySqlRequest object itself. + */ + public MigrateMySqlRequest withConnectionString(String connectionString) { + if (this.innerProperties() == null) { + this.innerProperties = new MigrateMySqlRequestProperties(); + } + this.innerProperties().withConnectionString(connectionString); + return this; + } + + /** + * Get the migrationType property: The type of migration operation to be done. + * + * @return the migrationType value. + */ + public MySqlMigrationType migrationType() { + return this.innerProperties() == null ? null : this.innerProperties().migrationType(); + } + + /** + * Set the migrationType property: The type of migration operation to be done. + * + * @param migrationType the migrationType value to set. + * @return the MigrateMySqlRequest object itself. + */ + public MigrateMySqlRequest withMigrationType(MySqlMigrationType migrationType) { + if (this.innerProperties() == null) { + this.innerProperties = new MigrateMySqlRequestProperties(); + } + this.innerProperties().withMigrationType(migrationType); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MigrateMySqlStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MigrateMySqlStatus.java new file mode 100644 index 0000000000000..d27214c55793e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MigrateMySqlStatus.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.MigrateMySqlStatusInner; + +/** An immutable client-side representation of MigrateMySqlStatus. */ +public interface MigrateMySqlStatus { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the migrationOperationStatus property: Status of the migration task. + * + * @return the migrationOperationStatus value. + */ + OperationStatus migrationOperationStatus(); + + /** + * Gets the operationId property: Operation ID for the migration task. + * + * @return the operationId value. + */ + String operationId(); + + /** + * Gets the localMySqlEnabled property: True if the web app has in app MySql enabled. + * + * @return the localMySqlEnabled value. + */ + Boolean localMySqlEnabled(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.MigrateMySqlStatusInner object. + * + * @return the inner object. + */ + MigrateMySqlStatusInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MySqlMigrationType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MySqlMigrationType.java new file mode 100644 index 0000000000000..c08f870473259 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/MySqlMigrationType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for MySqlMigrationType. */ +public enum MySqlMigrationType { + /** Enum value LocalToRemote. */ + LOCAL_TO_REMOTE("LocalToRemote"), + + /** Enum value RemoteToLocal. */ + REMOTE_TO_LOCAL("RemoteToLocal"); + + /** The actual serialized value for a MySqlMigrationType instance. */ + private final String value; + + MySqlMigrationType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a MySqlMigrationType instance. + * + * @param value the serialized value to parse. + * @return the parsed MySqlMigrationType object, or null if unable to parse. + */ + @JsonCreator + public static MySqlMigrationType fromString(String value) { + MySqlMigrationType[] items = MySqlMigrationType.values(); + for (MySqlMigrationType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameIdentifier.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameIdentifier.java new file mode 100644 index 0000000000000..81bd2f641cc42 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameIdentifier.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; + +/** An immutable client-side representation of NameIdentifier. */ +public interface NameIdentifier { + /** + * Gets the name property: Name of the object. + * + * @return the name value. + */ + String name(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner object. + * + * @return the inner object. + */ + NameIdentifierInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameIdentifierCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameIdentifierCollection.java new file mode 100644 index 0000000000000..d6760682ebad2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameIdentifierCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.NameIdentifierInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of domain name identifiers. */ +@Fluent +public final class NameIdentifierCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NameIdentifierCollection.class); + + /* + * 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; + + /** + * 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 NameIdentifierCollection object itself. + */ + public NameIdentifierCollection 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 NameIdentifierCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameValuePair.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameValuePair.java new file mode 100644 index 0000000000000..91482031daf6c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NameValuePair.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Name value pair. */ +@Fluent +public final class NameValuePair { + @JsonIgnore private final ClientLogger logger = new ClientLogger(NameValuePair.class); + + /* + * Pair name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Pair value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name property: Pair name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Pair name. + * + * @param name the name value to set. + * @return the NameValuePair object itself. + */ + public NameValuePair withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Pair value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Pair value. + * + * @param value the value value to set. + * @return the NameValuePair object itself. + */ + public NameValuePair 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NetworkFeatures.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NetworkFeatures.java new file mode 100644 index 0000000000000..9767afd97ac9c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NetworkFeatures.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkFeaturesInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfo; +import java.util.List; + +/** An immutable client-side representation of NetworkFeatures. */ +public interface NetworkFeatures { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the virtualNetworkName property: The Virtual Network name. + * + * @return the virtualNetworkName value. + */ + String virtualNetworkName(); + + /** + * Gets the virtualNetworkConnection property: The Virtual Network summary view. + * + * @return the virtualNetworkConnection value. + */ + VnetInfo virtualNetworkConnection(); + + /** + * Gets the hybridConnections property: The Hybrid Connections summary view. + * + * @return the hybridConnections value. + */ + List hybridConnections(); + + /** + * Gets the hybridConnectionsV2 property: The Hybrid Connection V2 (Service Bus) view. + * + * @return the hybridConnectionsV2 value. + */ + List hybridConnectionsV2(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.NetworkFeaturesInner object. + * + * @return the inner object. + */ + NetworkFeaturesInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NetworkTrace.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NetworkTrace.java new file mode 100644 index 0000000000000..e2352f465097b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NetworkTrace.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.NetworkTraceInner; + +/** An immutable client-side representation of NetworkTrace. */ +public interface NetworkTrace { + /** + * Gets the path property: Local file path for the captured network trace file. + * + * @return the path value. + */ + String path(); + + /** + * Gets the status property: Current status of the network trace operation, same as Operation.Status + * (InProgress/Succeeded/Failed). + * + * @return the status value. + */ + String status(); + + /** + * Gets the message property: Detailed message of a network trace operation, e.g. error message in case of failure. + * + * @return the message value. + */ + String message(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.NetworkTraceInner object. + * + * @return the inner object. + */ + NetworkTraceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Nonce.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Nonce.java new file mode 100644 index 0000000000000..47cf32aa06229 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Nonce.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the nonce used in the login flow. */ +@Fluent +public final class Nonce { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Nonce.class); + + /* + * false if the nonce should not be validated while completing + * the login flow; otherwise, true. + */ + @JsonProperty(value = "validateNonce") + private Boolean validateNonce; + + /* + * The time after the request is made when the nonce should expire. + */ + @JsonProperty(value = "nonceExpirationInterval") + private String nonceExpirationInterval; + + /** + * Get the validateNonce property: <code>false</code> if the nonce should not be validated while + * completing the login flow; otherwise, <code>true</code>. + * + * @return the validateNonce value. + */ + public Boolean validateNonce() { + return this.validateNonce; + } + + /** + * Set the validateNonce property: <code>false</code> if the nonce should not be validated while + * completing the login flow; otherwise, <code>true</code>. + * + * @param validateNonce the validateNonce value to set. + * @return the Nonce object itself. + */ + public Nonce withValidateNonce(Boolean validateNonce) { + this.validateNonce = validateNonce; + return this; + } + + /** + * Get the nonceExpirationInterval property: The time after the request is made when the nonce should expire. + * + * @return the nonceExpirationInterval value. + */ + public String nonceExpirationInterval() { + return this.nonceExpirationInterval; + } + + /** + * Set the nonceExpirationInterval property: The time after the request is made when the nonce should expire. + * + * @param nonceExpirationInterval the nonceExpirationInterval value to set. + * @return the Nonce object itself. + */ + public Nonce withNonceExpirationInterval(String nonceExpirationInterval) { + this.nonceExpirationInterval = nonceExpirationInterval; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NotificationLevel.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NotificationLevel.java new file mode 100644 index 0000000000000..913d7c3c8eacb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/NotificationLevel.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for NotificationLevel. */ +public enum NotificationLevel { + /** Enum value Critical. */ + CRITICAL("Critical"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Information. */ + INFORMATION("Information"), + + /** Enum value NonUrgentSuggestion. */ + NON_URGENT_SUGGESTION("NonUrgentSuggestion"); + + /** The actual serialized value for a NotificationLevel instance. */ + private final String value; + + NotificationLevel(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a NotificationLevel instance. + * + * @param value the serialized value to parse. + * @return the parsed NotificationLevel object, or null if unable to parse. + */ + @JsonCreator + public static NotificationLevel fromString(String value) { + NotificationLevel[] items = NotificationLevel.values(); + for (NotificationLevel item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectClientCredential.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectClientCredential.java new file mode 100644 index 0000000000000..8d5e735cdd099 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectClientCredential.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The authentication client credentials of the custom Open ID Connect provider. */ +@Fluent +public final class OpenIdConnectClientCredential { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OpenIdConnectClientCredential.class); + + /* + * The method that should be used to authenticate the user. + */ + @JsonProperty(value = "method") + private ClientCredentialMethod method; + + /* + * The app setting that contains the client secret for the custom Open ID + * Connect provider. + */ + @JsonProperty(value = "clientSecretSettingName") + private String clientSecretSettingName; + + /** + * Get the method property: The method that should be used to authenticate the user. + * + * @return the method value. + */ + public ClientCredentialMethod method() { + return this.method; + } + + /** + * Set the method property: The method that should be used to authenticate the user. + * + * @param method the method value to set. + * @return the OpenIdConnectClientCredential object itself. + */ + public OpenIdConnectClientCredential withMethod(ClientCredentialMethod method) { + this.method = method; + return this; + } + + /** + * Get the clientSecretSettingName property: The app setting that contains the client secret for the custom Open ID + * Connect provider. + * + * @return the clientSecretSettingName value. + */ + public String clientSecretSettingName() { + return this.clientSecretSettingName; + } + + /** + * Set the clientSecretSettingName property: The app setting that contains the client secret for the custom Open ID + * Connect provider. + * + * @param clientSecretSettingName the clientSecretSettingName value to set. + * @return the OpenIdConnectClientCredential object itself. + */ + public OpenIdConnectClientCredential withClientSecretSettingName(String clientSecretSettingName) { + this.clientSecretSettingName = clientSecretSettingName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectConfig.java new file mode 100644 index 0000000000000..76c8a5b1d864a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectConfig.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ +@Fluent +public final class OpenIdConnectConfig { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OpenIdConnectConfig.class); + + /* + * The endpoint to be used to make an authorization request. + */ + @JsonProperty(value = "authorizationEndpoint") + private String authorizationEndpoint; + + /* + * The endpoint to be used to request a token. + */ + @JsonProperty(value = "tokenEndpoint") + private String tokenEndpoint; + + /* + * The endpoint that issues the token. + */ + @JsonProperty(value = "issuer") + private String issuer; + + /* + * The endpoint that provides the keys necessary to validate the token. + */ + @JsonProperty(value = "certificationUri") + private String certificationUri; + + /* + * The endpoint that contains all the configuration endpoints for the + * provider. + */ + @JsonProperty(value = "wellKnownOpenIdConfiguration") + private String wellKnownOpenIdConfiguration; + + /** + * Get the authorizationEndpoint property: The endpoint to be used to make an authorization request. + * + * @return the authorizationEndpoint value. + */ + public String authorizationEndpoint() { + return this.authorizationEndpoint; + } + + /** + * Set the authorizationEndpoint property: The endpoint to be used to make an authorization request. + * + * @param authorizationEndpoint the authorizationEndpoint value to set. + * @return the OpenIdConnectConfig object itself. + */ + public OpenIdConnectConfig withAuthorizationEndpoint(String authorizationEndpoint) { + this.authorizationEndpoint = authorizationEndpoint; + return this; + } + + /** + * Get the tokenEndpoint property: The endpoint to be used to request a token. + * + * @return the tokenEndpoint value. + */ + public String tokenEndpoint() { + return this.tokenEndpoint; + } + + /** + * Set the tokenEndpoint property: The endpoint to be used to request a token. + * + * @param tokenEndpoint the tokenEndpoint value to set. + * @return the OpenIdConnectConfig object itself. + */ + public OpenIdConnectConfig withTokenEndpoint(String tokenEndpoint) { + this.tokenEndpoint = tokenEndpoint; + return this; + } + + /** + * Get the issuer property: The endpoint that issues the token. + * + * @return the issuer value. + */ + public String issuer() { + return this.issuer; + } + + /** + * Set the issuer property: The endpoint that issues the token. + * + * @param issuer the issuer value to set. + * @return the OpenIdConnectConfig object itself. + */ + public OpenIdConnectConfig withIssuer(String issuer) { + this.issuer = issuer; + return this; + } + + /** + * Get the certificationUri property: The endpoint that provides the keys necessary to validate the token. + * + * @return the certificationUri value. + */ + public String certificationUri() { + return this.certificationUri; + } + + /** + * Set the certificationUri property: The endpoint that provides the keys necessary to validate the token. + * + * @param certificationUri the certificationUri value to set. + * @return the OpenIdConnectConfig object itself. + */ + public OpenIdConnectConfig withCertificationUri(String certificationUri) { + this.certificationUri = certificationUri; + return this; + } + + /** + * Get the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the + * provider. + * + * @return the wellKnownOpenIdConfiguration value. + */ + public String wellKnownOpenIdConfiguration() { + return this.wellKnownOpenIdConfiguration; + } + + /** + * Set the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the + * provider. + * + * @param wellKnownOpenIdConfiguration the wellKnownOpenIdConfiguration value to set. + * @return the OpenIdConnectConfig object itself. + */ + public OpenIdConnectConfig withWellKnownOpenIdConfiguration(String wellKnownOpenIdConfiguration) { + this.wellKnownOpenIdConfiguration = wellKnownOpenIdConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectLogin.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectLogin.java new file mode 100644 index 0000000000000..a8ad540875215 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectLogin.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The configuration settings of the login flow of the custom Open ID Connect provider. */ +@Fluent +public final class OpenIdConnectLogin { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OpenIdConnectLogin.class); + + /* + * The name of the claim that contains the users name. + */ + @JsonProperty(value = "nameClaimType") + private String nameClaimType; + + /* + * A list of the scopes that should be requested while authenticating. + */ + @JsonProperty(value = "scopes") + private List scopes; + + /** + * Get the nameClaimType property: The name of the claim that contains the users name. + * + * @return the nameClaimType value. + */ + public String nameClaimType() { + return this.nameClaimType; + } + + /** + * Set the nameClaimType property: The name of the claim that contains the users name. + * + * @param nameClaimType the nameClaimType value to set. + * @return the OpenIdConnectLogin object itself. + */ + public OpenIdConnectLogin withNameClaimType(String nameClaimType) { + this.nameClaimType = nameClaimType; + return this; + } + + /** + * Get the scopes property: A list of the scopes that should be requested while authenticating. + * + * @return the scopes value. + */ + public List scopes() { + return this.scopes; + } + + /** + * Set the scopes property: A list of the scopes that should be requested while authenticating. + * + * @param scopes the scopes value to set. + * @return the OpenIdConnectLogin object itself. + */ + public OpenIdConnectLogin withScopes(List scopes) { + this.scopes = scopes; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectRegistration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectRegistration.java new file mode 100644 index 0000000000000..82d7bd3073711 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OpenIdConnectRegistration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the app registration for the custom Open ID Connect provider. */ +@Fluent +public final class OpenIdConnectRegistration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OpenIdConnectRegistration.class); + + /* + * The client id of the custom Open ID Connect provider. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The authentication credentials of the custom Open ID Connect provider. + */ + @JsonProperty(value = "clientCredential") + private OpenIdConnectClientCredential clientCredential; + + /* + * The configuration settings of the endpoints used for the custom Open ID + * Connect provider. + */ + @JsonProperty(value = "openIdConnectConfiguration") + private OpenIdConnectConfig openIdConnectConfiguration; + + /** + * Get the clientId property: The client id of the custom Open ID Connect provider. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The client id of the custom Open ID Connect provider. + * + * @param clientId the clientId value to set. + * @return the OpenIdConnectRegistration object itself. + */ + public OpenIdConnectRegistration withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the clientCredential property: The authentication credentials of the custom Open ID Connect provider. + * + * @return the clientCredential value. + */ + public OpenIdConnectClientCredential clientCredential() { + return this.clientCredential; + } + + /** + * Set the clientCredential property: The authentication credentials of the custom Open ID Connect provider. + * + * @param clientCredential the clientCredential value to set. + * @return the OpenIdConnectRegistration object itself. + */ + public OpenIdConnectRegistration withClientCredential(OpenIdConnectClientCredential clientCredential) { + this.clientCredential = clientCredential; + return this; + } + + /** + * Get the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open + * ID Connect provider. + * + * @return the openIdConnectConfiguration value. + */ + public OpenIdConnectConfig openIdConnectConfiguration() { + return this.openIdConnectConfiguration; + } + + /** + * Set the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open + * ID Connect provider. + * + * @param openIdConnectConfiguration the openIdConnectConfiguration value to set. + * @return the OpenIdConnectRegistration object itself. + */ + public OpenIdConnectRegistration withOpenIdConnectConfiguration(OpenIdConnectConfig openIdConnectConfiguration) { + this.openIdConnectConfiguration = openIdConnectConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clientCredential() != null) { + clientCredential().validate(); + } + if (openIdConnectConfiguration() != null) { + openIdConnectConfiguration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Operation.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Operation.java new file mode 100644 index 0000000000000..e9fcf5aa3a1bc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Operation.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** An immutable client-side representation of Operation. */ +public interface Operation { + /** + * Gets the id property: Operation ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Operation name. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: The current status of the operation. + * + * @return the status value. + */ + OperationStatus status(); + + /** + * Gets the errors property: Any errors associate with the operation. + * + * @return the errors value. + */ + List errors(); + + /** + * Gets the createdTime property: Time when operation has started. + * + * @return the createdTime value. + */ + OffsetDateTime createdTime(); + + /** + * Gets the modifiedTime property: Time when operation has been updated. + * + * @return the modifiedTime value. + */ + OffsetDateTime modifiedTime(); + + /** + * Gets the expirationTime property: Time when operation will expire. + * + * @return the expirationTime value. + */ + OffsetDateTime expirationTime(); + + /** + * Gets the geoMasterOperationId property: Applicable only for stamp operation ids. + * + * @return the geoMasterOperationId value. + */ + UUID geoMasterOperationId(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.OperationInner object. + * + * @return the inner object. + */ + OperationInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OperationStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OperationStatus.java new file mode 100644 index 0000000000000..637f2fdb7e98b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OperationStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for OperationStatus. */ +public enum OperationStatus { + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value TimedOut. */ + TIMED_OUT("TimedOut"), + + /** Enum value Created. */ + CREATED("Created"); + + /** The actual serialized value for a OperationStatus instance. */ + private final String value; + + OperationStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a OperationStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed OperationStatus object, or null if unable to parse. + */ + @JsonCreator + public static OperationStatus fromString(String value) { + OperationStatus[] items = OperationStatus.values(); + for (OperationStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OutboundEnvironmentEndpoint.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OutboundEnvironmentEndpoint.java new file mode 100644 index 0000000000000..1a36aac59265a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OutboundEnvironmentEndpoint.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.OutboundEnvironmentEndpointInner; +import java.util.List; + +/** An immutable client-side representation of OutboundEnvironmentEndpoint. */ +public interface OutboundEnvironmentEndpoint { + /** + * Gets the category property: The type of service accessed by the App Service Environment, e.g., Azure Storage, + * Azure SQL Database, and Azure Active Directory. + * + * @return the category value. + */ + String category(); + + /** + * Gets the endpoints property: The endpoints that the App Service Environment reaches the service at. + * + * @return the endpoints value. + */ + List endpoints(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.OutboundEnvironmentEndpointInner + * object. + * + * @return the inner object. + */ + OutboundEnvironmentEndpointInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OutboundEnvironmentEndpointCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OutboundEnvironmentEndpointCollection.java new file mode 100644 index 0000000000000..d6e85eb482fe5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/OutboundEnvironmentEndpointCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.OutboundEnvironmentEndpointInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Outbound Environment Endpoints. */ +@Fluent +public final class OutboundEnvironmentEndpointCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OutboundEnvironmentEndpointCollection.class); + + /* + * 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; + + /** + * 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 OutboundEnvironmentEndpointCollection object itself. + */ + public OutboundEnvironmentEndpointCollection 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 OutboundEnvironmentEndpointCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonCounterCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonCounterCollection.java new file mode 100644 index 0000000000000..efcf147781acd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonCounterCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.PerfMonResponseInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of performance monitor counters. */ +@Fluent +public final class PerfMonCounterCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PerfMonCounterCollection.class); + + /* + * 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; + + /** + * 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 PerfMonCounterCollection object itself. + */ + public PerfMonCounterCollection 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 PerfMonCounterCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonResponse.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonResponse.java new file mode 100644 index 0000000000000..29533c9b4f57c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonResponse.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PerfMonResponseInner; + +/** An immutable client-side representation of PerfMonResponse. */ +public interface PerfMonResponse { + /** + * Gets the code property: The response code. + * + * @return the code value. + */ + String code(); + + /** + * Gets the message property: The message. + * + * @return the message value. + */ + String message(); + + /** + * Gets the data property: The performance monitor counters. + * + * @return the data value. + */ + PerfMonSet data(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.PerfMonResponseInner object. + * + * @return the inner object. + */ + PerfMonResponseInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonSample.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonSample.java new file mode 100644 index 0000000000000..a7cb3467da5ea --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonSample.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Performance monitor sample in a set. */ +@Fluent +public final class PerfMonSample { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PerfMonSample.class); + + /* + * Point in time for which counter was measured. + */ + @JsonProperty(value = "time") + private OffsetDateTime time; + + /* + * Name of the server on which the measurement is made. + */ + @JsonProperty(value = "instanceName") + private String instanceName; + + /* + * Value of counter at a certain time. + */ + @JsonProperty(value = "value") + private Double value; + + /** + * Get the time property: Point in time for which counter was measured. + * + * @return the time value. + */ + public OffsetDateTime time() { + return this.time; + } + + /** + * Set the time property: Point in time for which counter was measured. + * + * @param time the time value to set. + * @return the PerfMonSample object itself. + */ + public PerfMonSample withTime(OffsetDateTime time) { + this.time = time; + return this; + } + + /** + * Get the instanceName property: Name of the server on which the measurement is made. + * + * @return the instanceName value. + */ + public String instanceName() { + return this.instanceName; + } + + /** + * Set the instanceName property: Name of the server on which the measurement is made. + * + * @param instanceName the instanceName value to set. + * @return the PerfMonSample object itself. + */ + public PerfMonSample withInstanceName(String instanceName) { + this.instanceName = instanceName; + return this; + } + + /** + * Get the value property: Value of counter at a certain time. + * + * @return the value value. + */ + public Double value() { + return this.value; + } + + /** + * Set the value property: Value of counter at a certain time. + * + * @param value the value value to set. + * @return the PerfMonSample object itself. + */ + public PerfMonSample withValue(Double 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonSet.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonSet.java new file mode 100644 index 0000000000000..f1ea7364f2a6e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PerfMonSet.java @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** Metric information. */ +@Fluent +public final class PerfMonSet { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PerfMonSet.class); + + /* + * Unique key name of the counter. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Start time of the period. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * End time of the period. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Presented time grain. + */ + @JsonProperty(value = "timeGrain") + private String timeGrain; + + /* + * Collection of workers that are active during this time. + */ + @JsonProperty(value = "values") + private List values; + + /** + * Get the name property: Unique key name of the counter. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Unique key name of the counter. + * + * @param name the name value to set. + * @return the PerfMonSet object itself. + */ + public PerfMonSet withName(String name) { + this.name = name; + return this; + } + + /** + * Get the startTime property: Start time of the period. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time of the period. + * + * @param startTime the startTime value to set. + * @return the PerfMonSet object itself. + */ + public PerfMonSet withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: End time of the period. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time of the period. + * + * @param endTime the endTime value to set. + * @return the PerfMonSet object itself. + */ + public PerfMonSet withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the timeGrain property: Presented time grain. + * + * @return the timeGrain value. + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Set the timeGrain property: Presented time grain. + * + * @param timeGrain the timeGrain value to set. + * @return the PerfMonSet object itself. + */ + public PerfMonSet withTimeGrain(String timeGrain) { + this.timeGrain = timeGrain; + return this; + } + + /** + * Get the values property: Collection of workers that are active during this time. + * + * @return the values value. + */ + public List values() { + return this.values; + } + + /** + * Set the values property: Collection of workers that are active during this time. + * + * @param values the values value to set. + * @return the PerfMonSet object itself. + */ + public PerfMonSet withValues(List values) { + this.values = values; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (values() != null) { + values().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOn.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOn.java new file mode 100644 index 0000000000000..1446ae83faa8c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOn.java @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnInner; +import java.util.Map; + +/** An immutable client-side representation of PremierAddOn. */ +public interface PremierAddOn { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the sku property: Premier add on SKU. + * + * @return the sku value. + */ + String sku(); + + /** + * Gets the product property: Premier add on Product. + * + * @return the product value. + */ + String product(); + + /** + * Gets the vendor property: Premier add on Vendor. + * + * @return the vendor value. + */ + String vendor(); + + /** + * Gets the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @return the marketplacePublisher value. + */ + String marketplacePublisher(); + + /** + * Gets the marketplaceOffer property: Premier add on Marketplace offer. + * + * @return the marketplaceOffer value. + */ + String marketplaceOffer(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnInner object. + * + * @return the inner object. + */ + PremierAddOnInner innerModel(); + + /** The entirety of the PremierAddOn definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, + DefinitionStages.WithCreate { + } + /** The PremierAddOn definition stages. */ + interface DefinitionStages { + /** The first stage of the PremierAddOn definition. */ + interface Blank extends WithLocation { + } + /** The stage of the PremierAddOn 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. + */ + WithParentResource withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithParentResource withRegion(String location); + } + /** The stage of the PremierAddOn definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @return the next definition stage. + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + /** + * The stage of the PremierAddOn definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithKind, + DefinitionStages.WithSku, + DefinitionStages.WithProduct, + DefinitionStages.WithVendor, + DefinitionStages.WithMarketplacePublisher, + DefinitionStages.WithMarketplaceOffer { + /** + * Executes the create request. + * + * @return the created resource. + */ + PremierAddOn create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PremierAddOn create(Context context); + } + /** The stage of the PremierAddOn 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 PremierAddOn definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the PremierAddOn definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Premier add on SKU.. + * + * @param sku Premier add on SKU. + * @return the next definition stage. + */ + WithCreate withSku(String sku); + } + /** The stage of the PremierAddOn definition allowing to specify product. */ + interface WithProduct { + /** + * Specifies the product property: Premier add on Product.. + * + * @param product Premier add on Product. + * @return the next definition stage. + */ + WithCreate withProduct(String product); + } + /** The stage of the PremierAddOn definition allowing to specify vendor. */ + interface WithVendor { + /** + * Specifies the vendor property: Premier add on Vendor.. + * + * @param vendor Premier add on Vendor. + * @return the next definition stage. + */ + WithCreate withVendor(String vendor); + } + /** The stage of the PremierAddOn definition allowing to specify marketplacePublisher. */ + interface WithMarketplacePublisher { + /** + * Specifies the marketplacePublisher property: Premier add on Marketplace publisher.. + * + * @param marketplacePublisher Premier add on Marketplace publisher. + * @return the next definition stage. + */ + WithCreate withMarketplacePublisher(String marketplacePublisher); + } + /** The stage of the PremierAddOn definition allowing to specify marketplaceOffer. */ + interface WithMarketplaceOffer { + /** + * Specifies the marketplaceOffer property: Premier add on Marketplace offer.. + * + * @param marketplaceOffer Premier add on Marketplace offer. + * @return the next definition stage. + */ + WithCreate withMarketplaceOffer(String marketplaceOffer); + } + } + /** + * Begins update for the PremierAddOn resource. + * + * @return the stage of resource update. + */ + PremierAddOn.Update update(); + + /** The template for PremierAddOn update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithSku, + UpdateStages.WithProduct, + UpdateStages.WithVendor, + UpdateStages.WithMarketplacePublisher, + UpdateStages.WithMarketplaceOffer { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PremierAddOn apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PremierAddOn apply(Context context); + } + /** The PremierAddOn update stages. */ + interface UpdateStages { + /** The stage of the PremierAddOn update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the PremierAddOn update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Premier add on SKU.. + * + * @param sku Premier add on SKU. + * @return the next definition stage. + */ + Update withSku(String sku); + } + /** The stage of the PremierAddOn update allowing to specify product. */ + interface WithProduct { + /** + * Specifies the product property: Premier add on Product.. + * + * @param product Premier add on Product. + * @return the next definition stage. + */ + Update withProduct(String product); + } + /** The stage of the PremierAddOn update allowing to specify vendor. */ + interface WithVendor { + /** + * Specifies the vendor property: Premier add on Vendor.. + * + * @param vendor Premier add on Vendor. + * @return the next definition stage. + */ + Update withVendor(String vendor); + } + /** The stage of the PremierAddOn update allowing to specify marketplacePublisher. */ + interface WithMarketplacePublisher { + /** + * Specifies the marketplacePublisher property: Premier add on Marketplace publisher.. + * + * @param marketplacePublisher Premier add on Marketplace publisher. + * @return the next definition stage. + */ + Update withMarketplacePublisher(String marketplacePublisher); + } + /** The stage of the PremierAddOn update allowing to specify marketplaceOffer. */ + interface WithMarketplaceOffer { + /** + * Specifies the marketplaceOffer property: Premier add on Marketplace offer.. + * + * @param marketplaceOffer Premier add on Marketplace offer. + * @return the next definition stage. + */ + Update withMarketplaceOffer(String marketplaceOffer); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PremierAddOn refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PremierAddOn refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnOffer.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnOffer.java new file mode 100644 index 0000000000000..96fddf264802f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnOffer.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnOfferInner; + +/** An immutable client-side representation of PremierAddOnOffer. */ +public interface PremierAddOnOffer { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the sku property: Premier add on SKU. + * + * @return the sku value. + */ + String sku(); + + /** + * Gets the product property: Premier add on offer Product. + * + * @return the product value. + */ + String product(); + + /** + * Gets the vendor property: Premier add on offer Vendor. + * + * @return the vendor value. + */ + String vendor(); + + /** + * Gets the promoCodeRequired property: <code>true</code> if promotion code is required; otherwise, + * <code>false</code>. + * + * @return the promoCodeRequired value. + */ + Boolean promoCodeRequired(); + + /** + * Gets the quota property: Premier add on offer Quota. + * + * @return the quota value. + */ + Integer quota(); + + /** + * Gets the webHostingPlanRestrictions property: App Service plans this offer is restricted to. + * + * @return the webHostingPlanRestrictions value. + */ + AppServicePlanRestrictions webHostingPlanRestrictions(); + + /** + * Gets the privacyPolicyUrl property: Privacy policy URL. + * + * @return the privacyPolicyUrl value. + */ + String privacyPolicyUrl(); + + /** + * Gets the legalTermsUrl property: Legal terms URL. + * + * @return the legalTermsUrl value. + */ + String legalTermsUrl(); + + /** + * Gets the marketplacePublisher property: Marketplace publisher. + * + * @return the marketplacePublisher value. + */ + String marketplacePublisher(); + + /** + * Gets the marketplaceOffer property: Marketplace offer. + * + * @return the marketplaceOffer value. + */ + String marketplaceOffer(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnOfferInner object. + * + * @return the inner object. + */ + PremierAddOnOfferInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnOfferCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnOfferCollection.java new file mode 100644 index 0000000000000..e6294e112deae --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnOfferCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnOfferInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of premier add-on offers. */ +@Fluent +public final class PremierAddOnOfferCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PremierAddOnOfferCollection.class); + + /* + * 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; + + /** + * 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 PremierAddOnOfferCollection object itself. + */ + public PremierAddOnOfferCollection 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 PremierAddOnOfferCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnPatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnPatchResource.java new file mode 100644 index 0000000000000..a9967fde77e24 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PremierAddOnPatchResource.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnPatchResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ARM resource for a PremierAddOn. */ +@Fluent +public final class PremierAddOnPatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PremierAddOnPatchResource.class); + + /* + * PremierAddOnPatchResource resource specific properties + */ + @JsonProperty(value = "properties") + private PremierAddOnPatchResourceProperties innerProperties; + + /** + * Get the innerProperties property: PremierAddOnPatchResource resource specific properties. + * + * @return the innerProperties value. + */ + private PremierAddOnPatchResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public PremierAddOnPatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the sku property: Premier add on SKU. + * + * @return the sku value. + */ + public String sku() { + return this.innerProperties() == null ? null : this.innerProperties().sku(); + } + + /** + * Set the sku property: Premier add on SKU. + * + * @param sku the sku value to set. + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withSku(String sku) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnPatchResourceProperties(); + } + this.innerProperties().withSku(sku); + return this; + } + + /** + * Get the product property: Premier add on Product. + * + * @return the product value. + */ + public String product() { + return this.innerProperties() == null ? null : this.innerProperties().product(); + } + + /** + * Set the product property: Premier add on Product. + * + * @param product the product value to set. + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withProduct(String product) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnPatchResourceProperties(); + } + this.innerProperties().withProduct(product); + return this; + } + + /** + * Get the vendor property: Premier add on Vendor. + * + * @return the vendor value. + */ + public String vendor() { + return this.innerProperties() == null ? null : this.innerProperties().vendor(); + } + + /** + * Set the vendor property: Premier add on Vendor. + * + * @param vendor the vendor value to set. + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withVendor(String vendor) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnPatchResourceProperties(); + } + this.innerProperties().withVendor(vendor); + return this; + } + + /** + * Get the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @return the marketplacePublisher value. + */ + public String marketplacePublisher() { + return this.innerProperties() == null ? null : this.innerProperties().marketplacePublisher(); + } + + /** + * Set the marketplacePublisher property: Premier add on Marketplace publisher. + * + * @param marketplacePublisher the marketplacePublisher value to set. + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withMarketplacePublisher(String marketplacePublisher) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnPatchResourceProperties(); + } + this.innerProperties().withMarketplacePublisher(marketplacePublisher); + return this; + } + + /** + * Get the marketplaceOffer property: Premier add on Marketplace offer. + * + * @return the marketplaceOffer value. + */ + public String marketplaceOffer() { + return this.innerProperties() == null ? null : this.innerProperties().marketplaceOffer(); + } + + /** + * Set the marketplaceOffer property: Premier add on Marketplace offer. + * + * @param marketplaceOffer the marketplaceOffer value to set. + * @return the PremierAddOnPatchResource object itself. + */ + public PremierAddOnPatchResource withMarketplaceOffer(String marketplaceOffer) { + if (this.innerProperties() == null) { + this.innerProperties = new PremierAddOnPatchResourceProperties(); + } + this.innerProperties().withMarketplaceOffer(marketplaceOffer); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccess.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccess.java new file mode 100644 index 0000000000000..40ddc00db98d0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccess.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateAccessInner; +import java.util.List; + +/** An immutable client-side representation of PrivateAccess. */ +public interface PrivateAccess { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the enabled property: Whether private access is enabled or not. + * + * @return the enabled value. + */ + Boolean enabled(); + + /** + * Gets the virtualNetworks property: The Virtual Networks (and subnets) allowed to access the site privately. + * + * @return the virtualNetworks value. + */ + List virtualNetworks(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.PrivateAccessInner object. + * + * @return the inner object. + */ + PrivateAccessInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccessSubnet.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccessSubnet.java new file mode 100644 index 0000000000000..d2252cefdb092 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccessSubnet.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Description of a Virtual Network subnet that is useable for private site access. */ +@Fluent +public final class PrivateAccessSubnet { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateAccessSubnet.class); + + /* + * The name of the subnet. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The key (ID) of the subnet. + */ + @JsonProperty(value = "key") + private Integer key; + + /** + * Get the name property: The name of the subnet. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the subnet. + * + * @param name the name value to set. + * @return the PrivateAccessSubnet object itself. + */ + public PrivateAccessSubnet withName(String name) { + this.name = name; + return this; + } + + /** + * Get the key property: The key (ID) of the subnet. + * + * @return the key value. + */ + public Integer key() { + return this.key; + } + + /** + * Set the key property: The key (ID) of the subnet. + * + * @param key the key value to set. + * @return the PrivateAccessSubnet object itself. + */ + public PrivateAccessSubnet withKey(Integer key) { + this.key = key; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccessVirtualNetwork.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccessVirtualNetwork.java new file mode 100644 index 0000000000000..d4925972dcdb5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateAccessVirtualNetwork.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Description of a Virtual Network that is useable for private site access. */ +@Fluent +public final class PrivateAccessVirtualNetwork { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateAccessVirtualNetwork.class); + + /* + * The name of the Virtual Network. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The key (ID) of the Virtual Network. + */ + @JsonProperty(value = "key") + private Integer key; + + /* + * The ARM uri of the Virtual Network + */ + @JsonProperty(value = "resourceId") + private String resourceId; + + /* + * A List of subnets that access is allowed to on this Virtual Network. An + * empty array (but not null) is interpreted to mean that all subnets are + * allowed within this Virtual Network. + */ + @JsonProperty(value = "subnets") + private List subnets; + + /** + * Get the name property: The name of the Virtual Network. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the Virtual Network. + * + * @param name the name value to set. + * @return the PrivateAccessVirtualNetwork object itself. + */ + public PrivateAccessVirtualNetwork withName(String name) { + this.name = name; + return this; + } + + /** + * Get the key property: The key (ID) of the Virtual Network. + * + * @return the key value. + */ + public Integer key() { + return this.key; + } + + /** + * Set the key property: The key (ID) of the Virtual Network. + * + * @param key the key value to set. + * @return the PrivateAccessVirtualNetwork object itself. + */ + public PrivateAccessVirtualNetwork withKey(Integer key) { + this.key = key; + return this; + } + + /** + * Get the resourceId property: The ARM uri of the Virtual Network. + * + * @return the resourceId value. + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Set the resourceId property: The ARM uri of the Virtual Network. + * + * @param resourceId the resourceId value to set. + * @return the PrivateAccessVirtualNetwork object itself. + */ + public PrivateAccessVirtualNetwork withResourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Get the subnets property: A List of subnets that access is allowed to on this Virtual Network. An empty array + * (but not null) is interpreted to mean that all subnets are allowed within this Virtual Network. + * + * @return the subnets value. + */ + public List subnets() { + return this.subnets; + } + + /** + * Set the subnets property: A List of subnets that access is allowed to on this Virtual Network. An empty array + * (but not null) is interpreted to mean that all subnets are allowed within this Virtual Network. + * + * @param subnets the subnets value to set. + * @return the PrivateAccessVirtualNetwork object itself. + */ + public PrivateAccessVirtualNetwork withSubnets(List subnets) { + this.subnets = subnets; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (subnets() != null) { + subnets().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateEndpointConnectionCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateEndpointConnectionCollection.java new file mode 100644 index 0000000000000..88f688b0ae0b3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateEndpointConnectionCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The PrivateEndpointConnectionCollection model. */ +@Fluent +public final class PrivateEndpointConnectionCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionCollection.class); + + /* + * 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; + + /** + * 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 PrivateEndpointConnectionCollection object itself. + */ + public PrivateEndpointConnectionCollection 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 PrivateEndpointConnectionCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkConnectionApprovalRequestResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkConnectionApprovalRequestResource.java new file mode 100644 index 0000000000000..13cd5c2aa2288 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkConnectionApprovalRequestResource.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkConnectionApprovalRequest; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Private Endpoint Connection Approval ARM resource. */ +@Fluent +public final class PrivateLinkConnectionApprovalRequestResource extends ProxyOnlyResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(PrivateLinkConnectionApprovalRequestResource.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private PrivateLinkConnectionApprovalRequest innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private PrivateLinkConnectionApprovalRequest innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public PrivateLinkConnectionApprovalRequestResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateLinkConnectionApprovalRequestResource object itself. + */ + public PrivateLinkConnectionApprovalRequestResource withPrivateLinkServiceConnectionState( + PrivateLinkConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkConnectionApprovalRequest(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkConnectionState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkConnectionState.java new file mode 100644 index 0000000000000..27ce1ffb64169 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkConnectionState.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The state of a private link connection. */ +@Fluent +public final class PrivateLinkConnectionState { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkConnectionState.class); + + /* + * Status of a private link connection + */ + @JsonProperty(value = "status") + private String status; + + /* + * Description of a private link connection + */ + @JsonProperty(value = "description") + private String description; + + /* + * ActionsRequired for a private link connection + */ + @JsonProperty(value = "actionsRequired") + private String actionsRequired; + + /** + * Get the status property: Status of a private link connection. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Status of a private link connection. + * + * @param status the status value to set. + * @return the PrivateLinkConnectionState object itself. + */ + public PrivateLinkConnectionState withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the description property: Description of a private link connection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of a private link connection. + * + * @param description the description value to set. + * @return the PrivateLinkConnectionState object itself. + */ + public PrivateLinkConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionsRequired property: ActionsRequired for a private link connection. + * + * @return the actionsRequired value. + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: ActionsRequired for a private link connection. + * + * @param actionsRequired the actionsRequired value to set. + * @return the PrivateLinkConnectionState object itself. + */ + public PrivateLinkConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResource.java new file mode 100644 index 0000000000000..26fd918df6dea --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResource.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A private link resource. */ +@Fluent +public final class PrivateLinkResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResource.class); + + /* + * The id property. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * Name of a private link resource + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The type property. + */ + @JsonProperty(value = "type", required = true) + private String type; + + /* + * Properties of a private link resource + */ + @JsonProperty(value = "properties", required = true) + private PrivateLinkResourceProperties properties; + + /** + * Get the id property: The id property. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: The id property. + * + * @param id the id value to set. + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of a private link resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of a private link resource. + * + * @param name the name value to set. + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type property. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type property. + * + * @param type the type value to set. + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withType(String type) { + this.type = type; + return this; + } + + /** + * Get the properties property: Properties of a private link resource. + * + * @return the properties value. + */ + public PrivateLinkResourceProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Properties of a private link resource. + * + * @param properties the properties value to set. + * @return the PrivateLinkResource object itself. + */ + public PrivateLinkResource withProperties(PrivateLinkResourceProperties properties) { + this.properties = properties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model PrivateLinkResource")); + } + if (name() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model PrivateLinkResource")); + } + if (type() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property type in model PrivateLinkResource")); + } + if (properties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property properties in model PrivateLinkResource")); + } else { + properties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResourceProperties.java new file mode 100644 index 0000000000000..4504a88e7bf44 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResourceProperties.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Properties of a private link resource. */ +@Immutable +public final class PrivateLinkResourceProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); + + /* + * GroupId of a private link resource + */ + @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /* + * RequiredMembers of a private link resource + */ + @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /* + * RequiredZoneNames of a private link resource + */ + @JsonProperty(value = "requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) + private List requiredZoneNames; + + /** + * Get the groupId property: GroupId of a private link resource. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: RequiredMembers of a private link resource. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: RequiredZoneNames of a private link resource. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResourcesWrapper.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResourcesWrapper.java new file mode 100644 index 0000000000000..b37efdc4467f6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PrivateLinkResourcesWrapper.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner; +import java.util.List; + +/** An immutable client-side representation of PrivateLinkResourcesWrapper. */ +public interface PrivateLinkResourcesWrapper { + /** + * Gets the value property: The value property. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.PrivateLinkResourcesWrapperInner + * object. + * + * @return the inner object. + */ + PrivateLinkResourcesWrapperInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessInfo.java new file mode 100644 index 0000000000000..463d44e09c4b1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessInfo.java @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessInfoInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of ProcessInfo. */ +public interface ProcessInfo { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the identifier property: ARM Identifier for deployment. + * + * @return the identifier value. + */ + Integer identifier(); + + /** + * Gets the deploymentName property: Deployment name. + * + * @return the deploymentName value. + */ + String deploymentName(); + + /** + * Gets the href property: HRef URI. + * + * @return the href value. + */ + String href(); + + /** + * Gets the minidump property: Minidump URI. + * + * @return the minidump value. + */ + String minidump(); + + /** + * Gets the isProfileRunning property: Is profile running?. + * + * @return the isProfileRunning value. + */ + Boolean isProfileRunning(); + + /** + * Gets the isIisProfileRunning property: Is the IIS Profile running?. + * + * @return the isIisProfileRunning value. + */ + Boolean isIisProfileRunning(); + + /** + * Gets the iisProfileTimeoutInSeconds property: IIS Profile timeout (seconds). + * + * @return the iisProfileTimeoutInSeconds value. + */ + Double iisProfileTimeoutInSeconds(); + + /** + * Gets the parent property: Parent process. + * + * @return the parent value. + */ + String parent(); + + /** + * Gets the children property: Child process list. + * + * @return the children value. + */ + List children(); + + /** + * Gets the threads property: Thread list. + * + * @return the threads value. + */ + List threads(); + + /** + * Gets the openFileHandles property: List of open files. + * + * @return the openFileHandles value. + */ + List openFileHandles(); + + /** + * Gets the modules property: List of modules. + * + * @return the modules value. + */ + List modules(); + + /** + * Gets the fileName property: File name of this process. + * + * @return the fileName value. + */ + String fileName(); + + /** + * Gets the commandLine property: Command line. + * + * @return the commandLine value. + */ + String commandLine(); + + /** + * Gets the username property: User name. + * + * @return the username value. + */ + String username(); + + /** + * Gets the handleCount property: Handle count. + * + * @return the handleCount value. + */ + Integer handleCount(); + + /** + * Gets the moduleCount property: Module count. + * + * @return the moduleCount value. + */ + Integer moduleCount(); + + /** + * Gets the threadCount property: Thread count. + * + * @return the threadCount value. + */ + Integer threadCount(); + + /** + * Gets the startTime property: Start time. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the totalCpuTime property: Total CPU time. + * + * @return the totalCpuTime value. + */ + String totalCpuTime(); + + /** + * Gets the userCpuTime property: User CPU time. + * + * @return the userCpuTime value. + */ + String userCpuTime(); + + /** + * Gets the privilegedCpuTime property: Privileged CPU time. + * + * @return the privilegedCpuTime value. + */ + String privilegedCpuTime(); + + /** + * Gets the workingSet property: Working set. + * + * @return the workingSet value. + */ + Long workingSet(); + + /** + * Gets the peakWorkingSet property: Peak working set. + * + * @return the peakWorkingSet value. + */ + Long peakWorkingSet(); + + /** + * Gets the privateMemory property: Private memory size. + * + * @return the privateMemory value. + */ + Long privateMemory(); + + /** + * Gets the virtualMemory property: Virtual memory size. + * + * @return the virtualMemory value. + */ + Long virtualMemory(); + + /** + * Gets the peakVirtualMemory property: Peak virtual memory usage. + * + * @return the peakVirtualMemory value. + */ + Long peakVirtualMemory(); + + /** + * Gets the pagedSystemMemory property: Paged system memory. + * + * @return the pagedSystemMemory value. + */ + Long pagedSystemMemory(); + + /** + * Gets the nonPagedSystemMemory property: Non-paged system memory. + * + * @return the nonPagedSystemMemory value. + */ + Long nonPagedSystemMemory(); + + /** + * Gets the pagedMemory property: Paged memory. + * + * @return the pagedMemory value. + */ + Long pagedMemory(); + + /** + * Gets the peakPagedMemory property: Peak paged memory. + * + * @return the peakPagedMemory value. + */ + Long peakPagedMemory(); + + /** + * Gets the timestamp property: Time stamp. + * + * @return the timestamp value. + */ + OffsetDateTime timestamp(); + + /** + * Gets the environmentVariables property: List of environment variables. + * + * @return the environmentVariables value. + */ + Map environmentVariables(); + + /** + * Gets the isScmSite property: Is this the SCM site?. + * + * @return the isScmSite value. + */ + Boolean isScmSite(); + + /** + * Gets the isWebjob property: Is this a Web Job?. + * + * @return the isWebjob value. + */ + Boolean isWebjob(); + + /** + * Gets the description property: Description of process. + * + * @return the description value. + */ + String description(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ProcessInfoInner object. + * + * @return the inner object. + */ + ProcessInfoInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessInfoCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessInfoCollection.java new file mode 100644 index 0000000000000..b572a4debd060 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessInfoCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessInfoInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu process information elements. */ +@Fluent +public final class ProcessInfoCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessInfoCollection.class); + + /* + * 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; + + /** + * 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 ProcessInfoCollection object itself. + */ + public ProcessInfoCollection 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 ProcessInfoCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessModuleInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessModuleInfo.java new file mode 100644 index 0000000000000..34a147b523ec5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessModuleInfo.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessModuleInfoInner; + +/** An immutable client-side representation of ProcessModuleInfo. */ +public interface ProcessModuleInfo { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the baseAddress property: Base address. Used as module identifier in ARM resource URI. + * + * @return the baseAddress value. + */ + String baseAddress(); + + /** + * Gets the fileName property: File name. + * + * @return the fileName value. + */ + String fileName(); + + /** + * Gets the href property: HRef URI. + * + * @return the href value. + */ + String href(); + + /** + * Gets the filePath property: File path. + * + * @return the filePath value. + */ + String filePath(); + + /** + * Gets the moduleMemorySize property: Module memory size. + * + * @return the moduleMemorySize value. + */ + Integer moduleMemorySize(); + + /** + * Gets the fileVersion property: File version. + * + * @return the fileVersion value. + */ + String fileVersion(); + + /** + * Gets the fileDescription property: File description. + * + * @return the fileDescription value. + */ + String fileDescription(); + + /** + * Gets the product property: Product name. + * + * @return the product value. + */ + String product(); + + /** + * Gets the productVersion property: Product version. + * + * @return the productVersion value. + */ + String productVersion(); + + /** + * Gets the isDebug property: Is debug?. + * + * @return the isDebug value. + */ + Boolean isDebug(); + + /** + * Gets the language property: Module language (locale). + * + * @return the language value. + */ + String language(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ProcessModuleInfoInner object. + * + * @return the inner object. + */ + ProcessModuleInfoInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessModuleInfoCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessModuleInfoCollection.java new file mode 100644 index 0000000000000..a1534f62dc43f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessModuleInfoCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessModuleInfoInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu thread information elements. */ +@Fluent +public final class ProcessModuleInfoCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessModuleInfoCollection.class); + + /* + * 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; + + /** + * 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 ProcessModuleInfoCollection object itself. + */ + public ProcessModuleInfoCollection 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 ProcessModuleInfoCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessThreadInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessThreadInfo.java new file mode 100644 index 0000000000000..09441c21e39a7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessThreadInfo.java @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessThreadInfoInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of ProcessThreadInfo. */ +public interface ProcessThreadInfo { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the identifier property: Site extension ID. + * + * @return the identifier value. + */ + Integer identifier(); + + /** + * Gets the href property: HRef URI. + * + * @return the href value. + */ + String href(); + + /** + * Gets the process property: Process URI. + * + * @return the process value. + */ + String process(); + + /** + * Gets the startAddress property: Start address. + * + * @return the startAddress value. + */ + String startAddress(); + + /** + * Gets the currentPriority property: Current thread priority. + * + * @return the currentPriority value. + */ + Integer currentPriority(); + + /** + * Gets the priorityLevel property: Thread priority level. + * + * @return the priorityLevel value. + */ + String priorityLevel(); + + /** + * Gets the basePriority property: Base priority. + * + * @return the basePriority value. + */ + Integer basePriority(); + + /** + * Gets the startTime property: Start time. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the totalProcessorTime property: Total processor time. + * + * @return the totalProcessorTime value. + */ + String totalProcessorTime(); + + /** + * Gets the userProcessorTime property: User processor time. + * + * @return the userProcessorTime value. + */ + String userProcessorTime(); + + /** + * Gets the state property: Thread state. + * + * @return the state value. + */ + String state(); + + /** + * Gets the waitReason property: Wait reason. + * + * @return the waitReason value. + */ + String waitReason(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ProcessThreadInfoInner object. + * + * @return the inner object. + */ + ProcessThreadInfoInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessThreadInfoCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessThreadInfoCollection.java new file mode 100644 index 0000000000000..afa667b2dc011 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProcessThreadInfoCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ProcessThreadInfoInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu thread information elements. */ +@Fluent +public final class ProcessThreadInfoCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProcessThreadInfoCollection.class); + + /* + * 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; + + /** + * 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 ProcessThreadInfoCollection object itself. + */ + public ProcessThreadInfoCollection 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 ProcessThreadInfoCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProviderOsTypeSelected.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProviderOsTypeSelected.java new file mode 100644 index 0000000000000..3e2ac273ca74e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProviderOsTypeSelected.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProviderOsTypeSelected. */ +public final class ProviderOsTypeSelected extends ExpandableStringEnum { + /** Static value Windows for ProviderOsTypeSelected. */ + public static final ProviderOsTypeSelected WINDOWS = fromString("Windows"); + + /** Static value Linux for ProviderOsTypeSelected. */ + public static final ProviderOsTypeSelected LINUX = fromString("Linux"); + + /** Static value WindowsFunctions for ProviderOsTypeSelected. */ + public static final ProviderOsTypeSelected WINDOWS_FUNCTIONS = fromString("WindowsFunctions"); + + /** Static value LinuxFunctions for ProviderOsTypeSelected. */ + public static final ProviderOsTypeSelected LINUX_FUNCTIONS = fromString("LinuxFunctions"); + + /** Static value All for ProviderOsTypeSelected. */ + public static final ProviderOsTypeSelected ALL = fromString("All"); + + /** + * Creates or finds a ProviderOsTypeSelected from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProviderOsTypeSelected. + */ + @JsonCreator + public static ProviderOsTypeSelected fromString(String name) { + return fromString(name, ProviderOsTypeSelected.class); + } + + /** @return known ProviderOsTypeSelected values. */ + public static Collection values() { + return values(ProviderOsTypeSelected.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProviderStackOsType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProviderStackOsType.java new file mode 100644 index 0000000000000..bbe3ac23ac72f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProviderStackOsType.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProviderStackOsType. */ +public final class ProviderStackOsType extends ExpandableStringEnum { + /** Static value Windows for ProviderStackOsType. */ + public static final ProviderStackOsType WINDOWS = fromString("Windows"); + + /** Static value Linux for ProviderStackOsType. */ + public static final ProviderStackOsType LINUX = fromString("Linux"); + + /** Static value All for ProviderStackOsType. */ + public static final ProviderStackOsType ALL = fromString("All"); + + /** + * Creates or finds a ProviderStackOsType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProviderStackOsType. + */ + @JsonCreator + public static ProviderStackOsType fromString(String name) { + return fromString(name, ProviderStackOsType.class); + } + + /** @return known ProviderStackOsType values. */ + public static Collection values() { + return values(ProviderStackOsType.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Providers.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Providers.java new file mode 100644 index 0000000000000..59d0060e55375 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Providers.java @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of Providers. */ +public interface Providers { + /** + * Description for Get available application frameworks and their versions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Application Stacks. + */ + PagedIterable getAvailableStacks(); + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Application Stacks. + */ + PagedIterable getAvailableStacks(ProviderOsTypeSelected osTypeSelected, Context context); + + /** + * Description for Get available Function app frameworks and their versions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Function app Stacks. + */ + PagedIterable getFunctionAppStacks(); + + /** + * Description for Get available Function app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Function app Stacks. + */ + PagedIterable getFunctionAppStacks(ProviderStackOsType stackOsType, Context context); + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Function app Stacks. + */ + PagedIterable getFunctionAppStacksForLocation(String location); + + /** + * Description for Get available Function app frameworks and their versions for location. + * + * @param location Function App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Function app Stacks. + */ + PagedIterable getFunctionAppStacksForLocation( + String location, ProviderStackOsType stackOsType, Context context); + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Web app Stacks. + */ + PagedIterable getWebAppStacksForLocation(String location); + + /** + * Description for Get available Web app frameworks and their versions for location. + * + * @param location Web App stack location. + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Web app Stacks. + */ + PagedIterable getWebAppStacksForLocation( + String location, ProviderStackOsType stackOsType, Context context); + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + PagedIterable listOperations(); + + /** + * Description for Gets all available operations for the Microsoft.Web resource provider. Also exposes resource + * metric definitions. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Azure resource manager operation metadata. + */ + PagedIterable listOperations(Context context); + + /** + * Description for Get available Web app frameworks and their versions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Web app Stacks. + */ + PagedIterable getWebAppStacks(); + + /** + * Description for Get available Web app frameworks and their versions. + * + * @param stackOsType Stack OS Type. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Web app Stacks. + */ + PagedIterable getWebAppStacks(ProviderStackOsType stackOsType, Context context); + + /** + * Description for Get available application frameworks and their versions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Application Stacks. + */ + PagedIterable list(); + + /** + * Description for Get available application frameworks and their versions. + * + * @param osTypeSelected The osTypeSelected parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Application Stacks. + */ + PagedIterable list(ProviderOsTypeSelected osTypeSelected, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProvisioningState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProvisioningState.java new file mode 100644 index 0000000000000..ca0e5486de77a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProvisioningState.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ProvisioningState. */ +public enum ProvisioningState { + /** Enum value Succeeded. */ + SUCCEEDED("Succeeded"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Canceled. */ + CANCELED("Canceled"), + + /** Enum value InProgress. */ + IN_PROGRESS("InProgress"), + + /** Enum value Deleting. */ + DELETING("Deleting"); + + /** The actual serialized value for a ProvisioningState instance. */ + private final String value; + + ProvisioningState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ProvisioningState instance. + * + * @param value the serialized value to parse. + * @return the parsed ProvisioningState object, or null if unable to parse. + */ + @JsonCreator + public static ProvisioningState fromString(String value) { + ProvisioningState[] items = ProvisioningState.values(); + for (ProvisioningState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProxyOnlyResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProxyOnlyResource.java new file mode 100644 index 0000000000000..91e449df69af6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ProxyOnlyResource.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Azure proxy only resource. This resource is not tracked by Azure Resource Manager. */ +@Fluent +public class ProxyOnlyResource extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ProxyOnlyResource.class); + + /* + * Kind of resource. + */ + @JsonProperty(value = "kind") + private String kind; + + /** + * Get the kind property: Kind of resource. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of resource. + * + * @param kind the kind value to set. + * @return the ProxyOnlyResource object itself. + */ + public ProxyOnlyResource withKind(String kind) { + this.kind = kind; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificate.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificate.java new file mode 100644 index 0000000000000..fae34b037f802 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificate.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.PublicCertificateInner; + +/** An immutable client-side representation of PublicCertificate. */ +public interface PublicCertificate { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the blob property: Public Certificate byte array. + * + * @return the blob value. + */ + byte[] blob(); + + /** + * Gets the publicCertificateLocation property: Public Certificate Location. + * + * @return the publicCertificateLocation value. + */ + PublicCertificateLocation publicCertificateLocation(); + + /** + * Gets the thumbprint property: Certificate Thumbprint. + * + * @return the thumbprint value. + */ + String thumbprint(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.PublicCertificateInner object. + * + * @return the inner object. + */ + PublicCertificateInner innerModel(); + + /** The entirety of the PublicCertificate definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The PublicCertificate definition stages. */ + interface DefinitionStages { + /** The first stage of the PublicCertificate definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the PublicCertificate definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @return the next definition stage. + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + /** + * The stage of the PublicCertificate 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.WithKind, + DefinitionStages.WithBlob, + DefinitionStages.WithPublicCertificateLocation { + /** + * Executes the create request. + * + * @return the created resource. + */ + PublicCertificate create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PublicCertificate create(Context context); + } + /** The stage of the PublicCertificate definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the PublicCertificate definition allowing to specify blob. */ + interface WithBlob { + /** + * Specifies the blob property: Public Certificate byte array. + * + * @param blob Public Certificate byte array. + * @return the next definition stage. + */ + WithCreate withBlob(byte[] blob); + } + /** The stage of the PublicCertificate definition allowing to specify publicCertificateLocation. */ + interface WithPublicCertificateLocation { + /** + * Specifies the publicCertificateLocation property: Public Certificate Location. + * + * @param publicCertificateLocation Public Certificate Location. + * @return the next definition stage. + */ + WithCreate withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation); + } + } + /** + * Begins update for the PublicCertificate resource. + * + * @return the stage of resource update. + */ + PublicCertificate.Update update(); + + /** The template for PublicCertificate update. */ + interface Update extends UpdateStages.WithKind, UpdateStages.WithBlob, UpdateStages.WithPublicCertificateLocation { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PublicCertificate apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PublicCertificate apply(Context context); + } + /** The PublicCertificate update stages. */ + interface UpdateStages { + /** The stage of the PublicCertificate update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the PublicCertificate update allowing to specify blob. */ + interface WithBlob { + /** + * Specifies the blob property: Public Certificate byte array. + * + * @param blob Public Certificate byte array. + * @return the next definition stage. + */ + Update withBlob(byte[] blob); + } + /** The stage of the PublicCertificate update allowing to specify publicCertificateLocation. */ + interface WithPublicCertificateLocation { + /** + * Specifies the publicCertificateLocation property: Public Certificate Location. + * + * @param publicCertificateLocation Public Certificate Location. + * @return the next definition stage. + */ + Update withPublicCertificateLocation(PublicCertificateLocation publicCertificateLocation); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PublicCertificate refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PublicCertificate refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificateCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificateCollection.java new file mode 100644 index 0000000000000..0aea984facdea --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificateCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.PublicCertificateInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of public certificates. */ +@Fluent +public final class PublicCertificateCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PublicCertificateCollection.class); + + /* + * 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; + + /** + * 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 PublicCertificateCollection object itself. + */ + public PublicCertificateCollection 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 PublicCertificateCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificateLocation.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificateLocation.java new file mode 100644 index 0000000000000..2540fbe5e7141 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublicCertificateLocation.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for PublicCertificateLocation. */ +public enum PublicCertificateLocation { + /** Enum value CurrentUserMy. */ + CURRENT_USER_MY("CurrentUserMy"), + + /** Enum value LocalMachineMy. */ + LOCAL_MACHINE_MY("LocalMachineMy"), + + /** Enum value Unknown. */ + UNKNOWN("Unknown"); + + /** The actual serialized value for a PublicCertificateLocation instance. */ + private final String value; + + PublicCertificateLocation(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a PublicCertificateLocation instance. + * + * @param value the serialized value to parse. + * @return the parsed PublicCertificateLocation object, or null if unable to parse. + */ + @JsonCreator + public static PublicCertificateLocation fromString(String value) { + PublicCertificateLocation[] items = PublicCertificateLocation.values(); + for (PublicCertificateLocation item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublishingCredentialsPoliciesCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublishingCredentialsPoliciesCollection.java new file mode 100644 index 0000000000000..bfb56d30d68db --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublishingCredentialsPoliciesCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Publishing Credentials Policies entity collection ARM resource. */ +@Fluent +public final class PublishingCredentialsPoliciesCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(PublishingCredentialsPoliciesCollection.class); + + /* + * 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; + + /** + * 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 PublishingCredentialsPoliciesCollection object itself. + */ + public PublishingCredentialsPoliciesCollection 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 PublishingCredentialsPoliciesCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublishingProfileFormat.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublishingProfileFormat.java new file mode 100644 index 0000000000000..00d755d6f58e1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PublishingProfileFormat.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for PublishingProfileFormat. */ +public final class PublishingProfileFormat extends ExpandableStringEnum { + /** Static value FileZilla3 for PublishingProfileFormat. */ + public static final PublishingProfileFormat FILE_ZILLA3 = fromString("FileZilla3"); + + /** Static value WebDeploy for PublishingProfileFormat. */ + public static final PublishingProfileFormat WEB_DEPLOY = fromString("WebDeploy"); + + /** Static value Ftp for PublishingProfileFormat. */ + public static final PublishingProfileFormat FTP = fromString("Ftp"); + + /** + * Creates or finds a PublishingProfileFormat from its string representation. + * + * @param name a name to look for. + * @return the corresponding PublishingProfileFormat. + */ + @JsonCreator + public static PublishingProfileFormat fromString(String name) { + return fromString(name, PublishingProfileFormat.class); + } + + /** @return known PublishingProfileFormat values. */ + public static Collection values() { + return values(PublishingProfileFormat.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PushSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PushSettings.java new file mode 100644 index 0000000000000..b0ef28b62dbd0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/PushSettings.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner; + +/** An immutable client-side representation of PushSettings. */ +public interface PushSettings { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the isPushEnabled property: Gets or sets a flag indicating whether the Push endpoint is enabled. + * + * @return the isPushEnabled value. + */ + boolean isPushEnabled(); + + /** + * Gets the tagWhitelistJson property: Gets or sets a JSON string containing a list of tags that are whitelisted for + * use by the push registration endpoint. + * + * @return the tagWhitelistJson value. + */ + String tagWhitelistJson(); + + /** + * Gets the tagsRequiringAuth property: Gets or sets a JSON string containing a list of tags that require user + * authentication to be used in the push registration endpoint. Tags can consist of alphanumeric characters and the + * following: '_', '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler. + * + * @return the tagsRequiringAuth value. + */ + String tagsRequiringAuth(); + + /** + * Gets the dynamicTagsJson property: Gets or sets a JSON string containing a list of dynamic tags that will be + * evaluated from user claims in the push registration endpoint. + * + * @return the dynamicTagsJson value. + */ + String dynamicTagsJson(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner object. + * + * @return the inner object. + */ + PushSettingsInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueryUtterancesResult.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueryUtterancesResult.java new file mode 100644 index 0000000000000..994edb3b98a9f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueryUtterancesResult.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Result for utterances query. */ +@Fluent +public final class QueryUtterancesResult { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryUtterancesResult.class); + + /* + * A sample utterance. + */ + @JsonProperty(value = "sampleUtterance") + private SampleUtterance sampleUtterance; + + /* + * Score of a sample utterance. + */ + @JsonProperty(value = "score") + private Float score; + + /** + * Get the sampleUtterance property: A sample utterance. + * + * @return the sampleUtterance value. + */ + public SampleUtterance sampleUtterance() { + return this.sampleUtterance; + } + + /** + * Set the sampleUtterance property: A sample utterance. + * + * @param sampleUtterance the sampleUtterance value to set. + * @return the QueryUtterancesResult object itself. + */ + public QueryUtterancesResult withSampleUtterance(SampleUtterance sampleUtterance) { + this.sampleUtterance = sampleUtterance; + return this; + } + + /** + * Get the score property: Score of a sample utterance. + * + * @return the score value. + */ + public Float score() { + return this.score; + } + + /** + * Set the score property: Score of a sample utterance. + * + * @param score the score value to set. + * @return the QueryUtterancesResult object itself. + */ + public QueryUtterancesResult withScore(Float score) { + this.score = score; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sampleUtterance() != null) { + sampleUtterance().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueryUtterancesResults.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueryUtterancesResults.java new file mode 100644 index 0000000000000..4ad16eece523a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueryUtterancesResults.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Suggested utterances where the detector can be applicable. */ +@Fluent +public final class QueryUtterancesResults { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueryUtterancesResults.class); + + /* + * Search Query. + */ + @JsonProperty(value = "query") + private String query; + + /* + * Array of utterance results for search query. + */ + @JsonProperty(value = "results") + private List results; + + /** + * Get the query property: Search Query. + * + * @return the query value. + */ + public String query() { + return this.query; + } + + /** + * Set the query property: Search Query. + * + * @param query the query value to set. + * @return the QueryUtterancesResults object itself. + */ + public QueryUtterancesResults withQuery(String query) { + this.query = query; + return this; + } + + /** + * Get the results property: Array of utterance results for search query. + * + * @return the results value. + */ + public List results() { + return this.results; + } + + /** + * Set the results property: Array of utterance results for search query. + * + * @param results the results value to set. + * @return the QueryUtterancesResults object itself. + */ + public QueryUtterancesResults withResults(List results) { + this.results = results; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (results() != null) { + results().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueueScaleRule.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueueScaleRule.java new file mode 100644 index 0000000000000..ca48c43fb81e1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/QueueScaleRule.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App container Azure Queue based scaling rule. */ +@Fluent +public final class QueueScaleRule { + @JsonIgnore private final ClientLogger logger = new ClientLogger(QueueScaleRule.class); + + /* + * Queue name. + */ + @JsonProperty(value = "queueName") + private String queueName; + + /* + * Queue length. + */ + @JsonProperty(value = "queueLength") + private Integer queueLength; + + /* + * Authentication secrets for the queue scale rule. + */ + @JsonProperty(value = "auth") + private List auth; + + /** + * Get the queueName property: Queue name. + * + * @return the queueName value. + */ + public String queueName() { + return this.queueName; + } + + /** + * Set the queueName property: Queue name. + * + * @param queueName the queueName value to set. + * @return the QueueScaleRule object itself. + */ + public QueueScaleRule withQueueName(String queueName) { + this.queueName = queueName; + return this; + } + + /** + * Get the queueLength property: Queue length. + * + * @return the queueLength value. + */ + public Integer queueLength() { + return this.queueLength; + } + + /** + * Set the queueLength property: Queue length. + * + * @param queueLength the queueLength value to set. + * @return the QueueScaleRule object itself. + */ + public QueueScaleRule withQueueLength(Integer queueLength) { + this.queueLength = queueLength; + return this; + } + + /** + * Get the auth property: Authentication secrets for the queue scale rule. + * + * @return the auth value. + */ + public List auth() { + return this.auth; + } + + /** + * Set the auth property: Authentication secrets for the queue scale rule. + * + * @param auth the auth value to set. + * @return the QueueScaleRule object itself. + */ + public QueueScaleRule 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RampUpRule.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RampUpRule.java new file mode 100644 index 0000000000000..53224f80542d3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RampUpRule.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Routing rules for ramp up testing. This rule allows to redirect static traffic % to a slot or to gradually change + * routing % based on performance. + */ +@Fluent +public final class RampUpRule { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RampUpRule.class); + + /* + * Hostname of a slot to which the traffic will be redirected if decided + * to. E.g. myapp-stage.azurewebsites.net. + */ + @JsonProperty(value = "actionHostName") + private String actionHostname; + + /* + * Percentage of the traffic which will be redirected to + * ActionHostName. + */ + @JsonProperty(value = "reroutePercentage") + private Double reroutePercentage; + + /* + * In auto ramp up scenario this is the step to add/remove from + * ReroutePercentage until it reaches + * \nMinReroutePercentage or + * MaxReroutePercentage. Site metrics are checked every N + * minutes specified in ChangeIntervalInMinutes.\nCustom + * decision algorithm + * can be provided in TiPCallback site extension which URL can be specified + * in ChangeDecisionCallbackUrl. + */ + @JsonProperty(value = "changeStep") + private Double changeStep; + + /* + * Specifies interval in minutes to reevaluate ReroutePercentage. + */ + @JsonProperty(value = "changeIntervalInMinutes") + private Integer changeIntervalInMinutes; + + /* + * Specifies lower boundary above which ReroutePercentage will stay. + */ + @JsonProperty(value = "minReroutePercentage") + private Double minReroutePercentage; + + /* + * Specifies upper boundary below which ReroutePercentage will stay. + */ + @JsonProperty(value = "maxReroutePercentage") + private Double maxReroutePercentage; + + /* + * Custom decision algorithm can be provided in TiPCallback site extension + * which URL can be specified. See TiPCallback site extension for the + * scaffold and contracts. + * https://www.siteextensions.net/packages/TiPCallback/ + */ + @JsonProperty(value = "changeDecisionCallbackUrl") + private String changeDecisionCallbackUrl; + + /* + * Name of the routing rule. The recommended name would be to point to the + * slot which will receive the traffic in the experiment. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Get the actionHostname property: Hostname of a slot to which the traffic will be redirected if decided to. E.g. + * myapp-stage.azurewebsites.net. + * + * @return the actionHostname value. + */ + public String actionHostname() { + return this.actionHostname; + } + + /** + * Set the actionHostname property: Hostname of a slot to which the traffic will be redirected if decided to. E.g. + * myapp-stage.azurewebsites.net. + * + * @param actionHostname the actionHostname value to set. + * @return the RampUpRule object itself. + */ + public RampUpRule withActionHostname(String actionHostname) { + this.actionHostname = actionHostname; + return this; + } + + /** + * Get the reroutePercentage property: Percentage of the traffic which will be redirected to + * <code>ActionHostName</code>. + * + * @return the reroutePercentage value. + */ + public Double reroutePercentage() { + return this.reroutePercentage; + } + + /** + * Set the reroutePercentage property: Percentage of the traffic which will be redirected to + * <code>ActionHostName</code>. + * + * @param reroutePercentage the reroutePercentage value to set. + * @return the RampUpRule object itself. + */ + public RampUpRule withReroutePercentage(Double reroutePercentage) { + this.reroutePercentage = reroutePercentage; + return this; + } + + /** + * Get the changeStep property: In auto ramp up scenario this is the step to add/remove from + * <code>ReroutePercentage</code> until it reaches \n<code>MinReroutePercentage</code> or + * <code>MaxReroutePercentage</code>. Site metrics are checked every N minutes specified in + * <code>ChangeIntervalInMinutes</code>.\nCustom decision algorithm can be provided in TiPCallback site + * extension which URL can be specified in <code>ChangeDecisionCallbackUrl</code>. + * + * @return the changeStep value. + */ + public Double changeStep() { + return this.changeStep; + } + + /** + * Set the changeStep property: In auto ramp up scenario this is the step to add/remove from + * <code>ReroutePercentage</code> until it reaches \n<code>MinReroutePercentage</code> or + * <code>MaxReroutePercentage</code>. Site metrics are checked every N minutes specified in + * <code>ChangeIntervalInMinutes</code>.\nCustom decision algorithm can be provided in TiPCallback site + * extension which URL can be specified in <code>ChangeDecisionCallbackUrl</code>. + * + * @param changeStep the changeStep value to set. + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeStep(Double changeStep) { + this.changeStep = changeStep; + return this; + } + + /** + * Get the changeIntervalInMinutes property: Specifies interval in minutes to reevaluate ReroutePercentage. + * + * @return the changeIntervalInMinutes value. + */ + public Integer changeIntervalInMinutes() { + return this.changeIntervalInMinutes; + } + + /** + * Set the changeIntervalInMinutes property: Specifies interval in minutes to reevaluate ReroutePercentage. + * + * @param changeIntervalInMinutes the changeIntervalInMinutes value to set. + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeIntervalInMinutes(Integer changeIntervalInMinutes) { + this.changeIntervalInMinutes = changeIntervalInMinutes; + return this; + } + + /** + * Get the minReroutePercentage property: Specifies lower boundary above which ReroutePercentage will stay. + * + * @return the minReroutePercentage value. + */ + public Double minReroutePercentage() { + return this.minReroutePercentage; + } + + /** + * Set the minReroutePercentage property: Specifies lower boundary above which ReroutePercentage will stay. + * + * @param minReroutePercentage the minReroutePercentage value to set. + * @return the RampUpRule object itself. + */ + public RampUpRule withMinReroutePercentage(Double minReroutePercentage) { + this.minReroutePercentage = minReroutePercentage; + return this; + } + + /** + * Get the maxReroutePercentage property: Specifies upper boundary below which ReroutePercentage will stay. + * + * @return the maxReroutePercentage value. + */ + public Double maxReroutePercentage() { + return this.maxReroutePercentage; + } + + /** + * Set the maxReroutePercentage property: Specifies upper boundary below which ReroutePercentage will stay. + * + * @param maxReroutePercentage the maxReroutePercentage value to set. + * @return the RampUpRule object itself. + */ + public RampUpRule withMaxReroutePercentage(Double maxReroutePercentage) { + this.maxReroutePercentage = maxReroutePercentage; + return this; + } + + /** + * Get the changeDecisionCallbackUrl property: Custom decision algorithm can be provided in TiPCallback site + * extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts. + * https://www.siteextensions.net/packages/TiPCallback/. + * + * @return the changeDecisionCallbackUrl value. + */ + public String changeDecisionCallbackUrl() { + return this.changeDecisionCallbackUrl; + } + + /** + * Set the changeDecisionCallbackUrl property: Custom decision algorithm can be provided in TiPCallback site + * extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts. + * https://www.siteextensions.net/packages/TiPCallback/. + * + * @param changeDecisionCallbackUrl the changeDecisionCallbackUrl value to set. + * @return the RampUpRule object itself. + */ + public RampUpRule withChangeDecisionCallbackUrl(String changeDecisionCallbackUrl) { + this.changeDecisionCallbackUrl = changeDecisionCallbackUrl; + return this; + } + + /** + * Get the name property: Name of the routing rule. The recommended name would be to point to the slot which will + * receive the traffic in the experiment. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the routing rule. The recommended name would be to point to the slot which will + * receive the traffic in the experiment. + * + * @param name the name value to set. + * @return the RampUpRule object itself. + */ + public RampUpRule withName(String name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Recommendation.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Recommendation.java new file mode 100644 index 0000000000000..253f86a3f11a9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Recommendation.java @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** An immutable client-side representation of Recommendation. */ +public interface Recommendation { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the creationTime property: Timestamp when this instance was created. + * + * @return the creationTime value. + */ + OffsetDateTime creationTime(); + + /** + * Gets the recommendationId property: A GUID value that each recommendation object is associated with. + * + * @return the recommendationId value. + */ + UUID recommendationId(); + + /** + * Gets the resourceId property: Full ARM resource ID string that this recommendation object is associated with. + * + * @return the resourceId value. + */ + String resourceId(); + + /** + * Gets the resourceScope property: Name of a resource type this recommendation applies, e.g. Subscription, + * ServerFarm, Site. + * + * @return the resourceScope value. + */ + ResourceScopeType resourceScope(); + + /** + * Gets the ruleName property: Unique name of the rule. + * + * @return the ruleName value. + */ + String ruleName(); + + /** + * Gets the displayName property: UI friendly name of the rule (may not be unique). + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the message property: Recommendation text. + * + * @return the message value. + */ + String message(); + + /** + * Gets the level property: Level indicating how critical this recommendation can impact. + * + * @return the level value. + */ + NotificationLevel level(); + + /** + * Gets the channels property: List of channels that this recommendation can apply. + * + * @return the channels value. + */ + Channels channels(); + + /** + * Gets the categoryTags property: The list of category tags that this recommendation belongs to. + * + * @return the categoryTags value. + */ + List categoryTags(); + + /** + * Gets the actionName property: Name of action recommended by this object. + * + * @return the actionName value. + */ + String actionName(); + + /** + * Gets the enabled property: True if this recommendation is still valid (i.e. "actionable"). False if it is + * invalid. + * + * @return the enabled value. + */ + Integer enabled(); + + /** + * Gets the states property: The list of states of this recommendation. If it's null then it should be considered + * "Active". + * + * @return the states value. + */ + List states(); + + /** + * Gets the startTime property: The beginning time in UTC of a range that the recommendation refers to. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the endTime property: The end time in UTC of a range that the recommendation refers to. + * + * @return the endTime value. + */ + OffsetDateTime endTime(); + + /** + * Gets the nextNotificationTime property: When to notify this recommendation next in UTC. Null means that this will + * never be notified anymore. + * + * @return the nextNotificationTime value. + */ + OffsetDateTime nextNotificationTime(); + + /** + * Gets the notificationExpirationTime property: Date and time in UTC when this notification expires. + * + * @return the notificationExpirationTime value. + */ + OffsetDateTime notificationExpirationTime(); + + /** + * Gets the notifiedTime property: Last timestamp in UTC this instance was actually notified. Null means that this + * recommendation hasn't been notified yet. + * + * @return the notifiedTime value. + */ + OffsetDateTime notifiedTime(); + + /** + * Gets the score property: A metric value measured by the rule. + * + * @return the score value. + */ + Double score(); + + /** + * Gets the isDynamic property: True if this is associated with a dynamically added rule. + * + * @return the isDynamic value. + */ + Boolean isDynamic(); + + /** + * Gets the extensionName property: Extension name of the portal if exists. + * + * @return the extensionName value. + */ + String extensionName(); + + /** + * Gets the bladeName property: Deep link to a blade on the portal. + * + * @return the bladeName value. + */ + String bladeName(); + + /** + * Gets the forwardLink property: Forward link to an external document associated with the rule. + * + * @return the forwardLink value. + */ + String forwardLink(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationInner object. + * + * @return the inner object. + */ + RecommendationInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RecommendationCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RecommendationCollection.java new file mode 100644 index 0000000000000..af6a9184e3290 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RecommendationCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of recommendations. */ +@Fluent +public final class RecommendationCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendationCollection.class); + + /* + * 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; + + /** + * 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 RecommendationCollection object itself. + */ + public RecommendationCollection 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 RecommendationCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RecommendationRule.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RecommendationRule.java new file mode 100644 index 0000000000000..b001f247e27fa --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RecommendationRule.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationRuleInner; +import java.util.List; +import java.util.UUID; + +/** An immutable client-side representation of RecommendationRule. */ +public interface RecommendationRule { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the recommendationName property: Unique name of the rule. + * + * @return the recommendationName value. + */ + String recommendationName(); + + /** + * Gets the displayName property: UI friendly name of the rule. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the message property: Localized name of the rule (Good for UI). + * + * @return the message value. + */ + String message(); + + /** + * Gets the recommendationId property: Recommendation ID of an associated recommendation object tied to the rule, if + * exists. If such an object doesn't exist, it is set to null. + * + * @return the recommendationId value. + */ + UUID recommendationId(); + + /** + * Gets the description property: Localized detailed description of the rule. + * + * @return the description value. + */ + String description(); + + /** + * Gets the actionName property: Name of action that is recommended by this rule in string. + * + * @return the actionName value. + */ + String actionName(); + + /** + * Gets the level property: Level of impact indicating how critical this rule is. + * + * @return the level value. + */ + NotificationLevel level(); + + /** + * Gets the channels property: List of available channels that this rule applies. + * + * @return the channels value. + */ + Channels channels(); + + /** + * Gets the categoryTags property: The list of category tags that this recommendation rule belongs to. + * + * @return the categoryTags value. + */ + List categoryTags(); + + /** + * Gets the isDynamic property: True if this is associated with a dynamically added rule. + * + * @return the isDynamic value. + */ + Boolean isDynamic(); + + /** + * Gets the extensionName property: Extension name of the portal if exists. Applicable to dynamic rule only. + * + * @return the extensionName value. + */ + String extensionName(); + + /** + * Gets the bladeName property: Deep link to a blade on the portal. Applicable to dynamic rule only. + * + * @return the bladeName value. + */ + String bladeName(); + + /** + * Gets the forwardLink property: Forward link to an external document associated with the rule. Applicable to + * dynamic rule only. + * + * @return the forwardLink value. + */ + String forwardLink(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.RecommendationRuleInner object. + * + * @return the inner object. + */ + RecommendationRuleInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Recommendations.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Recommendations.java new file mode 100644 index 0000000000000..99d9bcb42aced --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Recommendations.java @@ -0,0 +1,468 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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 Recommendations. */ +public interface Recommendations { + /** + * Description for List all recommendations for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable list(); + + /** + * Description for List all recommendations for a subscription. + * + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable list(Boolean featured, String filter, Context context); + + /** + * Description for Reset all recommendation opt-out settings for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.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 resetAllFilters(); + + /** + * Description for Reset all recommendation opt-out settings for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resetAllFiltersWithResponse(Context context); + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableRecommendationForSubscription(String name); + + /** + * Description for Disables the specified rule so it will not apply to a subscription in the future. + * + * @param name Rule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response disableRecommendationForSubscriptionWithResponse(String name, Context context); + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable listHistoryForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName); + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable listHistoryForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, Boolean expiredOnly, String filter, Context context); + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable listRecommendedRulesForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName); + + /** + * Description for Get all recommendations for a hosting environment. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable listRecommendedRulesForHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, Boolean featured, String filter, Context context); + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableAllForHostingEnvironment( + String resourceGroupName, String environmentName, String hostingEnvironmentName); + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response disableAllForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context); + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetAllFiltersForHostingEnvironment( + String resourceGroupName, String environmentName, String hostingEnvironmentName); + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Name of the app. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resetAllFiltersForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String hostingEnvironmentName, Context context); + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + RecommendationRule getRuleDetailsByHostingEnvironment( + String resourceGroupName, String hostingEnvironmentName, String name); + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param hostingEnvironmentName Name of the hosting environment. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + Response getRuleDetailsByHostingEnvironmentWithResponse( + String resourceGroupName, + String hostingEnvironmentName, + String name, + Boolean updateSeen, + String recommendationId, + Context context); + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableRecommendationForHostingEnvironment( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName); + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param environmentName Site name. + * @param name Rule name. + * @param hostingEnvironmentName The hostingEnvironmentName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response disableRecommendationForHostingEnvironmentWithResponse( + String resourceGroupName, String environmentName, String name, String hostingEnvironmentName, Context context); + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable listHistoryForWebApp(String resourceGroupName, String siteName); + + /** + * Description for Get past recommendations for an app, optionally specified by the time range. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param expiredOnly Specify <code>false</code> to return all recommendations. The default is + * <code>true</code>, which returns only expired recommendations. + * @param filter Filter is specified by using OData syntax. Example: $filter=channel eq 'Api' or channel eq + * 'Notification' and startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[PT1H|PT1M|P1D]. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable listHistoryForWebApp( + String resourceGroupName, String siteName, Boolean expiredOnly, String filter, Context context); + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable listRecommendedRulesForWebApp(String resourceGroupName, String siteName); + + /** + * Description for Get all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param featured Specify <code>true</code> to return only the most critical recommendations. The + * default is <code>false</code>, which returns all recommendations. + * @param filter Return only channels specified in the filter. Filter is specified by using OData syntax. Example: + * $filter=channel eq 'Api' or channel eq 'Notification'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 recommendations. + */ + PagedIterable listRecommendedRulesForWebApp( + String resourceGroupName, String siteName, Boolean featured, String filter, Context context); + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableAllForWebApp(String resourceGroupName, String siteName); + + /** + * Description for Disable all recommendations for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response disableAllForWebAppWithResponse(String resourceGroupName, String siteName, Context context); + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetAllFiltersForWebApp(String resourceGroupName, String siteName); + + /** + * Description for Reset all recommendation opt-out settings for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resetAllFiltersForWebAppWithResponse(String resourceGroupName, String siteName, Context context); + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + RecommendationRule getRuleDetailsByWebApp(String resourceGroupName, String siteName, String name); + + /** + * Description for Get a recommendation rule for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Name of the app. + * @param name Name of the recommendation. + * @param updateSeen Specify <code>true</code> to update the last-seen timestamp of the recommendation + * object. + * @param recommendationId The GUID of the recommendation object if you query an expired one. You don't need to + * specify it to query an active entry. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents a recommendation rule that the recommendation engine can perform. + */ + Response getRuleDetailsByWebAppWithResponse( + String resourceGroupName, + String siteName, + String name, + Boolean updateSeen, + String recommendationId, + Context context); + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 disableRecommendationForSite(String resourceGroupName, String siteName, String name); + + /** + * Description for Disables the specific rule for a web site permanently. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param siteName Site name. + * @param name Rule name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response disableRecommendationForSiteWithResponse( + String resourceGroupName, String siteName, String name, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RedundancyMode.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RedundancyMode.java new file mode 100644 index 0000000000000..cd1eab60c8b87 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RedundancyMode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for RedundancyMode. */ +public enum RedundancyMode { + /** Enum value None. */ + NONE("None"), + + /** Enum value Manual. */ + MANUAL("Manual"), + + /** Enum value Failover. */ + FAILOVER("Failover"), + + /** Enum value ActiveActive. */ + ACTIVE_ACTIVE("ActiveActive"), + + /** Enum value GeoRedundant. */ + GEO_REDUNDANT("GeoRedundant"); + + /** The actual serialized value for a RedundancyMode instance. */ + private final String value; + + RedundancyMode(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RedundancyMode instance. + * + * @param value the serialized value to parse. + * @return the parsed RedundancyMode object, or null if unable to parse. + */ + @JsonCreator + public static RedundancyMode fromString(String value) { + RedundancyMode[] items = RedundancyMode.values(); + for (RedundancyMode item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RegistryCredentials.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RegistryCredentials.java new file mode 100644 index 0000000000000..76ca9fd291e25 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RegistryCredentials.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container App Private Registry. */ +@Fluent +public final class RegistryCredentials { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RegistryCredentials.class); + + /* + * Container Registry Server + */ + @JsonProperty(value = "server") + private String server; + + /* + * Container Registry Username + */ + @JsonProperty(value = "username") + private String username; + + /* + * The name of the Secret that contains the registry login password + */ + @JsonProperty(value = "passwordSecretRef") + private String passwordSecretRef; + + /** + * Get the server property: Container Registry Server. + * + * @return the server value. + */ + public String server() { + return this.server; + } + + /** + * Set the server property: Container Registry Server. + * + * @param server the server value to set. + * @return the RegistryCredentials object itself. + */ + public RegistryCredentials withServer(String server) { + this.server = server; + return this; + } + + /** + * Get the username property: Container Registry Username. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Container Registry Username. + * + * @param username the username value to set. + * @return the RegistryCredentials object itself. + */ + public RegistryCredentials withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the passwordSecretRef property: The name of the Secret that contains the registry login password. + * + * @return the passwordSecretRef value. + */ + public String passwordSecretRef() { + return this.passwordSecretRef; + } + + /** + * Set the passwordSecretRef property: The name of the Secret that contains the registry login password. + * + * @param passwordSecretRef the passwordSecretRef value to set. + * @return the RegistryCredentials object itself. + */ + public RegistryCredentials withPasswordSecretRef(String passwordSecretRef) { + this.passwordSecretRef = passwordSecretRef; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ReissueCertificateOrderRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ReissueCertificateOrderRequest.java new file mode 100644 index 0000000000000..ee5c7df6bad6f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ReissueCertificateOrderRequest.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ReissueCertificateOrderRequestProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Class representing certificate reissue request. */ +@Fluent +public final class ReissueCertificateOrderRequest extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ReissueCertificateOrderRequest.class); + + /* + * ReissueCertificateOrderRequest resource specific properties + */ + @JsonProperty(value = "properties") + private ReissueCertificateOrderRequestProperties innerProperties; + + /** + * Get the innerProperties property: ReissueCertificateOrderRequest resource specific properties. + * + * @return the innerProperties value. + */ + private ReissueCertificateOrderRequestProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public ReissueCertificateOrderRequest withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the keySize property: Certificate Key Size. + * + * @return the keySize value. + */ + public Integer keySize() { + return this.innerProperties() == null ? null : this.innerProperties().keySize(); + } + + /** + * Set the keySize property: Certificate Key Size. + * + * @param keySize the keySize value to set. + * @return the ReissueCertificateOrderRequest object itself. + */ + public ReissueCertificateOrderRequest withKeySize(Integer keySize) { + if (this.innerProperties() == null) { + this.innerProperties = new ReissueCertificateOrderRequestProperties(); + } + this.innerProperties().withKeySize(keySize); + return this; + } + + /** + * Get the delayExistingRevokeInHours property: Delay in hours to revoke existing certificate after the new + * certificate is issued. + * + * @return the delayExistingRevokeInHours value. + */ + public Integer delayExistingRevokeInHours() { + return this.innerProperties() == null ? null : this.innerProperties().delayExistingRevokeInHours(); + } + + /** + * Set the delayExistingRevokeInHours property: Delay in hours to revoke existing certificate after the new + * certificate is issued. + * + * @param delayExistingRevokeInHours the delayExistingRevokeInHours value to set. + * @return the ReissueCertificateOrderRequest object itself. + */ + public ReissueCertificateOrderRequest withDelayExistingRevokeInHours(Integer delayExistingRevokeInHours) { + if (this.innerProperties() == null) { + this.innerProperties = new ReissueCertificateOrderRequestProperties(); + } + this.innerProperties().withDelayExistingRevokeInHours(delayExistingRevokeInHours); + return this; + } + + /** + * Get the csr property: Csr to be used for re-key operation. + * + * @return the csr value. + */ + public String csr() { + return this.innerProperties() == null ? null : this.innerProperties().csr(); + } + + /** + * Set the csr property: Csr to be used for re-key operation. + * + * @param csr the csr value to set. + * @return the ReissueCertificateOrderRequest object itself. + */ + public ReissueCertificateOrderRequest withCsr(String csr) { + if (this.innerProperties() == null) { + this.innerProperties = new ReissueCertificateOrderRequestProperties(); + } + this.innerProperties().withCsr(csr); + return this; + } + + /** + * Get the isPrivateKeyExternal property: Should we change the ASC type (from managed private key to external + * private key and vice versa). + * + * @return the isPrivateKeyExternal value. + */ + public Boolean isPrivateKeyExternal() { + return this.innerProperties() == null ? null : this.innerProperties().isPrivateKeyExternal(); + } + + /** + * Set the isPrivateKeyExternal property: Should we change the ASC type (from managed private key to external + * private key and vice versa). + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set. + * @return the ReissueCertificateOrderRequest object itself. + */ + public ReissueCertificateOrderRequest withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + if (this.innerProperties() == null) { + this.innerProperties = new ReissueCertificateOrderRequestProperties(); + } + this.innerProperties().withIsPrivateKeyExternal(isPrivateKeyExternal); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RelayServiceConnectionEntity.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RelayServiceConnectionEntity.java new file mode 100644 index 0000000000000..6c28390e30a1c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RelayServiceConnectionEntity.java @@ -0,0 +1,355 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.RelayServiceConnectionEntityInner; + +/** An immutable client-side representation of RelayServiceConnectionEntity. */ +public interface RelayServiceConnectionEntity { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the entityName property: The entityName property. + * + * @return the entityName value. + */ + String entityName(); + + /** + * Gets the entityConnectionString property: The entityConnectionString property. + * + * @return the entityConnectionString value. + */ + String entityConnectionString(); + + /** + * Gets the resourceType property: The resourceType property. + * + * @return the resourceType value. + */ + String resourceType(); + + /** + * Gets the resourceConnectionString property: The resourceConnectionString property. + * + * @return the resourceConnectionString value. + */ + String resourceConnectionString(); + + /** + * Gets the hostname property: The hostname property. + * + * @return the hostname value. + */ + String hostname(); + + /** + * Gets the port property: The port property. + * + * @return the port value. + */ + Integer port(); + + /** + * Gets the biztalkUri property: The biztalkUri property. + * + * @return the biztalkUri value. + */ + String biztalkUri(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.RelayServiceConnectionEntityInner + * object. + * + * @return the inner object. + */ + RelayServiceConnectionEntityInner innerModel(); + + /** The entirety of the RelayServiceConnectionEntity definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The RelayServiceConnectionEntity definition stages. */ + interface DefinitionStages { + /** The first stage of the RelayServiceConnectionEntity definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @return the next definition stage. + */ + WithCreate withExistingSite(String resourceGroupName, String name); + } + /** + * The stage of the RelayServiceConnectionEntity 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.WithKind, + DefinitionStages.WithEntityName, + DefinitionStages.WithEntityConnectionString, + DefinitionStages.WithResourceType, + DefinitionStages.WithResourceConnectionString, + DefinitionStages.WithHostname, + DefinitionStages.WithPort, + DefinitionStages.WithBiztalkUri { + /** + * Executes the create request. + * + * @return the created resource. + */ + RelayServiceConnectionEntity create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + RelayServiceConnectionEntity create(Context context); + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify entityName. */ + interface WithEntityName { + /** + * Specifies the entityName property: The entityName property.. + * + * @param entityName The entityName property. + * @return the next definition stage. + */ + WithCreate withEntityName(String entityName); + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify entityConnectionString. */ + interface WithEntityConnectionString { + /** + * Specifies the entityConnectionString property: The entityConnectionString property.. + * + * @param entityConnectionString The entityConnectionString property. + * @return the next definition stage. + */ + WithCreate withEntityConnectionString(String entityConnectionString); + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify resourceType. */ + interface WithResourceType { + /** + * Specifies the resourceType property: The resourceType property.. + * + * @param resourceType The resourceType property. + * @return the next definition stage. + */ + WithCreate withResourceType(String resourceType); + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify resourceConnectionString. */ + interface WithResourceConnectionString { + /** + * Specifies the resourceConnectionString property: The resourceConnectionString property.. + * + * @param resourceConnectionString The resourceConnectionString property. + * @return the next definition stage. + */ + WithCreate withResourceConnectionString(String resourceConnectionString); + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify hostname. */ + interface WithHostname { + /** + * Specifies the hostname property: The hostname property.. + * + * @param hostname The hostname property. + * @return the next definition stage. + */ + WithCreate withHostname(String hostname); + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify port. */ + interface WithPort { + /** + * Specifies the port property: The port property.. + * + * @param port The port property. + * @return the next definition stage. + */ + WithCreate withPort(Integer port); + } + /** The stage of the RelayServiceConnectionEntity definition allowing to specify biztalkUri. */ + interface WithBiztalkUri { + /** + * Specifies the biztalkUri property: The biztalkUri property.. + * + * @param biztalkUri The biztalkUri property. + * @return the next definition stage. + */ + WithCreate withBiztalkUri(String biztalkUri); + } + } + /** + * Begins update for the RelayServiceConnectionEntity resource. + * + * @return the stage of resource update. + */ + RelayServiceConnectionEntity.Update update(); + + /** The template for RelayServiceConnectionEntity update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithEntityName, + UpdateStages.WithEntityConnectionString, + UpdateStages.WithResourceType, + UpdateStages.WithResourceConnectionString, + UpdateStages.WithHostname, + UpdateStages.WithPort, + UpdateStages.WithBiztalkUri { + /** + * Executes the update request. + * + * @return the updated resource. + */ + RelayServiceConnectionEntity apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + RelayServiceConnectionEntity apply(Context context); + } + /** The RelayServiceConnectionEntity update stages. */ + interface UpdateStages { + /** The stage of the RelayServiceConnectionEntity update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the RelayServiceConnectionEntity update allowing to specify entityName. */ + interface WithEntityName { + /** + * Specifies the entityName property: The entityName property.. + * + * @param entityName The entityName property. + * @return the next definition stage. + */ + Update withEntityName(String entityName); + } + /** The stage of the RelayServiceConnectionEntity update allowing to specify entityConnectionString. */ + interface WithEntityConnectionString { + /** + * Specifies the entityConnectionString property: The entityConnectionString property.. + * + * @param entityConnectionString The entityConnectionString property. + * @return the next definition stage. + */ + Update withEntityConnectionString(String entityConnectionString); + } + /** The stage of the RelayServiceConnectionEntity update allowing to specify resourceType. */ + interface WithResourceType { + /** + * Specifies the resourceType property: The resourceType property.. + * + * @param resourceType The resourceType property. + * @return the next definition stage. + */ + Update withResourceType(String resourceType); + } + /** The stage of the RelayServiceConnectionEntity update allowing to specify resourceConnectionString. */ + interface WithResourceConnectionString { + /** + * Specifies the resourceConnectionString property: The resourceConnectionString property.. + * + * @param resourceConnectionString The resourceConnectionString property. + * @return the next definition stage. + */ + Update withResourceConnectionString(String resourceConnectionString); + } + /** The stage of the RelayServiceConnectionEntity update allowing to specify hostname. */ + interface WithHostname { + /** + * Specifies the hostname property: The hostname property.. + * + * @param hostname The hostname property. + * @return the next definition stage. + */ + Update withHostname(String hostname); + } + /** The stage of the RelayServiceConnectionEntity update allowing to specify port. */ + interface WithPort { + /** + * Specifies the port property: The port property.. + * + * @param port The port property. + * @return the next definition stage. + */ + Update withPort(Integer port); + } + /** The stage of the RelayServiceConnectionEntity update allowing to specify biztalkUri. */ + interface WithBiztalkUri { + /** + * Specifies the biztalkUri property: The biztalkUri property.. + * + * @param biztalkUri The biztalkUri property. + * @return the next definition stage. + */ + Update withBiztalkUri(String biztalkUri); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + RelayServiceConnectionEntity refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + RelayServiceConnectionEntity refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RemotePrivateEndpointConnection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RemotePrivateEndpointConnection.java new file mode 100644 index 0000000000000..f10c4652958fc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RemotePrivateEndpointConnection.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** A remote private endpoint connection. */ +@Fluent +public final class RemotePrivateEndpointConnection extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RemotePrivateEndpointConnection.class); + + /* + * RemotePrivateEndpointConnection resource specific properties + */ + @JsonProperty(value = "properties") + private RemotePrivateEndpointConnectionProperties innerProperties; + + /** + * Get the innerProperties property: RemotePrivateEndpointConnection resource specific properties. + * + * @return the innerProperties value. + */ + private RemotePrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public RemotePrivateEndpointConnection withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the provisioningState property: The provisioningState property. + * + * @return the provisioningState value. + */ + public String provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @return the privateEndpoint value. + */ + public ArmIdWrapper privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the RemotePrivateEndpointConnection object itself. + */ + public RemotePrivateEndpointConnection withPrivateEndpoint(ArmIdWrapper privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new RemotePrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the RemotePrivateEndpointConnection object itself. + */ + public RemotePrivateEndpointConnection withPrivateLinkServiceConnectionState( + PrivateLinkConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new RemotePrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Get the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @return the ipAddresses value. + */ + public List ipAddresses() { + return this.innerProperties() == null ? null : this.innerProperties().ipAddresses(); + } + + /** + * Set the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @param ipAddresses the ipAddresses value to set. + * @return the RemotePrivateEndpointConnection object itself. + */ + public RemotePrivateEndpointConnection withIpAddresses(List ipAddresses) { + if (this.innerProperties() == null) { + this.innerProperties = new RemotePrivateEndpointConnectionProperties(); + } + this.innerProperties().withIpAddresses(ipAddresses); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RemotePrivateEndpointConnectionArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RemotePrivateEndpointConnectionArmResource.java new file mode 100644 index 0000000000000..2783d9be9c38e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RemotePrivateEndpointConnectionArmResource.java @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner; +import java.util.List; + +/** An immutable client-side representation of RemotePrivateEndpointConnectionArmResource. */ +public interface RemotePrivateEndpointConnectionArmResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the provisioningState property: The provisioningState property. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the privateEndpoint property: PrivateEndpoint of a remote private endpoint connection. + * + * @return the privateEndpoint value. + */ + ArmIdWrapper privateEndpoint(); + + /** + * Gets the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkConnectionState privateLinkServiceConnectionState(); + + /** + * Gets the ipAddresses property: Private IPAddresses mapped to the remote private endpoint. + * + * @return the ipAddresses value. + */ + List ipAddresses(); + + /** + * Gets the inner + * com.azure.resourcemanager.appservice.generated.fluent.models.RemotePrivateEndpointConnectionArmResourceInner + * object. + * + * @return the inner object. + */ + RemotePrivateEndpointConnectionArmResourceInner innerModel(); + + /** The entirety of the RemotePrivateEndpointConnectionArmResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The RemotePrivateEndpointConnectionArmResource definition stages. */ + interface DefinitionStages { + /** The first stage of the RemotePrivateEndpointConnectionArmResource definition. */ + interface Blank extends WithParentResource { + } + /** + * The stage of the RemotePrivateEndpointConnectionArmResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @return the next definition stage. + */ + WithCreate withExistingHostingEnvironment(String resourceGroupName, String name); + } + /** + * The stage of the RemotePrivateEndpointConnectionArmResource 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.WithKind, DefinitionStages.WithPrivateLinkServiceConnectionState { + /** + * Executes the create request. + * + * @return the created resource. + */ + RemotePrivateEndpointConnectionArmResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + RemotePrivateEndpointConnectionArmResource create(Context context); + } + /** The stage of the RemotePrivateEndpointConnectionArmResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** + * The stage of the RemotePrivateEndpointConnectionArmResource definition allowing to specify + * privateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @param privateLinkServiceConnectionState The state of a private link connection. + * @return the next definition stage. + */ + WithCreate withPrivateLinkServiceConnectionState( + PrivateLinkConnectionState privateLinkServiceConnectionState); + } + } + /** + * Begins update for the RemotePrivateEndpointConnectionArmResource resource. + * + * @return the stage of resource update. + */ + RemotePrivateEndpointConnectionArmResource.Update update(); + + /** The template for RemotePrivateEndpointConnectionArmResource update. */ + interface Update extends UpdateStages.WithKind, UpdateStages.WithPrivateLinkServiceConnectionState { + /** + * Executes the update request. + * + * @return the updated resource. + */ + RemotePrivateEndpointConnectionArmResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + RemotePrivateEndpointConnectionArmResource apply(Context context); + } + /** The RemotePrivateEndpointConnectionArmResource update stages. */ + interface UpdateStages { + /** The stage of the RemotePrivateEndpointConnectionArmResource update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** + * The stage of the RemotePrivateEndpointConnectionArmResource update allowing to specify + * privateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: The state of a private link connection. + * + * @param privateLinkServiceConnectionState The state of a private link connection. + * @return the next definition stage. + */ + Update withPrivateLinkServiceConnectionState(PrivateLinkConnectionState privateLinkServiceConnectionState); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + RemotePrivateEndpointConnectionArmResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + RemotePrivateEndpointConnectionArmResource refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Rendering.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Rendering.java new file mode 100644 index 0000000000000..8d77e692cb674 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Rendering.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Instructions for rendering the data. */ +@Fluent +public final class Rendering { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Rendering.class); + + /* + * Rendering Type + */ + @JsonProperty(value = "type") + private RenderingType type; + + /* + * Title of data + */ + @JsonProperty(value = "title") + private String title; + + /* + * Description of the data that will help it be interpreted + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the type property: Rendering Type. + * + * @return the type value. + */ + public RenderingType type() { + return this.type; + } + + /** + * Set the type property: Rendering Type. + * + * @param type the type value to set. + * @return the Rendering object itself. + */ + public Rendering withType(RenderingType type) { + this.type = type; + return this; + } + + /** + * Get the title property: Title of data. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Title of data. + * + * @param title the title value to set. + * @return the Rendering object itself. + */ + public Rendering withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: Description of the data that will help it be interpreted. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the data that will help it be interpreted. + * + * @param description the description value to set. + * @return the Rendering object itself. + */ + public Rendering withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RenderingType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RenderingType.java new file mode 100644 index 0000000000000..1618f8ed7b89c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RenderingType.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for RenderingType. */ +public enum RenderingType { + /** Enum value NoGraph. */ + NO_GRAPH("NoGraph"), + + /** Enum value Table. */ + TABLE("Table"), + + /** Enum value TimeSeries. */ + TIME_SERIES("TimeSeries"), + + /** Enum value TimeSeriesPerInstance. */ + TIME_SERIES_PER_INSTANCE("TimeSeriesPerInstance"), + + /** Enum value PieChart. */ + PIE_CHART("PieChart"), + + /** Enum value DataSummary. */ + DATA_SUMMARY("DataSummary"), + + /** Enum value Email. */ + EMAIL("Email"), + + /** Enum value Insights. */ + INSIGHTS("Insights"), + + /** Enum value DynamicInsight. */ + DYNAMIC_INSIGHT("DynamicInsight"), + + /** Enum value Markdown. */ + MARKDOWN("Markdown"), + + /** Enum value Detector. */ + DETECTOR("Detector"), + + /** Enum value DropDown. */ + DROP_DOWN("DropDown"), + + /** Enum value Card. */ + CARD("Card"), + + /** Enum value Solution. */ + SOLUTION("Solution"), + + /** Enum value Guage. */ + GUAGE("Guage"), + + /** Enum value Form. */ + FORM("Form"), + + /** Enum value ChangeSets. */ + CHANGE_SETS("ChangeSets"), + + /** Enum value ChangeAnalysisOnboarding. */ + CHANGE_ANALYSIS_ONBOARDING("ChangeAnalysisOnboarding"), + + /** Enum value ChangesView. */ + CHANGES_VIEW("ChangesView"), + + /** Enum value AppInsight. */ + APP_INSIGHT("AppInsight"), + + /** Enum value DependencyGraph. */ + DEPENDENCY_GRAPH("DependencyGraph"), + + /** Enum value DownTime. */ + DOWN_TIME("DownTime"), + + /** Enum value SummaryCard. */ + SUMMARY_CARD("SummaryCard"), + + /** Enum value SearchComponent. */ + SEARCH_COMPONENT("SearchComponent"), + + /** Enum value AppInsightEnablement. */ + APP_INSIGHT_ENABLEMENT("AppInsightEnablement"); + + /** The actual serialized value for a RenderingType instance. */ + private final String value; + + RenderingType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a RenderingType instance. + * + * @param value the serialized value to parse. + * @return the parsed RenderingType object, or null if unable to parse. + */ + @JsonCreator + public static RenderingType fromString(String value) { + RenderingType[] items = RenderingType.values(); + for (RenderingType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RenewCertificateOrderRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RenewCertificateOrderRequest.java new file mode 100644 index 0000000000000..9da3df1daec62 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RenewCertificateOrderRequest.java @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.RenewCertificateOrderRequestProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Class representing certificate renew request. */ +@Fluent +public final class RenewCertificateOrderRequest extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RenewCertificateOrderRequest.class); + + /* + * RenewCertificateOrderRequest resource specific properties + */ + @JsonProperty(value = "properties") + private RenewCertificateOrderRequestProperties innerProperties; + + /** + * Get the innerProperties property: RenewCertificateOrderRequest resource specific properties. + * + * @return the innerProperties value. + */ + private RenewCertificateOrderRequestProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public RenewCertificateOrderRequest withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the keySize property: Certificate Key Size. + * + * @return the keySize value. + */ + public Integer keySize() { + return this.innerProperties() == null ? null : this.innerProperties().keySize(); + } + + /** + * Set the keySize property: Certificate Key Size. + * + * @param keySize the keySize value to set. + * @return the RenewCertificateOrderRequest object itself. + */ + public RenewCertificateOrderRequest withKeySize(Integer keySize) { + if (this.innerProperties() == null) { + this.innerProperties = new RenewCertificateOrderRequestProperties(); + } + this.innerProperties().withKeySize(keySize); + return this; + } + + /** + * Get the csr property: Csr to be used for re-key operation. + * + * @return the csr value. + */ + public String csr() { + return this.innerProperties() == null ? null : this.innerProperties().csr(); + } + + /** + * Set the csr property: Csr to be used for re-key operation. + * + * @param csr the csr value to set. + * @return the RenewCertificateOrderRequest object itself. + */ + public RenewCertificateOrderRequest withCsr(String csr) { + if (this.innerProperties() == null) { + this.innerProperties = new RenewCertificateOrderRequestProperties(); + } + this.innerProperties().withCsr(csr); + return this; + } + + /** + * Get the isPrivateKeyExternal property: Should we change the ASC type (from managed private key to external + * private key and vice versa). + * + * @return the isPrivateKeyExternal value. + */ + public Boolean isPrivateKeyExternal() { + return this.innerProperties() == null ? null : this.innerProperties().isPrivateKeyExternal(); + } + + /** + * Set the isPrivateKeyExternal property: Should we change the ASC type (from managed private key to external + * private key and vice versa). + * + * @param isPrivateKeyExternal the isPrivateKeyExternal value to set. + * @return the RenewCertificateOrderRequest object itself. + */ + public RenewCertificateOrderRequest withIsPrivateKeyExternal(Boolean isPrivateKeyExternal) { + if (this.innerProperties() == null) { + this.innerProperties = new RenewCertificateOrderRequestProperties(); + } + this.innerProperties().withIsPrivateKeyExternal(isPrivateKeyExternal); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RequestsBasedTrigger.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RequestsBasedTrigger.java new file mode 100644 index 0000000000000..1a9e3ef6ccba6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RequestsBasedTrigger.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Trigger based on total requests. */ +@Fluent +public final class RequestsBasedTrigger { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RequestsBasedTrigger.class); + + /* + * Request Count. + */ + @JsonProperty(value = "count") + private Integer count; + + /* + * Time interval. + */ + @JsonProperty(value = "timeInterval") + private String timeInterval; + + /** + * Get the count property: Request Count. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Request Count. + * + * @param count the count value to set. + * @return the RequestsBasedTrigger object itself. + */ + public RequestsBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the timeInterval property: Time interval. + * + * @return the timeInterval value. + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set the timeInterval property: Time interval. + * + * @param timeInterval the timeInterval value to set. + * @return the RequestsBasedTrigger object itself. + */ + public RequestsBasedTrigger withTimeInterval(String timeInterval) { + this.timeInterval = timeInterval; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResolveStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResolveStatus.java new file mode 100644 index 0000000000000..44ebda78a3aa6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResolveStatus.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ResolveStatus. */ +public enum ResolveStatus { + /** Enum value Initialized. */ + INITIALIZED("Initialized"), + + /** Enum value Resolved. */ + RESOLVED("Resolved"), + + /** Enum value InvalidSyntax. */ + INVALID_SYNTAX("InvalidSyntax"), + + /** Enum value MSINotEnabled. */ + MSINOT_ENABLED("MSINotEnabled"), + + /** Enum value VaultNotFound. */ + VAULT_NOT_FOUND("VaultNotFound"), + + /** Enum value SecretNotFound. */ + SECRET_NOT_FOUND("SecretNotFound"), + + /** Enum value SecretVersionNotFound. */ + SECRET_VERSION_NOT_FOUND("SecretVersionNotFound"), + + /** Enum value AccessToKeyVaultDenied. */ + ACCESS_TO_KEY_VAULT_DENIED("AccessToKeyVaultDenied"), + + /** Enum value OtherReasons. */ + OTHER_REASONS("OtherReasons"), + + /** Enum value FetchTimedOut. */ + FETCH_TIMED_OUT("FetchTimedOut"), + + /** Enum value UnauthorizedClient. */ + UNAUTHORIZED_CLIENT("UnauthorizedClient"); + + /** The actual serialized value for a ResolveStatus instance. */ + private final String value; + + ResolveStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResolveStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed ResolveStatus object, or null if unable to parse. + */ + @JsonCreator + public static ResolveStatus fromString(String value) { + ResolveStatus[] items = ResolveStatus.values(); + for (ResolveStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceCollection.java new file mode 100644 index 0000000000000..089a83e65a6ad --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceCollection.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of resources. */ +@Fluent +public final class ResourceCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceCollection.class); + + /* + * 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; + + /** + * 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 ResourceCollection object itself. + */ + public ResourceCollection 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 ResourceCollection")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadata.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadata.java new file mode 100644 index 0000000000000..006fc8820610c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadata.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceHealthMetadataInner; + +/** An immutable client-side representation of ResourceHealthMetadata. */ +public interface ResourceHealthMetadata { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the category property: The category that the resource matches in the RHC Policy File. + * + * @return the category value. + */ + String category(); + + /** + * Gets the signalAvailability property: Is there a health signal for the resource. + * + * @return the signalAvailability value. + */ + Boolean signalAvailability(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ResourceHealthMetadataInner object. + * + * @return the inner object. + */ + ResourceHealthMetadataInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadataCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadataCollection.java new file mode 100644 index 0000000000000..102d4ea8c77cb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadataCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceHealthMetadataInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of resource health metadata. */ +@Fluent +public final class ResourceHealthMetadataCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceHealthMetadataCollection.class); + + /* + * 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; + + /** + * 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 ResourceHealthMetadataCollection object itself. + */ + public ResourceHealthMetadataCollection 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 ResourceHealthMetadataCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadatas.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadatas.java new file mode 100644 index 0000000000000..e501de777fa86 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceHealthMetadatas.java @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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 ResourceHealthMetadatas. */ +public interface ResourceHealthMetadatas { + /** + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + PagedIterable list(); + + /** + * Description for List all ResourceHealthMetadata for all sites in the subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + PagedIterable list(Context context); + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for List all ResourceHealthMetadata for all sites in the resource group in the subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + PagedIterable listBySite(String resourceGroupName, String name); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + PagedIterable listBySite(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + ResourceHealthMetadata getBySite(String resourceGroupName, String name); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + Response getBySiteWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + PagedIterable listBySiteSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site as a collection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 resource health metadata. + */ + PagedIterable listBySiteSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + ResourceHealthMetadata getBySiteSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the category of ResourceHealthMetadata to use for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting ResourceHealthCheck settings. + */ + Response getBySiteSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricAvailability.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricAvailability.java new file mode 100644 index 0000000000000..919a0a52ae448 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricAvailability.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Metrics availability and retention. */ +@Immutable +public final class ResourceMetricAvailability { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceMetricAvailability.class); + + /* + * Time grain . + */ + @JsonProperty(value = "timeGrain", access = JsonProperty.Access.WRITE_ONLY) + private String timeGrain; + + /* + * Retention period for the current time grain. + */ + @JsonProperty(value = "retention", access = JsonProperty.Access.WRITE_ONLY) + private String retention; + + /** + * Get the timeGrain property: Time grain . + * + * @return the timeGrain value. + */ + public String timeGrain() { + return this.timeGrain; + } + + /** + * Get the retention property: Retention period for the current time grain. + * + * @return the retention value. + */ + public String retention() { + return this.retention; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricDefinition.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricDefinition.java new file mode 100644 index 0000000000000..945ea27460857 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricDefinition.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceMetricDefinitionInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of ResourceMetricDefinition. */ +public interface ResourceMetricDefinition { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the unit property: Unit of the metric. + * + * @return the unit value. + */ + String unit(); + + /** + * Gets the primaryAggregationType property: Primary aggregation type. + * + * @return the primaryAggregationType value. + */ + String primaryAggregationType(); + + /** + * Gets the metricAvailabilities property: List of time grains supported for the metric together with retention + * period. + * + * @return the metricAvailabilities value. + */ + List metricAvailabilities(); + + /** + * Gets the resourceUri property: Resource URI. + * + * @return the resourceUri value. + */ + String resourceUri(); + + /** + * Gets the properties property: Resource metric definition properties. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ResourceMetricDefinitionInner object. + * + * @return the inner object. + */ + ResourceMetricDefinitionInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricDefinitionCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricDefinitionCollection.java new file mode 100644 index 0000000000000..a9de8ab9d87b1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceMetricDefinitionCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceMetricDefinitionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of metric definitions. */ +@Fluent +public final class ResourceMetricDefinitionCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceMetricDefinitionCollection.class); + + /* + * 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; + + /** + * 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 ResourceMetricDefinitionCollection object itself. + */ + public ResourceMetricDefinitionCollection 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 ResourceMetricDefinitionCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceNameAvailability.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceNameAvailability.java new file mode 100644 index 0000000000000..b3e5e20b6a1b7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceNameAvailability.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ResourceNameAvailabilityInner; + +/** An immutable client-side representation of ResourceNameAvailability. */ +public interface ResourceNameAvailability { + /** + * Gets the nameAvailable property: <code>true</code> indicates name is valid and available. + * <code>false</code> indicates the name is invalid, unavailable, or both. + * + * @return the nameAvailable value. + */ + Boolean nameAvailable(); + + /** + * Gets the reason property: <code>Invalid</code> indicates the name provided does not match Azure App + * Service naming requirements. <code>AlreadyExists</code> indicates that the name is already in use and + * is therefore unavailable. + * + * @return the reason value. + */ + InAvailabilityReasonType reason(); + + /** + * Gets the message property: If reason == invalid, provide the user with the reason why the given name is invalid, + * and provide the resource naming requirements so that the user can select a valid name. If reason == + * AlreadyExists, explain that resource name is already in use, and direct them to select a different name. + * + * @return the message value. + */ + String message(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ResourceNameAvailabilityInner object. + * + * @return the inner object. + */ + ResourceNameAvailabilityInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceNameAvailabilityRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceNameAvailabilityRequest.java new file mode 100644 index 0000000000000..cdf559164a09a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceNameAvailabilityRequest.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resource name availability request content. */ +@Fluent +public final class ResourceNameAvailabilityRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResourceNameAvailabilityRequest.class); + + /* + * Resource name to verify. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Resource type used for verification. + */ + @JsonProperty(value = "type", required = true) + private CheckNameResourceTypes type; + + /* + * Is fully qualified domain name. + */ + @JsonProperty(value = "isFqdn") + private Boolean isFqdn; + + /** + * Get the name property: Resource name to verify. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Resource name to verify. + * + * @param name the name value to set. + * @return the ResourceNameAvailabilityRequest object itself. + */ + public ResourceNameAvailabilityRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Resource type used for verification. + * + * @return the type value. + */ + public CheckNameResourceTypes type() { + return this.type; + } + + /** + * Set the type property: Resource type used for verification. + * + * @param type the type value to set. + * @return the ResourceNameAvailabilityRequest object itself. + */ + public ResourceNameAvailabilityRequest withType(CheckNameResourceTypes type) { + this.type = type; + return this; + } + + /** + * Get the isFqdn property: Is fully qualified domain name. + * + * @return the isFqdn value. + */ + public Boolean isFqdn() { + return this.isFqdn; + } + + /** + * Set the isFqdn property: Is fully qualified domain name. + * + * @param isFqdn the isFqdn value to set. + * @return the ResourceNameAvailabilityRequest object itself. + */ + public ResourceNameAvailabilityRequest withIsFqdn(Boolean isFqdn) { + this.isFqdn = isFqdn; + 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 ResourceNameAvailabilityRequest")); + } + if (type() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property type in model ResourceNameAvailabilityRequest")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceProviders.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceProviders.java new file mode 100644 index 0000000000000..58222f0bd2841 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceProviders.java @@ -0,0 +1,447 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.NameIdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SourceControlInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; + +/** Resource collection API of ResourceProviders. */ +public interface ResourceProviders { + /** + * Description for Gets publishing user. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + User getPublishingUser(); + + /** + * Description for Gets publishing user. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Response getPublishingUserWithResponse(Context context); + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + User updatePublishingUser(UserInner userDetails); + + /** + * Description for Updates publishing user. + * + * @param userDetails Details of publishing user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Response updatePublishingUserWithResponse(UserInner userDetails, Context context); + + /** + * Description for Gets the source controls available for Azure websites. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 source controls. + */ + PagedIterable listSourceControls(); + + /** + * Description for Gets the source controls available for Azure websites. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 source controls. + */ + PagedIterable listSourceControls(Context context); + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + SourceControl getSourceControl(String sourceControlType); + + /** + * Description for Gets source control token. + * + * @param sourceControlType Type of source control. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + Response getSourceControlWithResponse(String sourceControlType, Context context); + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + SourceControl updateSourceControl(String sourceControlType, SourceControlInner requestMessage); + + /** + * Description for Updates source control token. + * + * @param sourceControlType Type of source control. + * @param requestMessage Source control token information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the source control OAuth token. + */ + Response updateSourceControlWithResponse( + String sourceControlType, SourceControlInner requestMessage, Context context); + + /** + * Description for Gets a list of meters for a given location. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Billing Meters. + */ + PagedIterable list(); + + /** + * Description for Gets a list of meters for a given location. + * + * @param billingLocation Azure Location of billable resource. + * @param osType App Service OS type meters used for. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Billing Meters. + */ + PagedIterable list(String billingLocation, String osType, Context context); + + /** + * Description for Check if a resource name is available. + * + * @param request Name availability request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource name. + */ + ResourceNameAvailability checkNameAvailability(ResourceNameAvailabilityRequest request); + + /** + * Description for Check if a resource name is available. + * + * @param request Name availability request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information regarding availability of a resource name. + */ + Response checkNameAvailabilityWithResponse( + ResourceNameAvailabilityRequest request, Context context); + + /** + * Get custom hostnames under this subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostnames under this subscription. + */ + PagedIterable listCustomHostnameSites(); + + /** + * Get custom hostnames under this subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostnames under this subscription. + */ + PagedIterable listCustomHostnameSites(Context context); + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + DeploymentLocations getSubscriptionDeploymentLocations(); + + /** + * Description for Gets list of available geo regions plus ministamps. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of available locations (regions or App Service Environments) for deployment of App Service + * resources. + */ + Response getSubscriptionDeploymentLocationsWithResponse(Context context); + + /** + * Description for Get a list of available geographical regions. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 geographical regions. + */ + PagedIterable listGeoRegions(); + + /** + * Description for Get a list of available geographical regions. + * + * @param sku Name of SKU used to filter the regions. + * @param linuxWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Linux workers. + * @param xenonWorkersEnabled Specify <code>true</code> if you want to filter to only regions that + * support Xenon workers. + * @param linuxDynamicWorkersEnabled Specify <code>true</code> if you want to filter to only regions + * that support Linux Consumption Workers. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 geographical regions. + */ + PagedIterable listGeoRegions( + SkuName sku, + Boolean linuxWorkersEnabled, + Boolean xenonWorkersEnabled, + Boolean linuxDynamicWorkersEnabled, + Context context); + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + PagedIterable listSiteIdentifiersAssignedToHostname(NameIdentifierInner nameIdentifier); + + /** + * Description for List all apps that are assigned to a hostname. + * + * @param nameIdentifier Hostname information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + PagedIterable listSiteIdentifiersAssignedToHostname( + NameIdentifierInner nameIdentifier, Context context); + + /** + * Description for List all premier add-on offers. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 premier add-on offers. + */ + PagedIterable listPremierAddOnOffers(); + + /** + * Description for List all premier add-on offers. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 premier add-on offers. + */ + PagedIterable listPremierAddOnOffers(Context context); + + /** + * Description for List all SKUs. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + SkuInfos listSkus(); + + /** + * Description for List all SKUs. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 SKU information. + */ + Response listSkusWithResponse(Context context); + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 class that describes the reason for a validation failure. + */ + VnetValidationFailureDetails verifyHostingEnvironmentVnet(VnetParameters parameters); + + /** + * Description for Verifies if this VNET is compatible with an App Service Environment by analyzing the Network + * Security Group rules. + * + * @param parameters VNET information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 class that describes the reason for a validation failure. + */ + Response verifyHostingEnvironmentVnetWithResponse( + VnetParameters parameters, Context context); + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 move(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope); + + /** + * Description for Move resources between resource groups. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response moveWithResponse( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context); + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + ValidateResponse validate(String resourceGroupName, ValidateRequest validateRequest); + + /** + * Description for Validate if a resource can be created. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param validateRequest Request with the resources to validate. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return describes the result of resource validation. + */ + Response validateWithResponse( + String resourceGroupName, ValidateRequest validateRequest, Context context); + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validateMove(String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope); + + /** + * Description for Validate whether a resource can be moved. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param moveResourceEnvelope Object that represents the resource to move. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response validateMoveWithResponse( + String resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceScopeType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceScopeType.java new file mode 100644 index 0000000000000..b4980214a3051 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResourceScopeType.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ResourceScopeType. */ +public final class ResourceScopeType extends ExpandableStringEnum { + /** Static value ServerFarm for ResourceScopeType. */ + public static final ResourceScopeType SERVER_FARM = fromString("ServerFarm"); + + /** Static value Subscription for ResourceScopeType. */ + public static final ResourceScopeType SUBSCRIPTION = fromString("Subscription"); + + /** Static value WebSite for ResourceScopeType. */ + public static final ResourceScopeType WEB_SITE = fromString("WebSite"); + + /** + * Creates or finds a ResourceScopeType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ResourceScopeType. + */ + @JsonCreator + public static ResourceScopeType fromString(String name) { + return fromString(name, ResourceScopeType.class); + } + + /** @return known ResourceScopeType values. */ + public static Collection values() { + return values(ResourceScopeType.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.java new file mode 100644 index 0000000000000..26af03ba2efd6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.java @@ -0,0 +1,369 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Message envelope that contains the common Azure resource manager properties and the resource provider specific + * content. + */ +@Fluent +public final class ResponseMessageEnvelopeRemotePrivateEndpointConnection { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(ResponseMessageEnvelopeRemotePrivateEndpointConnection.class); + + /* + * Resource Id. Typically ID is populated only for responses to GET + * requests. Caller is responsible for passing in this + * value for GET requests only. + * For example: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name of resource. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Type of resource e.g "Microsoft.Web/sites". + */ + @JsonProperty(value = "type") + private String type; + + /* + * Geographical region resource belongs to e.g. SouthCentralUS, + * SouthEastAsia. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Tags associated with resource. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * Azure resource manager plan. + */ + @JsonProperty(value = "plan") + private ArmPlan plan; + + /* + * Resource specific properties. + */ + @JsonProperty(value = "properties") + private RemotePrivateEndpointConnection properties; + + /* + * SKU description of the resource. + */ + @JsonProperty(value = "sku") + private SkuDescription sku; + + /* + * Azure-AsyncOperation Status info. + */ + @JsonProperty(value = "status") + private String status; + + /* + * Azure-AsyncOperation Error info. + */ + @JsonProperty(value = "error") + private ErrorEntity error; + + /* + * MSI resource + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Logical Availability Zones the service is hosted in + */ + @JsonProperty(value = "zones") + private List zones; + + /** + * Get the id property: Resource Id. Typically ID is populated only for responses to GET requests. Caller is + * responsible for passing in this value for GET requests only. For example: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource Id. Typically ID is populated only for responses to GET requests. Caller is + * responsible for passing in this value for GET requests only. For example: + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename}. + * + * @param id the id value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of resource. + * + * @param name the name value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Type of resource e.g "Microsoft.Web/sites". + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: Type of resource e.g "Microsoft.Web/sites". + * + * @param type the type value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withType(String type) { + this.type = type; + return this; + } + + /** + * Get the location property: Geographical region resource belongs to e.g. SouthCentralUS, SouthEastAsia. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Geographical region resource belongs to e.g. SouthCentralUS, SouthEastAsia. + * + * @param location the location value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Tags associated with resource. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Tags associated with resource. + * + * @param tags the tags value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the plan property: Azure resource manager plan. + * + * @return the plan value. + */ + public ArmPlan plan() { + return this.plan; + } + + /** + * Set the plan property: Azure resource manager plan. + * + * @param plan the plan value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withPlan(ArmPlan plan) { + this.plan = plan; + return this; + } + + /** + * Get the properties property: Resource specific properties. + * + * @return the properties value. + */ + public RemotePrivateEndpointConnection properties() { + return this.properties; + } + + /** + * Set the properties property: Resource specific properties. + * + * @param properties the properties value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withProperties( + RemotePrivateEndpointConnection properties) { + this.properties = properties; + return this; + } + + /** + * Get the sku property: SKU description of the resource. + * + * @return the sku value. + */ + public SkuDescription sku() { + return this.sku; + } + + /** + * Set the sku property: SKU description of the resource. + * + * @param sku the sku value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withSku(SkuDescription sku) { + this.sku = sku; + return this; + } + + /** + * Get the status property: Azure-AsyncOperation Status info. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Azure-AsyncOperation Status info. + * + * @param status the status value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the error property: Azure-AsyncOperation Error info. + * + * @return the error value. + */ + public ErrorEntity error() { + return this.error; + } + + /** + * Set the error property: Azure-AsyncOperation Error info. + * + * @param error the error value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withError(ErrorEntity error) { + this.error = error; + return this; + } + + /** + * Get the identity property: MSI resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: MSI resource. + * + * @param identity the identity value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the zones property: Logical Availability Zones the service is hosted in. + * + * @return the zones value. + */ + public List zones() { + return this.zones; + } + + /** + * Set the zones property: Logical Availability Zones the service is hosted in. + * + * @param zones the zones value to set. + * @return the ResponseMessageEnvelopeRemotePrivateEndpointConnection object itself. + */ + public ResponseMessageEnvelopeRemotePrivateEndpointConnection withZones(List zones) { + this.zones = zones; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (plan() != null) { + plan().validate(); + } + if (properties() != null) { + properties().validate(); + } + if (sku() != null) { + sku().validate(); + } + if (error() != null) { + error().validate(); + } + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResponseMetadata.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResponseMetadata.java new file mode 100644 index 0000000000000..ed9641711775f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ResponseMetadata.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ResponseMetadata model. */ +@Fluent +public final class ResponseMetadata { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ResponseMetadata.class); + + /* + * Source of the Data + */ + @JsonProperty(value = "dataSource") + private DataSource dataSource; + + /** + * Get the dataSource property: Source of the Data. + * + * @return the dataSource value. + */ + public DataSource dataSource() { + return this.dataSource; + } + + /** + * Set the dataSource property: Source of the Data. + * + * @param dataSource the dataSource value to set. + * @return the ResponseMetadata object itself. + */ + public ResponseMetadata withDataSource(DataSource dataSource) { + this.dataSource = dataSource; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataSource() != null) { + dataSource().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RestoreRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RestoreRequest.java new file mode 100644 index 0000000000000..74a86cf2e0216 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RestoreRequest.java @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner; +import java.util.List; + +/** An immutable client-side representation of RestoreRequest. */ +public interface RestoreRequest { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the storageAccountUrl property: SAS URL to the container. + * + * @return the storageAccountUrl value. + */ + String storageAccountUrl(); + + /** + * Gets the blobName property: Name of a blob which contains the backup. + * + * @return the blobName value. + */ + String blobName(); + + /** + * Gets the overwrite property: <code>true</code> if the restore operation can overwrite target app; + * otherwise, <code>false</code>. <code>true</code> is needed if trying to restore over an + * existing app. + * + * @return the overwrite value. + */ + boolean overwrite(); + + /** + * Gets the siteName property: Name of an app. + * + * @return the siteName value. + */ + String siteName(); + + /** + * Gets the databases property: Collection of databases which should be restored. This list has to match the list of + * databases included in the backup. + * + * @return the databases value. + */ + List databases(); + + /** + * Gets the ignoreConflictingHostNames property: Changes a logic when restoring an app with custom domains. + * <code>true</code> to remove custom domains automatically. If <code>false</code>, custom + * domains are added to the app's object when it is being restored, but that might fail due to conflicts during the + * operation. + * + * @return the ignoreConflictingHostNames value. + */ + Boolean ignoreConflictingHostNames(); + + /** + * Gets the ignoreDatabases property: Ignore the databases and only restore the site content. + * + * @return the ignoreDatabases value. + */ + Boolean ignoreDatabases(); + + /** + * Gets the appServicePlan property: Specify app service plan that will own restored site. + * + * @return the appServicePlan value. + */ + String appServicePlan(); + + /** + * Gets the operationType property: Operation type. + * + * @return the operationType value. + */ + BackupRestoreOperationType operationType(); + + /** + * Gets the adjustConnectionStrings property: <code>true</code> if SiteConfig.ConnectionStrings should + * be set in new app; otherwise, <code>false</code>. + * + * @return the adjustConnectionStrings value. + */ + Boolean adjustConnectionStrings(); + + /** + * Gets the hostingEnvironment property: App Service Environment name, if needed (only when restoring an app to an + * App Service Environment). + * + * @return the hostingEnvironment value. + */ + String hostingEnvironment(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner object. + * + * @return the inner object. + */ + RestoreRequestInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Revision.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Revision.java new file mode 100644 index 0000000000000..af24a589a49f3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Revision.java @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.RevisionInner; +import java.time.OffsetDateTime; +import java.util.Map; + +/** An immutable client-side representation of Revision. */ +public interface Revision { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the createdTime property: Timestamp describing when the revision was created by controller. + * + * @return the createdTime value. + */ + OffsetDateTime createdTime(); + + /** + * Gets the fqdn property: Fully qualified domain name of the revision. + * + * @return the fqdn value. + */ + String fqdn(); + + /** + * Gets the template property: Container App Revision Template with all possible settings and the defaults if user + * did not provide them. The defaults are populated as they were at the creation time. + * + * @return the template value. + */ + Template template(); + + /** + * Gets the active property: Boolean describing if the Revision is Active. + * + * @return the active value. + */ + Boolean active(); + + /** + * Gets the replicas property: Number of pods currently running for this revision. + * + * @return the replicas value. + */ + Integer replicas(); + + /** + * Gets the trafficWeight property: Traffic weight assigned to this revision. + * + * @return the trafficWeight value. + */ + Integer trafficWeight(); + + /** + * Gets the provisioningError property: Optional Field - Platform Error Message. + * + * @return the provisioningError value. + */ + String provisioningError(); + + /** + * Gets the healthState property: Current health State of the revision. + * + * @return the healthState value. + */ + RevisionHealthState healthState(); + + /** + * Gets the provisioningState property: Current provisioning State of the revision. + * + * @return the provisioningState value. + */ + RevisionProvisioningState provisioningState(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.RevisionInner object. + * + * @return the inner object. + */ + RevisionInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionCollection.java new file mode 100644 index 0000000000000..ea2da49715bc3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.RevisionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App Revisions collection ARM resource. */ +@Fluent +public final class RevisionCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(RevisionCollection.class); + + /* + * 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; + + /** + * 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 RevisionCollection object itself. + */ + public RevisionCollection 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 RevisionCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionHealthState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionHealthState.java new file mode 100644 index 0000000000000..e66f2f6e68d57 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionHealthState.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for RevisionHealthState. */ +public final class RevisionHealthState extends ExpandableStringEnum { + /** Static value Healthy for RevisionHealthState. */ + public static final RevisionHealthState HEALTHY = fromString("Healthy"); + + /** Static value Unhealthy for RevisionHealthState. */ + public static final RevisionHealthState UNHEALTHY = fromString("Unhealthy"); + + /** Static value None for RevisionHealthState. */ + public static final RevisionHealthState NONE = fromString("None"); + + /** + * Creates or finds a RevisionHealthState from its string representation. + * + * @param name a name to look for. + * @return the corresponding RevisionHealthState. + */ + @JsonCreator + public static RevisionHealthState fromString(String name) { + return fromString(name, RevisionHealthState.class); + } + + /** @return known RevisionHealthState values. */ + public static Collection values() { + return values(RevisionHealthState.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionProvisioningState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionProvisioningState.java new file mode 100644 index 0000000000000..11d8517cda5fc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RevisionProvisioningState.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for RevisionProvisioningState. */ +public final class RevisionProvisioningState extends ExpandableStringEnum { + /** Static value Provisioning for RevisionProvisioningState. */ + public static final RevisionProvisioningState PROVISIONING = fromString("Provisioning"); + + /** Static value Provisioned for RevisionProvisioningState. */ + public static final RevisionProvisioningState PROVISIONED = fromString("Provisioned"); + + /** Static value Failed for RevisionProvisioningState. */ + public static final RevisionProvisioningState FAILED = fromString("Failed"); + + /** Static value Deprovisioning for RevisionProvisioningState. */ + public static final RevisionProvisioningState DEPROVISIONING = fromString("Deprovisioning"); + + /** Static value Deprovisioned for RevisionProvisioningState. */ + public static final RevisionProvisioningState DEPROVISIONED = fromString("Deprovisioned"); + + /** + * Creates or finds a RevisionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding RevisionProvisioningState. + */ + @JsonCreator + public static RevisionProvisioningState fromString(String name) { + return fromString(name, RevisionProvisioningState.class); + } + + /** @return known RevisionProvisioningState values. */ + public static Collection values() { + return values(RevisionProvisioningState.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RouteType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RouteType.java new file mode 100644 index 0000000000000..2eb3aa62ca16e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/RouteType.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for RouteType. */ +public final class RouteType extends ExpandableStringEnum { + /** Static value DEFAULT for RouteType. */ + public static final RouteType DEFAULT = fromString("DEFAULT"); + + /** Static value INHERITED for RouteType. */ + public static final RouteType INHERITED = fromString("INHERITED"); + + /** Static value STATIC for RouteType. */ + public static final RouteType STATIC = fromString("STATIC"); + + /** + * Creates or finds a RouteType from its string representation. + * + * @param name a name to look for. + * @return the corresponding RouteType. + */ + @JsonCreator + public static RouteType fromString(String name) { + return fromString(name, RouteType.class); + } + + /** @return known RouteType values. */ + public static Collection values() { + return values(RouteType.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SampleUtterance.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SampleUtterance.java new file mode 100644 index 0000000000000..af1a14c94aba1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SampleUtterance.java @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Sample utterance. */ +@Fluent +public final class SampleUtterance { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SampleUtterance.class); + + /* + * Text attribute of sample utterance. + */ + @JsonProperty(value = "text") + private String text; + + /* + * Links attribute of sample utterance. + */ + @JsonProperty(value = "links") + private List links; + + /* + * Question id of sample utterance (for stackoverflow questions titles). + */ + @JsonProperty(value = "qid") + private String qid; + + /** + * Get the text property: Text attribute of sample utterance. + * + * @return the text value. + */ + public String text() { + return this.text; + } + + /** + * Set the text property: Text attribute of sample utterance. + * + * @param text the text value to set. + * @return the SampleUtterance object itself. + */ + public SampleUtterance withText(String text) { + this.text = text; + return this; + } + + /** + * Get the links property: Links attribute of sample utterance. + * + * @return the links value. + */ + public List links() { + return this.links; + } + + /** + * Set the links property: Links attribute of sample utterance. + * + * @param links the links value to set. + * @return the SampleUtterance object itself. + */ + public SampleUtterance withLinks(List links) { + this.links = links; + return this; + } + + /** + * Get the qid property: Question id of sample utterance (for stackoverflow questions titles). + * + * @return the qid value. + */ + public String qid() { + return this.qid; + } + + /** + * Set the qid property: Question id of sample utterance (for stackoverflow questions titles). + * + * @param qid the qid value to set. + * @return the SampleUtterance object itself. + */ + public SampleUtterance withQid(String qid) { + this.qid = qid; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Scale.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Scale.java new file mode 100644 index 0000000000000..09dd0a7546781 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Scale.java @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App scaling configurations. */ +@Fluent +public final class Scale { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Scale.class); + + /* + * Optional. Minimum number of container replicas. + */ + @JsonProperty(value = "minReplicas") + private Integer minReplicas; + + /* + * Optional. Maximum number of container replicas. Defaults to 10 if not + * set. + */ + @JsonProperty(value = "maxReplicas") + private Integer maxReplicas; + + /* + * Scaling rules. + */ + @JsonProperty(value = "rules") + private List rules; + + /** + * Get the minReplicas property: Optional. Minimum number of container replicas. + * + * @return the minReplicas value. + */ + public Integer minReplicas() { + return this.minReplicas; + } + + /** + * Set the minReplicas property: Optional. Minimum number of container replicas. + * + * @param minReplicas the minReplicas value to set. + * @return the Scale object itself. + */ + public Scale withMinReplicas(Integer minReplicas) { + this.minReplicas = minReplicas; + return this; + } + + /** + * Get the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set. + * + * @return the maxReplicas value. + */ + public Integer maxReplicas() { + return this.maxReplicas; + } + + /** + * Set the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set. + * + * @param maxReplicas the maxReplicas value to set. + * @return the Scale object itself. + */ + public Scale withMaxReplicas(Integer maxReplicas) { + this.maxReplicas = maxReplicas; + return this; + } + + /** + * Get the rules property: Scaling rules. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: Scaling rules. + * + * @param rules the rules value to set. + * @return the Scale object itself. + */ + public Scale withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScaleRule.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScaleRule.java new file mode 100644 index 0000000000000..bc939957c99f4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScaleRule.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container App container scaling rule. */ +@Fluent +public final class ScaleRule { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ScaleRule.class); + + /* + * Scale Rule Name + */ + @JsonProperty(value = "name") + private String name; + + /* + * Azure Queue based scaling. + */ + @JsonProperty(value = "azureQueue") + private QueueScaleRule azureQueue; + + /* + * Custom scale rule. + */ + @JsonProperty(value = "custom") + private CustomScaleRule custom; + + /* + * HTTP requests based scaling. + */ + @JsonProperty(value = "http") + private HttpScaleRule http; + + /** + * Get the name property: Scale Rule Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Scale Rule Name. + * + * @param name the name value to set. + * @return the ScaleRule object itself. + */ + public ScaleRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get the azureQueue property: Azure Queue based scaling. + * + * @return the azureQueue value. + */ + public QueueScaleRule azureQueue() { + return this.azureQueue; + } + + /** + * Set the azureQueue property: Azure Queue based scaling. + * + * @param azureQueue the azureQueue value to set. + * @return the ScaleRule object itself. + */ + public ScaleRule withAzureQueue(QueueScaleRule azureQueue) { + this.azureQueue = azureQueue; + return this; + } + + /** + * Get the custom property: Custom scale rule. + * + * @return the custom value. + */ + public CustomScaleRule custom() { + return this.custom; + } + + /** + * Set the custom property: Custom scale rule. + * + * @param custom the custom value to set. + * @return the ScaleRule object itself. + */ + public ScaleRule withCustom(CustomScaleRule custom) { + this.custom = custom; + return this; + } + + /** + * Get the http property: HTTP requests based scaling. + * + * @return the http value. + */ + public HttpScaleRule http() { + return this.http; + } + + /** + * Set the http property: HTTP requests based scaling. + * + * @param http the http value to set. + * @return the ScaleRule object itself. + */ + public ScaleRule withHttp(HttpScaleRule http) { + this.http = http; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureQueue() != null) { + azureQueue().validate(); + } + if (custom() != null) { + custom().validate(); + } + if (http() != null) { + http().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScaleRuleAuth.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScaleRuleAuth.java new file mode 100644 index 0000000000000..efbb69a91bf3e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScaleRuleAuth.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Auth Secrets for Container App Scale Rule. */ +@Fluent +public final class ScaleRuleAuth { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ScaleRuleAuth.class); + + /* + * Name of the Container App secret from which to pull the auth params. + */ + @JsonProperty(value = "secretRef") + private String secretRef; + + /* + * Trigger Parameter that uses the secret + */ + @JsonProperty(value = "triggerParameter") + private String triggerParameter; + + /** + * Get the secretRef property: Name of the Container App secret from which to pull the auth params. + * + * @return the secretRef value. + */ + public String secretRef() { + return this.secretRef; + } + + /** + * Set the secretRef property: Name of the Container App secret from which to pull the auth params. + * + * @param secretRef the secretRef value to set. + * @return the ScaleRuleAuth object itself. + */ + public ScaleRuleAuth withSecretRef(String secretRef) { + this.secretRef = secretRef; + return this; + } + + /** + * Get the triggerParameter property: Trigger Parameter that uses the secret. + * + * @return the triggerParameter value. + */ + public String triggerParameter() { + return this.triggerParameter; + } + + /** + * Set the triggerParameter property: Trigger Parameter that uses the secret. + * + * @param triggerParameter the triggerParameter value to set. + * @return the ScaleRuleAuth object itself. + */ + public ScaleRuleAuth withTriggerParameter(String triggerParameter) { + this.triggerParameter = triggerParameter; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScmType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScmType.java new file mode 100644 index 0000000000000..14c21b6700a11 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ScmType.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ScmType. */ +public final class ScmType extends ExpandableStringEnum { + /** Static value None for ScmType. */ + public static final ScmType NONE = fromString("None"); + + /** Static value Dropbox for ScmType. */ + public static final ScmType DROPBOX = fromString("Dropbox"); + + /** Static value Tfs for ScmType. */ + public static final ScmType TFS = fromString("Tfs"); + + /** Static value LocalGit for ScmType. */ + public static final ScmType LOCAL_GIT = fromString("LocalGit"); + + /** Static value GitHub for ScmType. */ + public static final ScmType GIT_HUB = fromString("GitHub"); + + /** Static value CodePlexGit for ScmType. */ + public static final ScmType CODE_PLEX_GIT = fromString("CodePlexGit"); + + /** Static value CodePlexHg for ScmType. */ + public static final ScmType CODE_PLEX_HG = fromString("CodePlexHg"); + + /** Static value BitbucketGit for ScmType. */ + public static final ScmType BITBUCKET_GIT = fromString("BitbucketGit"); + + /** Static value BitbucketHg for ScmType. */ + public static final ScmType BITBUCKET_HG = fromString("BitbucketHg"); + + /** Static value ExternalGit for ScmType. */ + public static final ScmType EXTERNAL_GIT = fromString("ExternalGit"); + + /** Static value ExternalHg for ScmType. */ + public static final ScmType EXTERNAL_HG = fromString("ExternalHg"); + + /** Static value OneDrive for ScmType. */ + public static final ScmType ONE_DRIVE = fromString("OneDrive"); + + /** Static value VSO for ScmType. */ + public static final ScmType VSO = fromString("VSO"); + + /** Static value VSTSRM for ScmType. */ + public static final ScmType VSTSRM = fromString("VSTSRM"); + + /** + * Creates or finds a ScmType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ScmType. + */ + @JsonCreator + public static ScmType fromString(String name) { + return fromString(name, ScmType.class); + } + + /** @return known ScmType values. */ + public static Collection values() { + return values(ScmType.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Secret.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Secret.java new file mode 100644 index 0000000000000..b2d38735b87b3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Secret.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container App Secret. */ +@Fluent +public final class Secret { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Secret.class); + + /* + * Secret Name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Secret Value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name property: Secret Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Secret Name. + * + * @param name the name value to set. + * @return the Secret object itself. + */ + public Secret withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Secret Value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Secret Value. + * + * @param value the value value to set. + * @return the Secret object itself. + */ + public Secret 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SecretsCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SecretsCollection.java new file mode 100644 index 0000000000000..962e9366ba2ff --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SecretsCollection.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SecretsCollectionInner; +import java.util.List; + +/** An immutable client-side representation of SecretsCollection. */ +public interface SecretsCollection { + /** + * Gets the value property: Collection of resources. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SecretsCollectionInner object. + * + * @return the inner object. + */ + SecretsCollectionInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ServiceSpecification.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ServiceSpecification.java new file mode 100644 index 0000000000000..592ab37bc441c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ServiceSpecification.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Resource metrics service provided by Microsoft.Insights resource provider. */ +@Fluent +public final class ServiceSpecification { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ServiceSpecification.class); + + /* + * The metricSpecifications property. + */ + @JsonProperty(value = "metricSpecifications") + private List metricSpecifications; + + /* + * The logSpecifications property. + */ + @JsonProperty(value = "logSpecifications") + private List logSpecifications; + + /** + * Get the metricSpecifications property: The metricSpecifications property. + * + * @return the metricSpecifications value. + */ + public List metricSpecifications() { + return this.metricSpecifications; + } + + /** + * Set the metricSpecifications property: The metricSpecifications property. + * + * @param metricSpecifications the metricSpecifications value to set. + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withMetricSpecifications(List metricSpecifications) { + this.metricSpecifications = metricSpecifications; + return this; + } + + /** + * Get the logSpecifications property: The logSpecifications property. + * + * @return the logSpecifications value. + */ + public List logSpecifications() { + return this.logSpecifications; + } + + /** + * Set the logSpecifications property: The logSpecifications property. + * + * @param logSpecifications the logSpecifications value to set. + * @return the ServiceSpecification object itself. + */ + public ServiceSpecification withLogSpecifications(List logSpecifications) { + this.logSpecifications = logSpecifications; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metricSpecifications() != null) { + metricSpecifications().forEach(e -> e.validate()); + } + if (logSpecifications() != null) { + logSpecifications().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Site.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Site.java new file mode 100644 index 0000000000000..0c56f5a5fa417 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Site.java @@ -0,0 +1,1655 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.StreamResponse; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import java.io.InputStream; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +/** An immutable client-side representation of Site. */ +public interface Site { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: Managed service identity. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the extendedLocation property: Extended Location. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the state property: Current state of the app. + * + * @return the state value. + */ + String state(); + + /** + * Gets the hostNames property: Hostnames associated with the app. + * + * @return the hostNames value. + */ + List hostNames(); + + /** + * Gets the repositorySiteName property: Name of the repository site. + * + * @return the repositorySiteName value. + */ + String repositorySiteName(); + + /** + * Gets the usageState property: State indicating whether the app has exceeded its quota usage. Read-only. + * + * @return the usageState value. + */ + UsageState usageState(); + + /** + * Gets the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value. + */ + Boolean enabled(); + + /** + * Gets the enabledHostNames property: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) + * AND enabled. Otherwise, the app is not served on those hostnames. + * + * @return the enabledHostNames value. + */ + List enabledHostNames(); + + /** + * Gets the availabilityState property: Management information availability state for the app. + * + * @return the availabilityState value. + */ + SiteAvailabilityState availabilityState(); + + /** + * Gets the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostnameSslStates value. + */ + List hostnameSslStates(); + + /** + * Gets the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * Gets the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value. + */ + Boolean reserved(); + + /** + * Gets the isXenon property: Obsolete: Hyper-V sandbox. + * + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * Gets the hyperV property: Hyper-V sandbox. + * + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * Gets the lastModifiedTimeUtc property: Last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value. + */ + OffsetDateTime lastModifiedTimeUtc(); + + /** + * Gets the siteConfig property: Configuration of the app. + * + * @return the siteConfig value. + */ + SiteConfig siteConfig(); + + /** + * Gets the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value. + */ + List trafficManagerHostNames(); + + /** + * Gets the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value. + */ + Boolean scmSiteAlsoStopped(); + + /** + * Gets the targetSwapSlot property: Specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value. + */ + String targetSwapSlot(); + + /** + * Gets the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * Gets the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @return the clientAffinityEnabled value. + */ + Boolean clientAffinityEnabled(); + + /** + * Gets the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @return the clientCertEnabled value. + */ + Boolean clientCertEnabled(); + + /** + * Gets the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @return the clientCertMode value. + */ + ClientCertMode clientCertMode(); + + /** + * Gets the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value. + */ + String clientCertExclusionPaths(); + + /** + * Gets the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @return the hostNamesDisabled value. + */ + Boolean hostNamesDisabled(); + + /** + * Gets the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @return the customDomainVerificationId value. + */ + String customDomainVerificationId(); + + /** + * Gets the outboundIpAddresses property: List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + * + * @return the outboundIpAddresses value. + */ + String outboundIpAddresses(); + + /** + * Gets the possibleOutboundIpAddresses property: List of IP addresses that the app uses for outbound connections + * (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value. + */ + String possibleOutboundIpAddresses(); + + /** + * Gets the containerSize property: Size of the function container. + * + * @return the containerSize value. + */ + Integer containerSize(); + + /** + * Gets the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps + * only). + * + * @return the dailyMemoryTimeQuota value. + */ + Integer dailyMemoryTimeQuota(); + + /** + * Gets the suspendedTill property: App suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value. + */ + OffsetDateTime suspendedTill(); + + /** + * Gets the maxNumberOfWorkers property: Maximum number of workers. This only applies to Functions container. + * + * @return the maxNumberOfWorkers value. + */ + Integer maxNumberOfWorkers(); + + /** + * Gets the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value. + */ + CloningInfo cloningInfo(); + + /** + * Gets the resourceGroup property: Name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * Gets the isDefaultContainer property: <code>true</code> if the app is a default container; otherwise, + * <code>false</code>. + * + * @return the isDefaultContainer value. + */ + Boolean isDefaultContainer(); + + /** + * Gets the defaultHostname property: Default hostname of the app. Read-only. + * + * @return the defaultHostname value. + */ + String defaultHostname(); + + /** + * Gets the slotSwapStatus property: Status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value. + */ + SlotSwapStatus slotSwapStatus(); + + /** + * Gets the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @return the httpsOnly value. + */ + Boolean httpsOnly(); + + /** + * Gets the redundancyMode property: Site redundancy mode. + * + * @return the redundancyMode value. + */ + RedundancyMode redundancyMode(); + + /** + * Gets the inProgressOperationId property: Specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value. + */ + UUID inProgressOperationId(); + + /** + * Gets the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @return the storageAccountRequired value. + */ + Boolean storageAccountRequired(); + + /** + * Gets the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + String keyVaultReferenceIdentity(); + + /** + * Gets the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be + * joined by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkSubnetId value. + */ + String virtualNetworkSubnetId(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner object. + * + * @return the inner object. + */ + SiteInner innerModel(); + + /** The entirety of the Site definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The Site definition stages. */ + interface DefinitionStages { + /** The first stage of the Site definition. */ + interface Blank extends WithLocation { + } + /** The stage of the Site 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 Site definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the Site definition which contains all the minimum required properties for the resource to be + * created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithIdentity, + DefinitionStages.WithExtendedLocation, + DefinitionStages.WithKind, + DefinitionStages.WithEnabled, + DefinitionStages.WithHostnameSslStates, + DefinitionStages.WithServerFarmId, + DefinitionStages.WithReserved, + DefinitionStages.WithIsXenon, + DefinitionStages.WithHyperV, + DefinitionStages.WithSiteConfig, + DefinitionStages.WithScmSiteAlsoStopped, + DefinitionStages.WithHostingEnvironmentProfile, + DefinitionStages.WithClientAffinityEnabled, + DefinitionStages.WithClientCertEnabled, + DefinitionStages.WithClientCertMode, + DefinitionStages.WithClientCertExclusionPaths, + DefinitionStages.WithHostNamesDisabled, + DefinitionStages.WithCustomDomainVerificationId, + DefinitionStages.WithContainerSize, + DefinitionStages.WithDailyMemoryTimeQuota, + DefinitionStages.WithCloningInfo, + DefinitionStages.WithHttpsOnly, + DefinitionStages.WithRedundancyMode, + DefinitionStages.WithStorageAccountRequired, + DefinitionStages.WithKeyVaultReferenceIdentity, + DefinitionStages.WithVirtualNetworkSubnetId { + /** + * Executes the create request. + * + * @return the created resource. + */ + Site create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + Site create(Context context); + } + /** The stage of the Site 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 Site definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity.. + * + * @param identity Managed service identity. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + /** The stage of the Site definition allowing to specify extendedLocation. */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: Extended Location.. + * + * @param extendedLocation Extended Location. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + /** The stage of the Site definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the Site definition allowing to specify enabled. */ + interface WithEnabled { + /** + * Specifies the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline).. + * + * @param enabled <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * @return the next definition stage. + */ + WithCreate withEnabled(Boolean enabled); + } + /** The stage of the Site definition allowing to specify hostnameSslStates. */ + interface WithHostnameSslStates { + /** + * Specifies the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for + * app's hostnames.. + * + * @param hostnameSslStates Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * @return the next definition stage. + */ + WithCreate withHostnameSslStates(List hostnameSslStates); + } + /** The stage of the Site definition allowing to specify serverFarmId. */ + interface WithServerFarmId { + /** + * Specifies the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}".. + * + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * @return the next definition stage. + */ + WithCreate withServerFarmId(String serverFarmId); + } + /** The stage of the Site definition allowing to specify reserved. */ + interface WithReserved { + /** + * Specifies the reserved property: <code>true</code> if reserved; otherwise, + * <code>false</code>.. + * + * @param reserved <code>true</code> if reserved; otherwise, <code>false</code>. + * @return the next definition stage. + */ + WithCreate withReserved(Boolean reserved); + } + /** The stage of the Site definition allowing to specify isXenon. */ + interface WithIsXenon { + /** + * Specifies the isXenon property: Obsolete: Hyper-V sandbox.. + * + * @param isXenon Obsolete: Hyper-V sandbox. + * @return the next definition stage. + */ + WithCreate withIsXenon(Boolean isXenon); + } + /** The stage of the Site definition allowing to specify hyperV. */ + interface WithHyperV { + /** + * Specifies the hyperV property: Hyper-V sandbox.. + * + * @param hyperV Hyper-V sandbox. + * @return the next definition stage. + */ + WithCreate withHyperV(Boolean hyperV); + } + /** The stage of the Site definition allowing to specify siteConfig. */ + interface WithSiteConfig { + /** + * Specifies the siteConfig property: Configuration of the app.. + * + * @param siteConfig Configuration of the app. + * @return the next definition stage. + */ + WithCreate withSiteConfig(SiteConfigInner siteConfig); + } + /** The stage of the Site definition allowing to specify scmSiteAlsoStopped. */ + interface WithScmSiteAlsoStopped { + /** + * Specifies the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the + * app is stopped; otherwise, <code>false</code>. The default is + * <code>false</code>.. + * + * @param scmSiteAlsoStopped <code>true</code> to stop SCM (KUDU) site when the app is stopped; + * otherwise, <code>false</code>. The default is <code>false</code>. + * @return the next definition stage. + */ + WithCreate withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped); + } + /** The stage of the Site definition allowing to specify hostingEnvironmentProfile. */ + interface WithHostingEnvironmentProfile { + /** + * Specifies the hostingEnvironmentProfile property: App Service Environment to use for the app.. + * + * @param hostingEnvironmentProfile App Service Environment to use for the app. + * @return the next definition stage. + */ + WithCreate withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile); + } + /** The stage of the Site definition allowing to specify clientAffinityEnabled. */ + interface WithClientAffinityEnabled { + /** + * Specifies the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in + * the same session to the same instance. Default is <code>true</code>.. + * + * @param clientAffinityEnabled <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests + * in the same session to the same instance. Default is <code>true</code>. + * @return the next definition stage. + */ + WithCreate withClientAffinityEnabled(Boolean clientAffinityEnabled); + } + /** The stage of the Site definition allowing to specify clientCertEnabled. */ + interface WithClientCertEnabled { + /** + * Specifies the clientCertEnabled property: <code>true</code> to enable client certificate + * authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>.. + * + * @param clientCertEnabled <code>true</code> to enable client certificate authentication (TLS + * mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * @return the next definition stage. + */ + WithCreate withClientCertEnabled(Boolean clientCertEnabled); + } + /** The stage of the Site definition allowing to specify clientCertMode. */ + interface WithClientCertMode { + /** + * Specifies the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: + * false means ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means + * ClientCert is required. - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is + * optional or accepted.. + * + * @param clientCertMode This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is + * required. - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or + * accepted. + * @return the next definition stage. + */ + WithCreate withClientCertMode(ClientCertMode clientCertMode); + } + /** The stage of the Site definition allowing to specify clientCertExclusionPaths. */ + interface WithClientCertExclusionPaths { + /** + * Specifies the clientCertExclusionPaths property: client certificate authentication comma-separated + * exclusion paths. + * + * @param clientCertExclusionPaths client certificate authentication comma-separated exclusion paths. + * @return the next definition stage. + */ + WithCreate withClientCertExclusionPaths(String clientCertExclusionPaths); + } + /** The stage of the Site definition allowing to specify hostNamesDisabled. */ + interface WithHostNamesDisabled { + /** + * Specifies the hostNamesDisabled property: <code>true</code> to disable the public hostnames + * of the app; otherwise, <code>false</code>. If <code>true</code>, the app is only + * accessible via API management process.. + * + * @param hostNamesDisabled <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only + * accessible via API management process. + * @return the next definition stage. + */ + WithCreate withHostNamesDisabled(Boolean hostNamesDisabled); + } + /** The stage of the Site definition allowing to specify customDomainVerificationId. */ + interface WithCustomDomainVerificationId { + /** + * Specifies the customDomainVerificationId property: Unique identifier that verifies the custom domains + * assigned to the app. Customer will add this id to a txt record for verification.. + * + * @param customDomainVerificationId Unique identifier that verifies the custom domains assigned to the app. + * Customer will add this id to a txt record for verification. + * @return the next definition stage. + */ + WithCreate withCustomDomainVerificationId(String customDomainVerificationId); + } + /** The stage of the Site definition allowing to specify containerSize. */ + interface WithContainerSize { + /** + * Specifies the containerSize property: Size of the function container.. + * + * @param containerSize Size of the function container. + * @return the next definition stage. + */ + WithCreate withContainerSize(Integer containerSize); + } + /** The stage of the Site definition allowing to specify dailyMemoryTimeQuota. */ + interface WithDailyMemoryTimeQuota { + /** + * Specifies the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on + * dynamic apps only).. + * + * @param dailyMemoryTimeQuota Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * @return the next definition stage. + */ + WithCreate withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota); + } + /** The stage of the Site definition allowing to specify cloningInfo. */ + interface WithCloningInfo { + /** + * Specifies the cloningInfo property: If specified during app creation, the app is cloned from a source + * app.. + * + * @param cloningInfo If specified during app creation, the app is cloned from a source app. + * @return the next definition stage. + */ + WithCreate withCloningInfo(CloningInfo cloningInfo); + } + /** The stage of the Site definition allowing to specify httpsOnly. */ + interface WithHttpsOnly { + /** + * Specifies the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues + * redirect for http requests. + * + * @param httpsOnly HttpsOnly: configures a web site to accept only https requests. Issues redirect for http + * requests. + * @return the next definition stage. + */ + WithCreate withHttpsOnly(Boolean httpsOnly); + } + /** The stage of the Site definition allowing to specify redundancyMode. */ + interface WithRedundancyMode { + /** + * Specifies the redundancyMode property: Site redundancy mode. + * + * @param redundancyMode Site redundancy mode. + * @return the next definition stage. + */ + WithCreate withRedundancyMode(RedundancyMode redundancyMode); + } + /** The stage of the Site definition allowing to specify storageAccountRequired. */ + interface WithStorageAccountRequired { + /** + * Specifies the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @param storageAccountRequired Checks if Customer provided storage account is required. + * @return the next definition stage. + */ + WithCreate withStorageAccountRequired(Boolean storageAccountRequired); + } + /** The stage of the Site definition allowing to specify keyVaultReferenceIdentity. */ + interface WithKeyVaultReferenceIdentity { + /** + * Specifies the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference + * authentication.. + * + * @param keyVaultReferenceIdentity Identity to use for Key Vault Reference authentication. + * @return the next definition stage. + */ + WithCreate withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity); + } + /** The stage of the Site definition allowing to specify virtualNetworkSubnetId. */ + interface WithVirtualNetworkSubnetId { + /** + * Specifies the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and + * subnet to be joined by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param virtualNetworkSubnetId Azure Resource Manager ID of the Virtual network and subnet to be joined by + * Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * @return the next definition stage. + */ + WithCreate withVirtualNetworkSubnetId(String virtualNetworkSubnetId); + } + } + /** + * Begins update for the Site resource. + * + * @return the stage of resource update. + */ + Site.Update update(); + + /** The template for Site update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithIdentity, + UpdateStages.WithEnabled, + UpdateStages.WithHostnameSslStates, + UpdateStages.WithServerFarmId, + UpdateStages.WithSiteConfig, + UpdateStages.WithScmSiteAlsoStopped, + UpdateStages.WithClientAffinityEnabled, + UpdateStages.WithClientCertEnabled, + UpdateStages.WithClientCertMode, + UpdateStages.WithClientCertExclusionPaths, + UpdateStages.WithHostNamesDisabled, + UpdateStages.WithCustomDomainVerificationId, + UpdateStages.WithContainerSize, + UpdateStages.WithDailyMemoryTimeQuota, + UpdateStages.WithHttpsOnly, + UpdateStages.WithRedundancyMode, + UpdateStages.WithStorageAccountRequired, + UpdateStages.WithKeyVaultReferenceIdentity, + UpdateStages.WithVirtualNetworkSubnetId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + Site apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + Site apply(Context context); + } + /** The Site update stages. */ + interface UpdateStages { + /** The stage of the Site update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the Site update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity.. + * + * @param identity Managed service identity. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + /** The stage of the Site update allowing to specify enabled. */ + interface WithEnabled { + /** + * Specifies the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline).. + * + * @param enabled <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * @return the next definition stage. + */ + Update withEnabled(Boolean enabled); + } + /** The stage of the Site update allowing to specify hostnameSslStates. */ + interface WithHostnameSslStates { + /** + * Specifies the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for + * app's hostnames.. + * + * @param hostnameSslStates Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * @return the next definition stage. + */ + Update withHostnameSslStates(List hostnameSslStates); + } + /** The stage of the Site update allowing to specify serverFarmId. */ + interface WithServerFarmId { + /** + * Specifies the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}".. + * + * @param serverFarmId Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * @return the next definition stage. + */ + Update withServerFarmId(String serverFarmId); + } + /** The stage of the Site update allowing to specify siteConfig. */ + interface WithSiteConfig { + /** + * Specifies the siteConfig property: Configuration of the app.. + * + * @param siteConfig Configuration of the app. + * @return the next definition stage. + */ + Update withSiteConfig(SiteConfigInner siteConfig); + } + /** The stage of the Site update allowing to specify scmSiteAlsoStopped. */ + interface WithScmSiteAlsoStopped { + /** + * Specifies the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the + * app is stopped; otherwise, <code>false</code>. The default is + * <code>false</code>.. + * + * @param scmSiteAlsoStopped <code>true</code> to stop SCM (KUDU) site when the app is stopped; + * otherwise, <code>false</code>. The default is <code>false</code>. + * @return the next definition stage. + */ + Update withScmSiteAlsoStopped(Boolean scmSiteAlsoStopped); + } + /** The stage of the Site update allowing to specify clientAffinityEnabled. */ + interface WithClientAffinityEnabled { + /** + * Specifies the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in + * the same session to the same instance. Default is <code>true</code>.. + * + * @param clientAffinityEnabled <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests + * in the same session to the same instance. Default is <code>true</code>. + * @return the next definition stage. + */ + Update withClientAffinityEnabled(Boolean clientAffinityEnabled); + } + /** The stage of the Site update allowing to specify clientCertEnabled. */ + interface WithClientCertEnabled { + /** + * Specifies the clientCertEnabled property: <code>true</code> to enable client certificate + * authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>.. + * + * @param clientCertEnabled <code>true</code> to enable client certificate authentication (TLS + * mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * @return the next definition stage. + */ + Update withClientCertEnabled(Boolean clientCertEnabled); + } + /** The stage of the Site update allowing to specify clientCertMode. */ + interface WithClientCertMode { + /** + * Specifies the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: + * false means ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means + * ClientCert is required. - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is + * optional or accepted.. + * + * @param clientCertMode This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is + * required. - ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or + * accepted. + * @return the next definition stage. + */ + Update withClientCertMode(ClientCertMode clientCertMode); + } + /** The stage of the Site update allowing to specify clientCertExclusionPaths. */ + interface WithClientCertExclusionPaths { + /** + * Specifies the clientCertExclusionPaths property: client certificate authentication comma-separated + * exclusion paths. + * + * @param clientCertExclusionPaths client certificate authentication comma-separated exclusion paths. + * @return the next definition stage. + */ + Update withClientCertExclusionPaths(String clientCertExclusionPaths); + } + /** The stage of the Site update allowing to specify hostNamesDisabled. */ + interface WithHostNamesDisabled { + /** + * Specifies the hostNamesDisabled property: <code>true</code> to disable the public hostnames + * of the app; otherwise, <code>false</code>. If <code>true</code>, the app is only + * accessible via API management process.. + * + * @param hostNamesDisabled <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only + * accessible via API management process. + * @return the next definition stage. + */ + Update withHostNamesDisabled(Boolean hostNamesDisabled); + } + /** The stage of the Site update allowing to specify customDomainVerificationId. */ + interface WithCustomDomainVerificationId { + /** + * Specifies the customDomainVerificationId property: Unique identifier that verifies the custom domains + * assigned to the app. Customer will add this id to a txt record for verification.. + * + * @param customDomainVerificationId Unique identifier that verifies the custom domains assigned to the app. + * Customer will add this id to a txt record for verification. + * @return the next definition stage. + */ + Update withCustomDomainVerificationId(String customDomainVerificationId); + } + /** The stage of the Site update allowing to specify containerSize. */ + interface WithContainerSize { + /** + * Specifies the containerSize property: Size of the function container.. + * + * @param containerSize Size of the function container. + * @return the next definition stage. + */ + Update withContainerSize(Integer containerSize); + } + /** The stage of the Site update allowing to specify dailyMemoryTimeQuota. */ + interface WithDailyMemoryTimeQuota { + /** + * Specifies the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on + * dynamic apps only).. + * + * @param dailyMemoryTimeQuota Maximum allowed daily memory-time quota (applicable on dynamic apps only). + * @return the next definition stage. + */ + Update withDailyMemoryTimeQuota(Integer dailyMemoryTimeQuota); + } + /** The stage of the Site update allowing to specify httpsOnly. */ + interface WithHttpsOnly { + /** + * Specifies the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues + * redirect for http requests. + * + * @param httpsOnly HttpsOnly: configures a web site to accept only https requests. Issues redirect for http + * requests. + * @return the next definition stage. + */ + Update withHttpsOnly(Boolean httpsOnly); + } + /** The stage of the Site update allowing to specify redundancyMode. */ + interface WithRedundancyMode { + /** + * Specifies the redundancyMode property: Site redundancy mode. + * + * @param redundancyMode Site redundancy mode. + * @return the next definition stage. + */ + Update withRedundancyMode(RedundancyMode redundancyMode); + } + /** The stage of the Site update allowing to specify storageAccountRequired. */ + interface WithStorageAccountRequired { + /** + * Specifies the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @param storageAccountRequired Checks if Customer provided storage account is required. + * @return the next definition stage. + */ + Update withStorageAccountRequired(Boolean storageAccountRequired); + } + /** The stage of the Site update allowing to specify keyVaultReferenceIdentity. */ + interface WithKeyVaultReferenceIdentity { + /** + * Specifies the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference + * authentication.. + * + * @param keyVaultReferenceIdentity Identity to use for Key Vault Reference authentication. + * @return the next definition stage. + */ + Update withKeyVaultReferenceIdentity(String keyVaultReferenceIdentity); + } + /** The stage of the Site update allowing to specify virtualNetworkSubnetId. */ + interface WithVirtualNetworkSubnetId { + /** + * Specifies the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and + * subnet to be joined by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @param virtualNetworkSubnetId Azure Resource Manager ID of the Virtual network and subnet to be joined by + * Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * @return the next definition stage. + */ + Update withVirtualNetworkSubnetId(String virtualNetworkSubnetId); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + Site refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + Site refresh(Context context); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 applySlotConfigToProduction(CsmSlotEntity slotSwapEntity); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response applySlotConfigToProductionWithResponse(CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Creates a backup of an app. + * + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + BackupItem backup(BackupRequestInner request); + + /** + * Description for Creates a backup of an app. + * + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + Response backupWithResponse(BackupRequestInner request, Context context); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream getWebSiteContainerLogs(); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse getWebSiteContainerLogsWithResponse(Context context); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + RestoreRequest discoverBackup(RestoreRequestInner request); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + Response discoverBackupWithResponse(RestoreRequestInner request, Context context); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + SiteCloneability isCloneable(); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + Response isCloneableWithResponse(Context context); + + /** + * Description for Gets existing backups of an app. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listSiteBackups(); + + /** + * Description for Gets existing backups of an app. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listSiteBackups(Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + FunctionSecrets listSyncFunctionTriggers(); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + Response listSyncFunctionTriggersWithResponse(Context context); + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 operation on a resource. + */ + Operation migrateMySql(MigrateMySqlRequest migrationRequestEnvelope); + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 operation on a resource. + */ + Operation migrateMySql(MigrateMySqlRequest migrationRequestEnvelope, Context context); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @throws com.azure.resourcemanager.appservice.generated.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 generateNewSitePublishingPassword(); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response generateNewSitePublishingPasswordWithResponse(Context context); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream listPublishingProfileXmlWithSecrets(CsmPublishingProfileOptions publishingProfileOptions); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse listPublishingProfileXmlWithSecretsWithResponse( + CsmPublishingProfileOptions publishingProfileOptions, Context context); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @throws com.azure.resourcemanager.appservice.generated.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 resetProductionSlotConfig(); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resetProductionSlotConfigWithResponse(Context context); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @throws com.azure.resourcemanager.appservice.generated.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 restart(); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response restartWithResponse(Boolean softRestart, Boolean synchronous, Context context); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlob(RestoreRequestInner request); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlob(RestoreRequestInner request, Context context); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedApp(DeletedAppRestoreRequest restoreRequest); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedApp(DeletedAppRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a web app from a snapshot. + * + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshot(SnapshotRestoreRequest restoreRequest); + + /** + * Description for Restores a web app from a snapshot. + * + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshot(SnapshotRestoreRequest restoreRequest, Context context); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + PagedIterable listSlotDifferencesFromProduction(CsmSlotEntity slotSwapEntity); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + PagedIterable listSlotDifferencesFromProduction(CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlotWithProduction(CsmSlotEntity slotSwapEntity); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlotWithProduction(CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @throws com.azure.resourcemanager.appservice.generated.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 start(); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response startWithResponse(Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTrace(Integer durationInSeconds, Integer maxFrameLength, String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTrace(); + + /** + * Description for Start capturing network packets for the site. + * + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTrace(Integer durationInSeconds, Integer maxFrameLength, String sasUrl, Context context); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @throws com.azure.resourcemanager.appservice.generated.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 stop(); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopWithResponse(Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @throws com.azure.resourcemanager.appservice.generated.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 stopNetworkTrace(); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopNetworkTraceWithResponse(Context context); + + /** + * Description for Sync web app repository. + * + * @throws com.azure.resourcemanager.appservice.generated.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 syncRepository(); + + /** + * Description for Sync web app repository. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response syncRepositoryWithResponse(Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctionTriggers(); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response syncFunctionTriggersWithResponse(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAuthSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAuthSettings.java new file mode 100644 index 0000000000000..55bbbc874ed33 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAuthSettings.java @@ -0,0 +1,373 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsInner; +import java.util.List; + +/** An immutable client-side representation of SiteAuthSettings. */ +public interface SiteAuthSettings { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled + * for the current app; otherwise, <code>false</code>. + * + * @return the enabled value. + */ + Boolean enabled(); + + /** + * Gets the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of certain features in the Authentication / + * Authorization module. + * + * @return the runtimeVersion value. + */ + String runtimeVersion(); + + /** + * Gets the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to + * access the app. + * + * @return the unauthenticatedClientAction value. + */ + UnauthenticatedClientAction unauthenticatedClientAction(); + + /** + * Gets the tokenStoreEnabled property: <code>true</code> to durably store platform-specific security + * tokens that are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @return the tokenStoreEnabled value. + */ + Boolean tokenStoreEnabled(); + + /** + * Gets the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or + * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting + * typically only needed by Windows Store application backends. Note that URLs within the current domain are always + * implicitly allowed. + * + * @return the allowedExternalRedirectUrls value. + */ + List allowedExternalRedirectUrls(); + + /** + * Gets the defaultProvider property: The default authentication provider to use when multiple providers are + * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * action is set to "RedirectToLoginPage". + * + * @return the defaultProvider value. + */ + BuiltInAuthenticationProvider defaultProvider(); + + /** + * Gets the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @return the tokenRefreshExtensionHours value. + */ + Double tokenRefreshExtensionHours(); + + /** + * Gets the clientId property: The Client ID of this relying party application, known as the client_id. This setting + * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID + * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * + * @return the clientId value. + */ + String clientId(); + + /** + * Gets the clientSecret property: The Client Secret of this relying party application (in Azure Active Directory, + * this is also referred to as the Key). This setting is optional. If no client secret is configured, the OpenID + * Connect implicit auth flow is used to authenticate end users. Otherwise, the OpenID Connect Authorization Code + * Flow is used to authenticate end users. More information on OpenID Connect: + * http://openid.net/specs/openid-connect-core-1_0.html. + * + * @return the clientSecret value. + */ + String clientSecret(); + + /** + * Gets the clientSecretSettingName property: The app setting name that contains the client secret of the relying + * party application. + * + * @return the clientSecretSettingName value. + */ + String clientSecretSettingName(); + + /** + * Gets the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint + * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also + * optional. + * + * @return the clientSecretCertificateThumbprint value. + */ + String clientSecretCertificateThumbprint(); + + /** + * Gets the issuer property: The OpenID Connect Issuer URI that represents the entity which issues access tokens for + * this application. When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + * https://sts.windows.net/{tenant-guid}/. This URI is a case-sensitive identifier for the token issuer. More + * information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * + * @return the issuer value. + */ + String issuer(); + + /** + * Gets the validateIssuer property: Gets a value indicating whether the issuer should be a valid HTTPS url and be + * validated as such. + * + * @return the validateIssuer value. + */ + Boolean validateIssuer(); + + /** + * Gets the allowedAudiences property: Allowed audience values to consider when validating JWTs issued by Azure + * Active Directory. Note that the <code>ClientID</code> value is always considered an allowed audience, + * regardless of this setting. + * + * @return the allowedAudiences value. + */ + List allowedAudiences(); + + /** + * Gets the additionalLoginParams property: Login parameters to send to the OpenID Connect authorization endpoint + * when a user logs in. Each parameter must be in the form "key=value". + * + * @return the additionalLoginParams value. + */ + List additionalLoginParams(); + + /** + * Gets the aadClaimsAuthorization property: Gets a JSON string containing the Azure AD Acl settings. + * + * @return the aadClaimsAuthorization value. + */ + String aadClaimsAuthorization(); + + /** + * Gets the googleClientId property: The OpenID Connect Client ID for the Google web application. This setting is + * required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @return the googleClientId value. + */ + String googleClientId(); + + /** + * Gets the googleClientSecret property: The client secret associated with the Google web application. This setting + * is required for enabling Google Sign-In. Google Sign-In documentation: + * https://developers.google.com/identity/sign-in/web/. + * + * @return the googleClientSecret value. + */ + String googleClientSecret(); + + /** + * Gets the googleClientSecretSettingName property: The app setting name that contains the client secret associated + * with the Google web application. + * + * @return the googleClientSecretSettingName value. + */ + String googleClientSecretSettingName(); + + /** + * Gets the googleOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Google Sign-In + * authentication. This setting is optional. If not specified, "openid", "profile", and "email" are used as default + * scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/. + * + * @return the googleOAuthScopes value. + */ + List googleOAuthScopes(); + + /** + * Gets the facebookAppId property: The App ID of the Facebook app used for login. This setting is required for + * enabling Facebook Login. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookAppId value. + */ + String facebookAppId(); + + /** + * Gets the facebookAppSecret property: The App Secret of the Facebook app used for Facebook Login. This setting is + * required for enabling Facebook Login. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookAppSecret value. + */ + String facebookAppSecret(); + + /** + * Gets the facebookAppSecretSettingName property: The app setting name that contains the app secret used for + * Facebook Login. + * + * @return the facebookAppSecretSettingName value. + */ + String facebookAppSecretSettingName(); + + /** + * Gets the facebookOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Facebook Login + * authentication. This setting is optional. Facebook Login documentation: + * https://developers.facebook.com/docs/facebook-login. + * + * @return the facebookOAuthScopes value. + */ + List facebookOAuthScopes(); + + /** + * Gets the gitHubClientId property: The Client Id of the GitHub app used for login. This setting is required for + * enabling Github login. + * + * @return the gitHubClientId value. + */ + String gitHubClientId(); + + /** + * Gets the gitHubClientSecret property: The Client Secret of the GitHub app used for Github Login. This setting is + * required for enabling Github login. + * + * @return the gitHubClientSecret value. + */ + String gitHubClientSecret(); + + /** + * Gets the gitHubClientSecretSettingName property: The app setting name that contains the client secret of the + * Github app used for GitHub Login. + * + * @return the gitHubClientSecretSettingName value. + */ + String gitHubClientSecretSettingName(); + + /** + * Gets the gitHubOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of GitHub Login + * authentication. This setting is optional. + * + * @return the gitHubOAuthScopes value. + */ + List gitHubOAuthScopes(); + + /** + * Gets the twitterConsumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @return the twitterConsumerKey value. + */ + String twitterConsumerKey(); + + /** + * Gets the twitterConsumerSecret property: The OAuth 1.0a consumer secret of the Twitter application used for + * sign-in. This setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @return the twitterConsumerSecret value. + */ + String twitterConsumerSecret(); + + /** + * Gets the twitterConsumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer + * secret of the Twitter application used for sign-in. + * + * @return the twitterConsumerSecretSettingName value. + */ + String twitterConsumerSecretSettingName(); + + /** + * Gets the microsoftAccountClientId property: The OAuth 2.0 client ID that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @return the microsoftAccountClientId value. + */ + String microsoftAccountClientId(); + + /** + * Gets the microsoftAccountClientSecret property: The OAuth 2.0 client secret that was created for the app used for + * authentication. This setting is required for enabling Microsoft Account authentication. Microsoft Account OAuth + * documentation: https://dev.onedrive.com/auth/msa_oauth.htm. + * + * @return the microsoftAccountClientSecret value. + */ + String microsoftAccountClientSecret(); + + /** + * Gets the microsoftAccountClientSecretSettingName property: The app setting name containing the OAuth 2.0 client + * secret that was created for the app used for authentication. + * + * @return the microsoftAccountClientSecretSettingName value. + */ + String microsoftAccountClientSecretSettingName(); + + /** + * Gets the microsoftAccountOAuthScopes property: The OAuth 2.0 scopes that will be requested as part of Microsoft + * Account authentication. This setting is optional. If not specified, "wl.basic" is used as the default scope. + * Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx. + * + * @return the microsoftAccountOAuthScopes value. + */ + List microsoftAccountOAuthScopes(); + + /** + * Gets the isAuthFromFile property: "true" if the auth config settings should be read from a file, "false" + * otherwise. + * + * @return the isAuthFromFile value. + */ + String isAuthFromFile(); + + /** + * Gets the authFilePath property: The path of the config file containing auth settings. If the path is relative, + * base will the site's root directory. + * + * @return the authFilePath value. + */ + String authFilePath(); + + /** + * Gets the configVersion property: The ConfigVersion of the Authentication / Authorization feature in use for the + * current app. The setting in this value can control the behavior of the control plane for Authentication / + * Authorization. + * + * @return the configVersion value. + */ + String configVersion(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsInner object. + * + * @return the inner object. + */ + SiteAuthSettingsInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAuthSettingsV2.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAuthSettingsV2.java new file mode 100644 index 0000000000000..998153e72c7a9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAuthSettingsV2.java @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsV2Inner; + +/** An immutable client-side representation of SiteAuthSettingsV2. */ +public interface SiteAuthSettingsV2 { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the platform property: The configuration settings of the platform of App Service + * Authentication/Authorization. + * + * @return the platform value. + */ + AuthPlatform platform(); + + /** + * Gets the globalValidation property: The configuration settings that determines the validation flow of users using + * App Service Authentication/Authorization. + * + * @return the globalValidation value. + */ + GlobalValidation globalValidation(); + + /** + * Gets the identityProviders property: The configuration settings of each of the identity providers used to + * configure App Service Authentication/Authorization. + * + * @return the identityProviders value. + */ + IdentityProviders identityProviders(); + + /** + * Gets the login property: The configuration settings of the login flow of users using App Service + * Authentication/Authorization. + * + * @return the login value. + */ + Login login(); + + /** + * Gets the httpSettings property: The configuration settings of the HTTP requests for authentication and + * authorization requests made against App Service Authentication/Authorization. + * + * @return the httpSettings value. + */ + HttpSettings httpSettings(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsV2Inner object. + * + * @return the inner object. + */ + SiteAuthSettingsV2Inner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAvailabilityState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAvailabilityState.java new file mode 100644 index 0000000000000..93c2f49e468d5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteAvailabilityState.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for SiteAvailabilityState. */ +public enum SiteAvailabilityState { + /** Enum value Normal. */ + NORMAL("Normal"), + + /** Enum value Limited. */ + LIMITED("Limited"), + + /** Enum value DisasterRecoveryMode. */ + DISASTER_RECOVERY_MODE("DisasterRecoveryMode"); + + /** The actual serialized value for a SiteAvailabilityState instance. */ + private final String value; + + SiteAvailabilityState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SiteAvailabilityState instance. + * + * @param value the serialized value to parse. + * @return the parsed SiteAvailabilityState object, or null if unable to parse. + */ + @JsonCreator + public static SiteAvailabilityState fromString(String value) { + SiteAvailabilityState[] items = SiteAvailabilityState.values(); + for (SiteAvailabilityState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteCloneability.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteCloneability.java new file mode 100644 index 0000000000000..a2ee13f7a67a4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteCloneability.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteCloneabilityInner; +import java.util.List; + +/** An immutable client-side representation of SiteCloneability. */ +public interface SiteCloneability { + /** + * Gets the result property: Name of app. + * + * @return the result value. + */ + CloneAbilityResult result(); + + /** + * Gets the blockingFeatures property: List of features enabled on app that prevent cloning. + * + * @return the blockingFeatures value. + */ + List blockingFeatures(); + + /** + * Gets the unsupportedFeatures property: List of features enabled on app that are non-blocking but cannot be + * cloned. The app can still be cloned but the features in this list will not be set up on cloned app. + * + * @return the unsupportedFeatures value. + */ + List unsupportedFeatures(); + + /** + * Gets the blockingCharacteristics property: List of blocking application characteristics. + * + * @return the blockingCharacteristics value. + */ + List blockingCharacteristics(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteCloneabilityInner object. + * + * @return the inner object. + */ + SiteCloneabilityInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteCloneabilityCriterion.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteCloneabilityCriterion.java new file mode 100644 index 0000000000000..4844f025d38b2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteCloneabilityCriterion.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** An app cloneability criterion. */ +@Fluent +public final class SiteCloneabilityCriterion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteCloneabilityCriterion.class); + + /* + * Name of criterion. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Description of criterion. + */ + @JsonProperty(value = "description") + private String description; + + /** + * Get the name property: Name of criterion. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of criterion. + * + * @param name the name value to set. + * @return the SiteCloneabilityCriterion object itself. + */ + public SiteCloneabilityCriterion withName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Description of criterion. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of criterion. + * + * @param description the description value to set. + * @return the SiteCloneabilityCriterion object itself. + */ + public SiteCloneabilityCriterion withDescription(String description) { + this.description = description; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfig.java new file mode 100644 index 0000000000000..cb24a6828235c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfig.java @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of SiteConfig. */ +public interface SiteConfig { + /** + * Gets the numberOfWorkers property: Number of workers. + * + * @return the numberOfWorkers value. + */ + Integer numberOfWorkers(); + + /** + * Gets the defaultDocuments property: Default documents. + * + * @return the defaultDocuments value. + */ + List defaultDocuments(); + + /** + * Gets the netFrameworkVersion property: .NET Framework version. + * + * @return the netFrameworkVersion value. + */ + String netFrameworkVersion(); + + /** + * Gets the phpVersion property: Version of PHP. + * + * @return the phpVersion value. + */ + String phpVersion(); + + /** + * Gets the pythonVersion property: Version of Python. + * + * @return the pythonVersion value. + */ + String pythonVersion(); + + /** + * Gets the nodeVersion property: Version of Node.js. + * + * @return the nodeVersion value. + */ + String nodeVersion(); + + /** + * Gets the powerShellVersion property: Version of PowerShell. + * + * @return the powerShellVersion value. + */ + String powerShellVersion(); + + /** + * Gets the linuxFxVersion property: Linux App Framework and version. + * + * @return the linuxFxVersion value. + */ + String linuxFxVersion(); + + /** + * Gets the windowsFxVersion property: Xenon App Framework and version. + * + * @return the windowsFxVersion value. + */ + String windowsFxVersion(); + + /** + * Gets the requestTracingEnabled property: <code>true</code> if request tracing is enabled; otherwise, + * <code>false</code>. + * + * @return the requestTracingEnabled value. + */ + Boolean requestTracingEnabled(); + + /** + * Gets the requestTracingExpirationTime property: Request tracing expiration time. + * + * @return the requestTracingExpirationTime value. + */ + OffsetDateTime requestTracingExpirationTime(); + + /** + * Gets the remoteDebuggingEnabled property: <code>true</code> if remote debugging is enabled; + * otherwise, <code>false</code>. + * + * @return the remoteDebuggingEnabled value. + */ + Boolean remoteDebuggingEnabled(); + + /** + * Gets the remoteDebuggingVersion property: Remote debugging version. + * + * @return the remoteDebuggingVersion value. + */ + String remoteDebuggingVersion(); + + /** + * Gets the httpLoggingEnabled property: <code>true</code> if HTTP logging is enabled; otherwise, + * <code>false</code>. + * + * @return the httpLoggingEnabled value. + */ + Boolean httpLoggingEnabled(); + + /** + * Gets the acrUseManagedIdentityCreds property: Flag to use Managed Identity Creds for ACR pull. + * + * @return the acrUseManagedIdentityCreds value. + */ + Boolean acrUseManagedIdentityCreds(); + + /** + * Gets the acrUserManagedIdentityId property: If using user managed identity, the user managed identity ClientId. + * + * @return the acrUserManagedIdentityId value. + */ + String acrUserManagedIdentityId(); + + /** + * Gets the logsDirectorySizeLimit property: HTTP logs directory size limit. + * + * @return the logsDirectorySizeLimit value. + */ + Integer logsDirectorySizeLimit(); + + /** + * Gets the detailedErrorLoggingEnabled property: <code>true</code> if detailed error logging is + * enabled; otherwise, <code>false</code>. + * + * @return the detailedErrorLoggingEnabled value. + */ + Boolean detailedErrorLoggingEnabled(); + + /** + * Gets the publishingUsername property: Publishing user name. + * + * @return the publishingUsername value. + */ + String publishingUsername(); + + /** + * Gets the appSettings property: Application settings. + * + * @return the appSettings value. + */ + List appSettings(); + + /** + * Gets the connectionStrings property: Connection strings. + * + * @return the connectionStrings value. + */ + List connectionStrings(); + + /** + * Gets the machineKey property: Site MachineKey. + * + * @return the machineKey value. + */ + SiteMachineKey machineKey(); + + /** + * Gets the handlerMappings property: Handler mappings. + * + * @return the handlerMappings value. + */ + List handlerMappings(); + + /** + * Gets the documentRoot property: Document root. + * + * @return the documentRoot value. + */ + String documentRoot(); + + /** + * Gets the scmType property: SCM type. + * + * @return the scmType value. + */ + ScmType scmType(); + + /** + * Gets the use32BitWorkerProcess property: <code>true</code> to use 32-bit worker process; otherwise, + * <code>false</code>. + * + * @return the use32BitWorkerProcess value. + */ + Boolean use32BitWorkerProcess(); + + /** + * Gets the webSocketsEnabled property: <code>true</code> if WebSocket is enabled; otherwise, + * <code>false</code>. + * + * @return the webSocketsEnabled value. + */ + Boolean webSocketsEnabled(); + + /** + * Gets the alwaysOn property: <code>true</code> if Always On is enabled; otherwise, + * <code>false</code>. + * + * @return the alwaysOn value. + */ + Boolean alwaysOn(); + + /** + * Gets the javaVersion property: Java version. + * + * @return the javaVersion value. + */ + String javaVersion(); + + /** + * Gets the javaContainer property: Java container. + * + * @return the javaContainer value. + */ + String javaContainer(); + + /** + * Gets the javaContainerVersion property: Java container version. + * + * @return the javaContainerVersion value. + */ + String javaContainerVersion(); + + /** + * Gets the appCommandLine property: App command line to launch. + * + * @return the appCommandLine value. + */ + String appCommandLine(); + + /** + * Gets the managedPipelineMode property: Managed pipeline mode. + * + * @return the managedPipelineMode value. + */ + ManagedPipelineMode managedPipelineMode(); + + /** + * Gets the virtualApplications property: Virtual applications. + * + * @return the virtualApplications value. + */ + List virtualApplications(); + + /** + * Gets the loadBalancing property: Site load balancing. + * + * @return the loadBalancing value. + */ + SiteLoadBalancing loadBalancing(); + + /** + * Gets the experiments property: This is work around for polymorphic types. + * + * @return the experiments value. + */ + Experiments experiments(); + + /** + * Gets the limits property: Site limits. + * + * @return the limits value. + */ + SiteLimits limits(); + + /** + * Gets the autoHealEnabled property: <code>true</code> if Auto Heal is enabled; otherwise, + * <code>false</code>. + * + * @return the autoHealEnabled value. + */ + Boolean autoHealEnabled(); + + /** + * Gets the autoHealRules property: Auto Heal rules. + * + * @return the autoHealRules value. + */ + AutoHealRules autoHealRules(); + + /** + * Gets the tracingOptions property: Tracing options. + * + * @return the tracingOptions value. + */ + String tracingOptions(); + + /** + * Gets the vnetName property: Virtual Network name. + * + * @return the vnetName value. + */ + String vnetName(); + + /** + * Gets the vnetRouteAllEnabled property: Virtual Network Route All enabled. This causes all outbound traffic to + * have Virtual Network Security Groups and User Defined Routes applied. + * + * @return the vnetRouteAllEnabled value. + */ + Boolean vnetRouteAllEnabled(); + + /** + * Gets the vnetPrivatePortsCount property: The number of private ports assigned to this app. These will be assigned + * dynamically on runtime. + * + * @return the vnetPrivatePortsCount value. + */ + Integer vnetPrivatePortsCount(); + + /** + * Gets the cors property: Cross-Origin Resource Sharing (CORS) settings. + * + * @return the cors value. + */ + CorsSettings cors(); + + /** + * Gets the push property: Push endpoint settings. + * + * @return the push value. + */ + PushSettings push(); + + /** + * Gets the apiDefinition property: Information about the formal API definition for the app. + * + * @return the apiDefinition value. + */ + ApiDefinitionInfo apiDefinition(); + + /** + * Gets the apiManagementConfig property: Azure API management settings linked to the app. + * + * @return the apiManagementConfig value. + */ + ApiManagementConfig apiManagementConfig(); + + /** + * Gets the autoSwapSlotName property: Auto-swap slot name. + * + * @return the autoSwapSlotName value. + */ + String autoSwapSlotName(); + + /** + * Gets the localMySqlEnabled property: <code>true</code> to enable local MySQL; otherwise, + * <code>false</code>. + * + * @return the localMySqlEnabled value. + */ + Boolean localMySqlEnabled(); + + /** + * Gets the managedServiceIdentityId property: Managed Service Identity Id. + * + * @return the managedServiceIdentityId value. + */ + Integer managedServiceIdentityId(); + + /** + * Gets the xManagedServiceIdentityId property: Explicit Managed Service Identity Id. + * + * @return the xManagedServiceIdentityId value. + */ + Integer xManagedServiceIdentityId(); + + /** + * Gets the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + String keyVaultReferenceIdentity(); + + /** + * Gets the ipSecurityRestrictions property: IP security restrictions for main. + * + * @return the ipSecurityRestrictions value. + */ + List ipSecurityRestrictions(); + + /** + * Gets the scmIpSecurityRestrictions property: IP security restrictions for scm. + * + * @return the scmIpSecurityRestrictions value. + */ + List scmIpSecurityRestrictions(); + + /** + * Gets the scmIpSecurityRestrictionsUseMain property: IP security restrictions for scm to use main. + * + * @return the scmIpSecurityRestrictionsUseMain value. + */ + Boolean scmIpSecurityRestrictionsUseMain(); + + /** + * Gets the http20Enabled property: Http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @return the http20Enabled value. + */ + Boolean http20Enabled(); + + /** + * Gets the minTlsVersion property: MinTlsVersion: configures the minimum version of TLS required for SSL requests. + * + * @return the minTlsVersion value. + */ + SupportedTlsVersions minTlsVersion(); + + /** + * Gets the scmMinTlsVersion property: ScmMinTlsVersion: configures the minimum version of TLS required for SSL + * requests for SCM site. + * + * @return the scmMinTlsVersion value. + */ + SupportedTlsVersions scmMinTlsVersion(); + + /** + * Gets the ftpsState property: State of FTP / FTPS service. + * + * @return the ftpsState value. + */ + FtpsState ftpsState(); + + /** + * Gets the preWarmedInstanceCount property: Number of preWarmed instances. This setting only applies to the + * Consumption and Elastic Plans. + * + * @return the preWarmedInstanceCount value. + */ + Integer preWarmedInstanceCount(); + + /** + * Gets the functionAppScaleLimit property: Maximum number of workers that a site can scale out to. This setting + * only applies to the Consumption and Elastic Premium Plans. + * + * @return the functionAppScaleLimit value. + */ + Integer functionAppScaleLimit(); + + /** + * Gets the healthCheckPath property: Health check path. + * + * @return the healthCheckPath value. + */ + String healthCheckPath(); + + /** + * Gets the functionsRuntimeScaleMonitoringEnabled property: Gets or sets a value indicating whether functions + * runtime scale monitoring is enabled. When enabled, the ScaleController will not monitor event sources directly, + * but will instead call to the runtime to get scale status. + * + * @return the functionsRuntimeScaleMonitoringEnabled value. + */ + Boolean functionsRuntimeScaleMonitoringEnabled(); + + /** + * Gets the websiteTimeZone property: Sets the time zone a site uses for generating timestamps. Compatible with + * Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For + * Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see + * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed + * under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * + * @return the websiteTimeZone value. + */ + String websiteTimeZone(); + + /** + * Gets the minimumElasticInstanceCount property: Number of minimum instance count for a site This setting only + * applies to the Elastic Plans. + * + * @return the minimumElasticInstanceCount value. + */ + Integer minimumElasticInstanceCount(); + + /** + * Gets the azureStorageAccounts property: List of Azure Storage Accounts. + * + * @return the azureStorageAccounts value. + */ + Map azureStorageAccounts(); + + /** + * Gets the publicNetworkAccess property: Property to allow or block all public traffic. + * + * @return the publicNetworkAccess value. + */ + String publicNetworkAccess(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigInner object. + * + * @return the inner object. + */ + SiteConfigInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigPropertiesDictionary.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigPropertiesDictionary.java new file mode 100644 index 0000000000000..6fca20e9917c1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigPropertiesDictionary.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Site config properties dictionary. */ +@Immutable +public final class SiteConfigPropertiesDictionary { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteConfigPropertiesDictionary.class); + + /* + * true if use32BitWorkerProcess should be set to true for the + * stack; otherwise, false. + */ + @JsonProperty(value = "use32BitWorkerProcess", access = JsonProperty.Access.WRITE_ONLY) + private Boolean use32BitWorkerProcess; + + /* + * LinuxFxVersion configuration setting. + */ + @JsonProperty(value = "linuxFxVersion", access = JsonProperty.Access.WRITE_ONLY) + private String linuxFxVersion; + + /* + * JavaVersion configuration setting. + */ + @JsonProperty(value = "javaVersion", access = JsonProperty.Access.WRITE_ONLY) + private String javaVersion; + + /* + * PowerShellVersion configuration setting. + */ + @JsonProperty(value = "powerShellVersion", access = JsonProperty.Access.WRITE_ONLY) + private String powerShellVersion; + + /** + * Get the use32BitWorkerProcess property: <code>true</code> if use32BitWorkerProcess should be set to + * true for the stack; otherwise, <code>false</code>. + * + * @return the use32BitWorkerProcess value. + */ + public Boolean use32BitWorkerProcess() { + return this.use32BitWorkerProcess; + } + + /** + * Get the linuxFxVersion property: LinuxFxVersion configuration setting. + * + * @return the linuxFxVersion value. + */ + public String linuxFxVersion() { + return this.linuxFxVersion; + } + + /** + * Get the javaVersion property: JavaVersion configuration setting. + * + * @return the javaVersion value. + */ + public String javaVersion() { + return this.javaVersion; + } + + /** + * Get the powerShellVersion property: PowerShellVersion configuration setting. + * + * @return the powerShellVersion value. + */ + public String powerShellVersion() { + return this.powerShellVersion; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigResource.java new file mode 100644 index 0000000000000..0e57bedc80b41 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigResource.java @@ -0,0 +1,538 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigResourceInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of SiteConfigResource. */ +public interface SiteConfigResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the numberOfWorkers property: Number of workers. + * + * @return the numberOfWorkers value. + */ + Integer numberOfWorkers(); + + /** + * Gets the defaultDocuments property: Default documents. + * + * @return the defaultDocuments value. + */ + List defaultDocuments(); + + /** + * Gets the netFrameworkVersion property: .NET Framework version. + * + * @return the netFrameworkVersion value. + */ + String netFrameworkVersion(); + + /** + * Gets the phpVersion property: Version of PHP. + * + * @return the phpVersion value. + */ + String phpVersion(); + + /** + * Gets the pythonVersion property: Version of Python. + * + * @return the pythonVersion value. + */ + String pythonVersion(); + + /** + * Gets the nodeVersion property: Version of Node.js. + * + * @return the nodeVersion value. + */ + String nodeVersion(); + + /** + * Gets the powerShellVersion property: Version of PowerShell. + * + * @return the powerShellVersion value. + */ + String powerShellVersion(); + + /** + * Gets the linuxFxVersion property: Linux App Framework and version. + * + * @return the linuxFxVersion value. + */ + String linuxFxVersion(); + + /** + * Gets the windowsFxVersion property: Xenon App Framework and version. + * + * @return the windowsFxVersion value. + */ + String windowsFxVersion(); + + /** + * Gets the requestTracingEnabled property: <code>true</code> if request tracing is enabled; otherwise, + * <code>false</code>. + * + * @return the requestTracingEnabled value. + */ + Boolean requestTracingEnabled(); + + /** + * Gets the requestTracingExpirationTime property: Request tracing expiration time. + * + * @return the requestTracingExpirationTime value. + */ + OffsetDateTime requestTracingExpirationTime(); + + /** + * Gets the remoteDebuggingEnabled property: <code>true</code> if remote debugging is enabled; + * otherwise, <code>false</code>. + * + * @return the remoteDebuggingEnabled value. + */ + Boolean remoteDebuggingEnabled(); + + /** + * Gets the remoteDebuggingVersion property: Remote debugging version. + * + * @return the remoteDebuggingVersion value. + */ + String remoteDebuggingVersion(); + + /** + * Gets the httpLoggingEnabled property: <code>true</code> if HTTP logging is enabled; otherwise, + * <code>false</code>. + * + * @return the httpLoggingEnabled value. + */ + Boolean httpLoggingEnabled(); + + /** + * Gets the acrUseManagedIdentityCreds property: Flag to use Managed Identity Creds for ACR pull. + * + * @return the acrUseManagedIdentityCreds value. + */ + Boolean acrUseManagedIdentityCreds(); + + /** + * Gets the acrUserManagedIdentityId property: If using user managed identity, the user managed identity ClientId. + * + * @return the acrUserManagedIdentityId value. + */ + String acrUserManagedIdentityId(); + + /** + * Gets the logsDirectorySizeLimit property: HTTP logs directory size limit. + * + * @return the logsDirectorySizeLimit value. + */ + Integer logsDirectorySizeLimit(); + + /** + * Gets the detailedErrorLoggingEnabled property: <code>true</code> if detailed error logging is + * enabled; otherwise, <code>false</code>. + * + * @return the detailedErrorLoggingEnabled value. + */ + Boolean detailedErrorLoggingEnabled(); + + /** + * Gets the publishingUsername property: Publishing user name. + * + * @return the publishingUsername value. + */ + String publishingUsername(); + + /** + * Gets the appSettings property: Application settings. + * + * @return the appSettings value. + */ + List appSettings(); + + /** + * Gets the connectionStrings property: Connection strings. + * + * @return the connectionStrings value. + */ + List connectionStrings(); + + /** + * Gets the machineKey property: Site MachineKey. + * + * @return the machineKey value. + */ + SiteMachineKey machineKey(); + + /** + * Gets the handlerMappings property: Handler mappings. + * + * @return the handlerMappings value. + */ + List handlerMappings(); + + /** + * Gets the documentRoot property: Document root. + * + * @return the documentRoot value. + */ + String documentRoot(); + + /** + * Gets the scmType property: SCM type. + * + * @return the scmType value. + */ + ScmType scmType(); + + /** + * Gets the use32BitWorkerProcess property: <code>true</code> to use 32-bit worker process; otherwise, + * <code>false</code>. + * + * @return the use32BitWorkerProcess value. + */ + Boolean use32BitWorkerProcess(); + + /** + * Gets the webSocketsEnabled property: <code>true</code> if WebSocket is enabled; otherwise, + * <code>false</code>. + * + * @return the webSocketsEnabled value. + */ + Boolean webSocketsEnabled(); + + /** + * Gets the alwaysOn property: <code>true</code> if Always On is enabled; otherwise, + * <code>false</code>. + * + * @return the alwaysOn value. + */ + Boolean alwaysOn(); + + /** + * Gets the javaVersion property: Java version. + * + * @return the javaVersion value. + */ + String javaVersion(); + + /** + * Gets the javaContainer property: Java container. + * + * @return the javaContainer value. + */ + String javaContainer(); + + /** + * Gets the javaContainerVersion property: Java container version. + * + * @return the javaContainerVersion value. + */ + String javaContainerVersion(); + + /** + * Gets the appCommandLine property: App command line to launch. + * + * @return the appCommandLine value. + */ + String appCommandLine(); + + /** + * Gets the managedPipelineMode property: Managed pipeline mode. + * + * @return the managedPipelineMode value. + */ + ManagedPipelineMode managedPipelineMode(); + + /** + * Gets the virtualApplications property: Virtual applications. + * + * @return the virtualApplications value. + */ + List virtualApplications(); + + /** + * Gets the loadBalancing property: Site load balancing. + * + * @return the loadBalancing value. + */ + SiteLoadBalancing loadBalancing(); + + /** + * Gets the experiments property: This is work around for polymorphic types. + * + * @return the experiments value. + */ + Experiments experiments(); + + /** + * Gets the limits property: Site limits. + * + * @return the limits value. + */ + SiteLimits limits(); + + /** + * Gets the autoHealEnabled property: <code>true</code> if Auto Heal is enabled; otherwise, + * <code>false</code>. + * + * @return the autoHealEnabled value. + */ + Boolean autoHealEnabled(); + + /** + * Gets the autoHealRules property: Auto Heal rules. + * + * @return the autoHealRules value. + */ + AutoHealRules autoHealRules(); + + /** + * Gets the tracingOptions property: Tracing options. + * + * @return the tracingOptions value. + */ + String tracingOptions(); + + /** + * Gets the vnetName property: Virtual Network name. + * + * @return the vnetName value. + */ + String vnetName(); + + /** + * Gets the vnetRouteAllEnabled property: Virtual Network Route All enabled. This causes all outbound traffic to + * have Virtual Network Security Groups and User Defined Routes applied. + * + * @return the vnetRouteAllEnabled value. + */ + Boolean vnetRouteAllEnabled(); + + /** + * Gets the vnetPrivatePortsCount property: The number of private ports assigned to this app. These will be assigned + * dynamically on runtime. + * + * @return the vnetPrivatePortsCount value. + */ + Integer vnetPrivatePortsCount(); + + /** + * Gets the cors property: Cross-Origin Resource Sharing (CORS) settings. + * + * @return the cors value. + */ + CorsSettings cors(); + + /** + * Gets the push property: Push endpoint settings. + * + * @return the push value. + */ + PushSettings push(); + + /** + * Gets the apiDefinition property: Information about the formal API definition for the app. + * + * @return the apiDefinition value. + */ + ApiDefinitionInfo apiDefinition(); + + /** + * Gets the apiManagementConfig property: Azure API management settings linked to the app. + * + * @return the apiManagementConfig value. + */ + ApiManagementConfig apiManagementConfig(); + + /** + * Gets the autoSwapSlotName property: Auto-swap slot name. + * + * @return the autoSwapSlotName value. + */ + String autoSwapSlotName(); + + /** + * Gets the localMySqlEnabled property: <code>true</code> to enable local MySQL; otherwise, + * <code>false</code>. + * + * @return the localMySqlEnabled value. + */ + Boolean localMySqlEnabled(); + + /** + * Gets the managedServiceIdentityId property: Managed Service Identity Id. + * + * @return the managedServiceIdentityId value. + */ + Integer managedServiceIdentityId(); + + /** + * Gets the xManagedServiceIdentityId property: Explicit Managed Service Identity Id. + * + * @return the xManagedServiceIdentityId value. + */ + Integer xManagedServiceIdentityId(); + + /** + * Gets the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + String keyVaultReferenceIdentity(); + + /** + * Gets the ipSecurityRestrictions property: IP security restrictions for main. + * + * @return the ipSecurityRestrictions value. + */ + List ipSecurityRestrictions(); + + /** + * Gets the scmIpSecurityRestrictions property: IP security restrictions for scm. + * + * @return the scmIpSecurityRestrictions value. + */ + List scmIpSecurityRestrictions(); + + /** + * Gets the scmIpSecurityRestrictionsUseMain property: IP security restrictions for scm to use main. + * + * @return the scmIpSecurityRestrictionsUseMain value. + */ + Boolean scmIpSecurityRestrictionsUseMain(); + + /** + * Gets the http20Enabled property: Http20Enabled: configures a web site to allow clients to connect over http2.0. + * + * @return the http20Enabled value. + */ + Boolean http20Enabled(); + + /** + * Gets the minTlsVersion property: MinTlsVersion: configures the minimum version of TLS required for SSL requests. + * + * @return the minTlsVersion value. + */ + SupportedTlsVersions minTlsVersion(); + + /** + * Gets the scmMinTlsVersion property: ScmMinTlsVersion: configures the minimum version of TLS required for SSL + * requests for SCM site. + * + * @return the scmMinTlsVersion value. + */ + SupportedTlsVersions scmMinTlsVersion(); + + /** + * Gets the ftpsState property: State of FTP / FTPS service. + * + * @return the ftpsState value. + */ + FtpsState ftpsState(); + + /** + * Gets the preWarmedInstanceCount property: Number of preWarmed instances. This setting only applies to the + * Consumption and Elastic Plans. + * + * @return the preWarmedInstanceCount value. + */ + Integer preWarmedInstanceCount(); + + /** + * Gets the functionAppScaleLimit property: Maximum number of workers that a site can scale out to. This setting + * only applies to the Consumption and Elastic Premium Plans. + * + * @return the functionAppScaleLimit value. + */ + Integer functionAppScaleLimit(); + + /** + * Gets the healthCheckPath property: Health check path. + * + * @return the healthCheckPath value. + */ + String healthCheckPath(); + + /** + * Gets the functionsRuntimeScaleMonitoringEnabled property: Gets or sets a value indicating whether functions + * runtime scale monitoring is enabled. When enabled, the ScaleController will not monitor event sources directly, + * but will instead call to the runtime to get scale status. + * + * @return the functionsRuntimeScaleMonitoringEnabled value. + */ + Boolean functionsRuntimeScaleMonitoringEnabled(); + + /** + * Gets the websiteTimeZone property: Sets the time zone a site uses for generating timestamps. Compatible with + * Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For + * Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see + * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed + * under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * + * @return the websiteTimeZone value. + */ + String websiteTimeZone(); + + /** + * Gets the minimumElasticInstanceCount property: Number of minimum instance count for a site This setting only + * applies to the Elastic Plans. + * + * @return the minimumElasticInstanceCount value. + */ + Integer minimumElasticInstanceCount(); + + /** + * Gets the azureStorageAccounts property: List of Azure Storage Accounts. + * + * @return the azureStorageAccounts value. + */ + Map azureStorageAccounts(); + + /** + * Gets the publicNetworkAccess property: Property to allow or block all public traffic. + * + * @return the publicNetworkAccess value. + */ + String publicNetworkAccess(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigResourceInner object. + * + * @return the inner object. + */ + SiteConfigResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigResourceCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigResourceCollection.java new file mode 100644 index 0000000000000..97cde39ecd42a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigResourceCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of site configurations. */ +@Fluent +public final class SiteConfigResourceCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteConfigResourceCollection.class); + + /* + * 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; + + /** + * 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 SiteConfigResourceCollection object itself. + */ + public SiteConfigResourceCollection 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 SiteConfigResourceCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigurationSnapshotInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigurationSnapshotInfo.java new file mode 100644 index 0000000000000..17c2c067a4505 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigurationSnapshotInfo.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigurationSnapshotInfoInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of SiteConfigurationSnapshotInfo. */ +public interface SiteConfigurationSnapshotInfo { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the time property: The time the snapshot was taken. + * + * @return the time value. + */ + OffsetDateTime time(); + + /** + * Gets the snapshotId property: The id of the snapshot. + * + * @return the snapshotId value. + */ + Integer snapshotId(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigurationSnapshotInfoInner + * object. + * + * @return the inner object. + */ + SiteConfigurationSnapshotInfoInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigurationSnapshotInfoCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigurationSnapshotInfoCollection.java new file mode 100644 index 0000000000000..6a2686641ac44 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteConfigurationSnapshotInfoCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigurationSnapshotInfoInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of metadata for the app configuration snapshots that can be restored. */ +@Fluent +public final class SiteConfigurationSnapshotInfoCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteConfigurationSnapshotInfoCollection.class); + + /* + * 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; + + /** + * 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 SiteConfigurationSnapshotInfoCollection object itself. + */ + public SiteConfigurationSnapshotInfoCollection 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 SiteConfigurationSnapshotInfoCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionInfo.java new file mode 100644 index 0000000000000..31f989ed1888c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionInfo.java @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteExtensionInfoInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of SiteExtensionInfo. */ +public interface SiteExtensionInfo { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the extensionId property: Site extension ID. + * + * @return the extensionId value. + */ + String extensionId(); + + /** + * Gets the title property: The title property. + * + * @return the title value. + */ + String title(); + + /** + * Gets the extensionType property: Site extension type. + * + * @return the extensionType value. + */ + SiteExtensionType extensionType(); + + /** + * Gets the summary property: Summary description. + * + * @return the summary value. + */ + String summary(); + + /** + * Gets the description property: Detailed description. + * + * @return the description value. + */ + String description(); + + /** + * Gets the version property: Version information. + * + * @return the version value. + */ + String version(); + + /** + * Gets the extensionUrl property: Extension URL. + * + * @return the extensionUrl value. + */ + String extensionUrl(); + + /** + * Gets the projectUrl property: Project URL. + * + * @return the projectUrl value. + */ + String projectUrl(); + + /** + * Gets the iconUrl property: Icon URL. + * + * @return the iconUrl value. + */ + String iconUrl(); + + /** + * Gets the licenseUrl property: License URL. + * + * @return the licenseUrl value. + */ + String licenseUrl(); + + /** + * Gets the feedUrl property: Feed URL. + * + * @return the feedUrl value. + */ + String feedUrl(); + + /** + * Gets the authors property: List of authors. + * + * @return the authors value. + */ + List authors(); + + /** + * Gets the installerCommandLineParams property: Installer command line parameters. + * + * @return the installerCommandLineParams value. + */ + String installerCommandLineParams(); + + /** + * Gets the publishedDateTime property: Published timestamp. + * + * @return the publishedDateTime value. + */ + OffsetDateTime publishedDateTime(); + + /** + * Gets the downloadCount property: Count of downloads. + * + * @return the downloadCount value. + */ + Integer downloadCount(); + + /** + * Gets the localIsLatestVersion property: <code>true</code> if the local version is the latest version; + * <code>false</code> otherwise. + * + * @return the localIsLatestVersion value. + */ + Boolean localIsLatestVersion(); + + /** + * Gets the localPath property: Local path. + * + * @return the localPath value. + */ + String localPath(); + + /** + * Gets the installedDateTime property: Installed timestamp. + * + * @return the installedDateTime value. + */ + OffsetDateTime installedDateTime(); + + /** + * Gets the provisioningState property: Provisioning state. + * + * @return the provisioningState value. + */ + String provisioningState(); + + /** + * Gets the comment property: Site Extension comment. + * + * @return the comment value. + */ + String comment(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteExtensionInfoInner object. + * + * @return the inner object. + */ + SiteExtensionInfoInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionInfoCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionInfoCollection.java new file mode 100644 index 0000000000000..82f57fe2f5cf8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionInfoCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteExtensionInfoInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu site extension information elements. */ +@Fluent +public final class SiteExtensionInfoCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteExtensionInfoCollection.class); + + /* + * 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; + + /** + * 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 SiteExtensionInfoCollection object itself. + */ + public SiteExtensionInfoCollection 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 SiteExtensionInfoCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionType.java new file mode 100644 index 0000000000000..5f00c6f3fd0d5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteExtensionType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for SiteExtensionType. */ +public enum SiteExtensionType { + /** Enum value Gallery. */ + GALLERY("Gallery"), + + /** Enum value WebRoot. */ + WEB_ROOT("WebRoot"); + + /** The actual serialized value for a SiteExtensionType instance. */ + private final String value; + + SiteExtensionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SiteExtensionType instance. + * + * @param value the serialized value to parse. + * @return the parsed SiteExtensionType object, or null if unable to parse. + */ + @JsonCreator + public static SiteExtensionType fromString(String value) { + SiteExtensionType[] items = SiteExtensionType.values(); + for (SiteExtensionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLimits.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLimits.java new file mode 100644 index 0000000000000..317f3d6b315d2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLimits.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Metric limits set on an app. */ +@Fluent +public final class SiteLimits { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteLimits.class); + + /* + * Maximum allowed CPU usage percentage. + */ + @JsonProperty(value = "maxPercentageCpu") + private Double maxPercentageCpu; + + /* + * Maximum allowed memory usage in MB. + */ + @JsonProperty(value = "maxMemoryInMb") + private Long maxMemoryInMb; + + /* + * Maximum allowed disk size usage in MB. + */ + @JsonProperty(value = "maxDiskSizeInMb") + private Long maxDiskSizeInMb; + + /** + * Get the maxPercentageCpu property: Maximum allowed CPU usage percentage. + * + * @return the maxPercentageCpu value. + */ + public Double maxPercentageCpu() { + return this.maxPercentageCpu; + } + + /** + * Set the maxPercentageCpu property: Maximum allowed CPU usage percentage. + * + * @param maxPercentageCpu the maxPercentageCpu value to set. + * @return the SiteLimits object itself. + */ + public SiteLimits withMaxPercentageCpu(Double maxPercentageCpu) { + this.maxPercentageCpu = maxPercentageCpu; + return this; + } + + /** + * Get the maxMemoryInMb property: Maximum allowed memory usage in MB. + * + * @return the maxMemoryInMb value. + */ + public Long maxMemoryInMb() { + return this.maxMemoryInMb; + } + + /** + * Set the maxMemoryInMb property: Maximum allowed memory usage in MB. + * + * @param maxMemoryInMb the maxMemoryInMb value to set. + * @return the SiteLimits object itself. + */ + public SiteLimits withMaxMemoryInMb(Long maxMemoryInMb) { + this.maxMemoryInMb = maxMemoryInMb; + return this; + } + + /** + * Get the maxDiskSizeInMb property: Maximum allowed disk size usage in MB. + * + * @return the maxDiskSizeInMb value. + */ + public Long maxDiskSizeInMb() { + return this.maxDiskSizeInMb; + } + + /** + * Set the maxDiskSizeInMb property: Maximum allowed disk size usage in MB. + * + * @param maxDiskSizeInMb the maxDiskSizeInMb value to set. + * @return the SiteLimits object itself. + */ + public SiteLimits withMaxDiskSizeInMb(Long maxDiskSizeInMb) { + this.maxDiskSizeInMb = maxDiskSizeInMb; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLoadBalancing.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLoadBalancing.java new file mode 100644 index 0000000000000..51a01c3bf4457 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLoadBalancing.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for SiteLoadBalancing. */ +public enum SiteLoadBalancing { + /** Enum value WeightedRoundRobin. */ + WEIGHTED_ROUND_ROBIN("WeightedRoundRobin"), + + /** Enum value LeastRequests. */ + LEAST_REQUESTS("LeastRequests"), + + /** Enum value LeastResponseTime. */ + LEAST_RESPONSE_TIME("LeastResponseTime"), + + /** Enum value WeightedTotalTraffic. */ + WEIGHTED_TOTAL_TRAFFIC("WeightedTotalTraffic"), + + /** Enum value RequestHash. */ + REQUEST_HASH("RequestHash"), + + /** Enum value PerSiteRoundRobin. */ + PER_SITE_ROUND_ROBIN("PerSiteRoundRobin"); + + /** The actual serialized value for a SiteLoadBalancing instance. */ + private final String value; + + SiteLoadBalancing(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SiteLoadBalancing instance. + * + * @param value the serialized value to parse. + * @return the parsed SiteLoadBalancing object, or null if unable to parse. + */ + @JsonCreator + public static SiteLoadBalancing fromString(String value) { + SiteLoadBalancing[] items = SiteLoadBalancing.values(); + for (SiteLoadBalancing item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLogsConfig.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLogsConfig.java new file mode 100644 index 0000000000000..8594059f26cfa --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteLogsConfig.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteLogsConfigInner; + +/** An immutable client-side representation of SiteLogsConfig. */ +public interface SiteLogsConfig { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the applicationLogs property: Application logs configuration. + * + * @return the applicationLogs value. + */ + ApplicationLogsConfig applicationLogs(); + + /** + * Gets the httpLogs property: HTTP logs configuration. + * + * @return the httpLogs value. + */ + HttpLogsConfig httpLogs(); + + /** + * Gets the failedRequestsTracing property: Failed requests tracing configuration. + * + * @return the failedRequestsTracing value. + */ + EnabledConfig failedRequestsTracing(); + + /** + * Gets the detailedErrorMessages property: Detailed error messages configuration. + * + * @return the detailedErrorMessages value. + */ + EnabledConfig detailedErrorMessages(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteLogsConfigInner object. + * + * @return the inner object. + */ + SiteLogsConfigInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteMachineKey.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteMachineKey.java new file mode 100644 index 0000000000000..c72fc260f8183 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteMachineKey.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** MachineKey of an app. */ +@Fluent +public final class SiteMachineKey { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteMachineKey.class); + + /* + * MachineKey validation. + */ + @JsonProperty(value = "validation") + private String validation; + + /* + * Validation key. + */ + @JsonProperty(value = "validationKey") + private String validationKey; + + /* + * Algorithm used for decryption. + */ + @JsonProperty(value = "decryption") + private String decryption; + + /* + * Decryption key. + */ + @JsonProperty(value = "decryptionKey") + private String decryptionKey; + + /** + * Get the validation property: MachineKey validation. + * + * @return the validation value. + */ + public String validation() { + return this.validation; + } + + /** + * Set the validation property: MachineKey validation. + * + * @param validation the validation value to set. + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withValidation(String validation) { + this.validation = validation; + return this; + } + + /** + * Get the validationKey property: Validation key. + * + * @return the validationKey value. + */ + public String validationKey() { + return this.validationKey; + } + + /** + * Set the validationKey property: Validation key. + * + * @param validationKey the validationKey value to set. + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withValidationKey(String validationKey) { + this.validationKey = validationKey; + return this; + } + + /** + * Get the decryption property: Algorithm used for decryption. + * + * @return the decryption value. + */ + public String decryption() { + return this.decryption; + } + + /** + * Set the decryption property: Algorithm used for decryption. + * + * @param decryption the decryption value to set. + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withDecryption(String decryption) { + this.decryption = decryption; + return this; + } + + /** + * Get the decryptionKey property: Decryption key. + * + * @return the decryptionKey value. + */ + public String decryptionKey() { + return this.decryptionKey; + } + + /** + * Set the decryptionKey property: Decryption key. + * + * @param decryptionKey the decryptionKey value to set. + * @return the SiteMachineKey object itself. + */ + public SiteMachineKey withDecryptionKey(String decryptionKey) { + this.decryptionKey = decryptionKey; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePatchResource.java new file mode 100644 index 0000000000000..877ef95bd915f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePatchResource.java @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourceInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** An immutable client-side representation of SitePatchResource. */ +public interface SitePatchResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the identity property: Managed service identity. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the state property: Current state of the app. + * + * @return the state value. + */ + String state(); + + /** + * Gets the hostNames property: Hostnames associated with the app. + * + * @return the hostNames value. + */ + List hostNames(); + + /** + * Gets the repositorySiteName property: Name of the repository site. + * + * @return the repositorySiteName value. + */ + String repositorySiteName(); + + /** + * Gets the usageState property: State indicating whether the app has exceeded its quota usage. Read-only. + * + * @return the usageState value. + */ + UsageState usageState(); + + /** + * Gets the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value. + */ + Boolean enabled(); + + /** + * Gets the enabledHostNames property: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) + * AND enabled. Otherwise, the app is not served on those hostnames. + * + * @return the enabledHostNames value. + */ + List enabledHostNames(); + + /** + * Gets the availabilityState property: Management information availability state for the app. + * + * @return the availabilityState value. + */ + SiteAvailabilityState availabilityState(); + + /** + * Gets the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostnameSslStates value. + */ + List hostnameSslStates(); + + /** + * Gets the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * Gets the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value. + */ + Boolean reserved(); + + /** + * Gets the isXenon property: Obsolete: Hyper-V sandbox. + * + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * Gets the hyperV property: Hyper-V sandbox. + * + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * Gets the lastModifiedTimeUtc property: Last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value. + */ + OffsetDateTime lastModifiedTimeUtc(); + + /** + * Gets the siteConfig property: Configuration of the app. + * + * @return the siteConfig value. + */ + SiteConfig siteConfig(); + + /** + * Gets the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value. + */ + List trafficManagerHostNames(); + + /** + * Gets the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value. + */ + Boolean scmSiteAlsoStopped(); + + /** + * Gets the targetSwapSlot property: Specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value. + */ + String targetSwapSlot(); + + /** + * Gets the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * Gets the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @return the clientAffinityEnabled value. + */ + Boolean clientAffinityEnabled(); + + /** + * Gets the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @return the clientCertEnabled value. + */ + Boolean clientCertEnabled(); + + /** + * Gets the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @return the clientCertMode value. + */ + ClientCertMode clientCertMode(); + + /** + * Gets the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value. + */ + String clientCertExclusionPaths(); + + /** + * Gets the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @return the hostNamesDisabled value. + */ + Boolean hostNamesDisabled(); + + /** + * Gets the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @return the customDomainVerificationId value. + */ + String customDomainVerificationId(); + + /** + * Gets the outboundIpAddresses property: List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + * + * @return the outboundIpAddresses value. + */ + String outboundIpAddresses(); + + /** + * Gets the possibleOutboundIpAddresses property: List of IP addresses that the app uses for outbound connections + * (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value. + */ + String possibleOutboundIpAddresses(); + + /** + * Gets the containerSize property: Size of the function container. + * + * @return the containerSize value. + */ + Integer containerSize(); + + /** + * Gets the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps + * only). + * + * @return the dailyMemoryTimeQuota value. + */ + Integer dailyMemoryTimeQuota(); + + /** + * Gets the suspendedTill property: App suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value. + */ + OffsetDateTime suspendedTill(); + + /** + * Gets the maxNumberOfWorkers property: Maximum number of workers. This only applies to Functions container. + * + * @return the maxNumberOfWorkers value. + */ + Integer maxNumberOfWorkers(); + + /** + * Gets the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value. + */ + CloningInfo cloningInfo(); + + /** + * Gets the resourceGroup property: Name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * Gets the isDefaultContainer property: <code>true</code> if the app is a default container; otherwise, + * <code>false</code>. + * + * @return the isDefaultContainer value. + */ + Boolean isDefaultContainer(); + + /** + * Gets the defaultHostname property: Default hostname of the app. Read-only. + * + * @return the defaultHostname value. + */ + String defaultHostname(); + + /** + * Gets the slotSwapStatus property: Status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value. + */ + SlotSwapStatus slotSwapStatus(); + + /** + * Gets the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @return the httpsOnly value. + */ + Boolean httpsOnly(); + + /** + * Gets the redundancyMode property: Site redundancy mode. + * + * @return the redundancyMode value. + */ + RedundancyMode redundancyMode(); + + /** + * Gets the inProgressOperationId property: Specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value. + */ + UUID inProgressOperationId(); + + /** + * Gets the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @return the storageAccountRequired value. + */ + Boolean storageAccountRequired(); + + /** + * Gets the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + String keyVaultReferenceIdentity(); + + /** + * Gets the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be + * joined by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkSubnetId value. + */ + String virtualNetworkSubnetId(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourceInner object. + * + * @return the inner object. + */ + SitePatchResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePatchResourceProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePatchResourceProperties.java new file mode 100644 index 0000000000000..2a0989b2ecc8d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePatchResourceProperties.java @@ -0,0 +1,329 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourcePropertiesInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** An immutable client-side representation of SitePatchResourceProperties. */ +public interface SitePatchResourceProperties { + /** + * Gets the state property: Current state of the app. + * + * @return the state value. + */ + String state(); + + /** + * Gets the hostNames property: Hostnames associated with the app. + * + * @return the hostNames value. + */ + List hostNames(); + + /** + * Gets the repositorySiteName property: Name of the repository site. + * + * @return the repositorySiteName value. + */ + String repositorySiteName(); + + /** + * Gets the usageState property: State indicating whether the app has exceeded its quota usage. Read-only. + * + * @return the usageState value. + */ + UsageState usageState(); + + /** + * Gets the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value. + */ + Boolean enabled(); + + /** + * Gets the enabledHostNames property: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) + * AND enabled. Otherwise, the app is not served on those hostnames. + * + * @return the enabledHostNames value. + */ + List enabledHostNames(); + + /** + * Gets the availabilityState property: Management information availability state for the app. + * + * @return the availabilityState value. + */ + SiteAvailabilityState availabilityState(); + + /** + * Gets the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostnameSslStates value. + */ + List hostnameSslStates(); + + /** + * Gets the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * Gets the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value. + */ + Boolean reserved(); + + /** + * Gets the isXenon property: Obsolete: Hyper-V sandbox. + * + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * Gets the hyperV property: Hyper-V sandbox. + * + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * Gets the lastModifiedTimeUtc property: Last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value. + */ + OffsetDateTime lastModifiedTimeUtc(); + + /** + * Gets the siteConfig property: Configuration of the app. + * + * @return the siteConfig value. + */ + SiteConfig siteConfig(); + + /** + * Gets the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value. + */ + List trafficManagerHostNames(); + + /** + * Gets the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value. + */ + Boolean scmSiteAlsoStopped(); + + /** + * Gets the targetSwapSlot property: Specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value. + */ + String targetSwapSlot(); + + /** + * Gets the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * Gets the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @return the clientAffinityEnabled value. + */ + Boolean clientAffinityEnabled(); + + /** + * Gets the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @return the clientCertEnabled value. + */ + Boolean clientCertEnabled(); + + /** + * Gets the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @return the clientCertMode value. + */ + ClientCertMode clientCertMode(); + + /** + * Gets the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value. + */ + String clientCertExclusionPaths(); + + /** + * Gets the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @return the hostNamesDisabled value. + */ + Boolean hostNamesDisabled(); + + /** + * Gets the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @return the customDomainVerificationId value. + */ + String customDomainVerificationId(); + + /** + * Gets the outboundIpAddresses property: List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + * + * @return the outboundIpAddresses value. + */ + String outboundIpAddresses(); + + /** + * Gets the possibleOutboundIpAddresses property: List of IP addresses that the app uses for outbound connections + * (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value. + */ + String possibleOutboundIpAddresses(); + + /** + * Gets the containerSize property: Size of the function container. + * + * @return the containerSize value. + */ + Integer containerSize(); + + /** + * Gets the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps + * only). + * + * @return the dailyMemoryTimeQuota value. + */ + Integer dailyMemoryTimeQuota(); + + /** + * Gets the suspendedTill property: App suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value. + */ + OffsetDateTime suspendedTill(); + + /** + * Gets the maxNumberOfWorkers property: Maximum number of workers. This only applies to Functions container. + * + * @return the maxNumberOfWorkers value. + */ + Integer maxNumberOfWorkers(); + + /** + * Gets the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value. + */ + CloningInfo cloningInfo(); + + /** + * Gets the resourceGroup property: Name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * Gets the isDefaultContainer property: <code>true</code> if the app is a default container; otherwise, + * <code>false</code>. + * + * @return the isDefaultContainer value. + */ + Boolean isDefaultContainer(); + + /** + * Gets the defaultHostname property: Default hostname of the app. Read-only. + * + * @return the defaultHostname value. + */ + String defaultHostname(); + + /** + * Gets the slotSwapStatus property: Status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value. + */ + SlotSwapStatus slotSwapStatus(); + + /** + * Gets the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @return the httpsOnly value. + */ + Boolean httpsOnly(); + + /** + * Gets the redundancyMode property: Site redundancy mode. + * + * @return the redundancyMode value. + */ + RedundancyMode redundancyMode(); + + /** + * Gets the inProgressOperationId property: Specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value. + */ + UUID inProgressOperationId(); + + /** + * Gets the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @return the storageAccountRequired value. + */ + Boolean storageAccountRequired(); + + /** + * Gets the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + String keyVaultReferenceIdentity(); + + /** + * Gets the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be + * joined by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkSubnetId value. + */ + String virtualNetworkSubnetId(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourcePropertiesInner + * object. + * + * @return the inner object. + */ + SitePatchResourcePropertiesInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePhpErrorLogFlag.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePhpErrorLogFlag.java new file mode 100644 index 0000000000000..8b2fde5567a33 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SitePhpErrorLogFlag.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePhpErrorLogFlagInner; + +/** An immutable client-side representation of SitePhpErrorLogFlag. */ +public interface SitePhpErrorLogFlag { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the localLogErrors property: Local log_errors setting. + * + * @return the localLogErrors value. + */ + String localLogErrors(); + + /** + * Gets the masterLogErrors property: Master log_errors setting. + * + * @return the masterLogErrors value. + */ + String masterLogErrors(); + + /** + * Gets the localLogErrorsMaxLength property: Local log_errors_max_len setting. + * + * @return the localLogErrorsMaxLength value. + */ + String localLogErrorsMaxLength(); + + /** + * Gets the masterLogErrorsMaxLength property: Master log_errors_max_len setting. + * + * @return the masterLogErrorsMaxLength value. + */ + String masterLogErrorsMaxLength(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SitePhpErrorLogFlagInner object. + * + * @return the inner object. + */ + SitePhpErrorLogFlagInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteProperties.java new file mode 100644 index 0000000000000..8664e09e58ed8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteProperties.java @@ -0,0 +1,328 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePropertiesInner; +import java.time.OffsetDateTime; +import java.util.List; +import java.util.UUID; + +/** An immutable client-side representation of SiteProperties. */ +public interface SiteProperties { + /** + * Gets the state property: Current state of the app. + * + * @return the state value. + */ + String state(); + + /** + * Gets the hostNames property: Hostnames associated with the app. + * + * @return the hostNames value. + */ + List hostNames(); + + /** + * Gets the repositorySiteName property: Name of the repository site. + * + * @return the repositorySiteName value. + */ + String repositorySiteName(); + + /** + * Gets the usageState property: State indicating whether the app has exceeded its quota usage. Read-only. + * + * @return the usageState value. + */ + UsageState usageState(); + + /** + * Gets the enabled property: <code>true</code> if the app is enabled; otherwise, + * <code>false</code>. Setting this value to false disables the app (takes the app offline). + * + * @return the enabled value. + */ + Boolean enabled(); + + /** + * Gets the enabledHostNames property: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) + * AND enabled. Otherwise, the app is not served on those hostnames. + * + * @return the enabledHostNames value. + */ + List enabledHostNames(); + + /** + * Gets the availabilityState property: Management information availability state for the app. + * + * @return the availabilityState value. + */ + SiteAvailabilityState availabilityState(); + + /** + * Gets the hostnameSslStates property: Hostname SSL states are used to manage the SSL bindings for app's hostnames. + * + * @return the hostnameSslStates value. + */ + List hostnameSslStates(); + + /** + * Gets the serverFarmId property: Resource ID of the associated App Service plan, formatted as: + * "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms" + + "/{appServicePlanName}". + * + * @return the serverFarmId value. + */ + String serverFarmId(); + + /** + * Gets the reserved property: <code>true</code> if reserved; otherwise, <code>false</code>. + * + * @return the reserved value. + */ + Boolean reserved(); + + /** + * Gets the isXenon property: Obsolete: Hyper-V sandbox. + * + * @return the isXenon value. + */ + Boolean isXenon(); + + /** + * Gets the hyperV property: Hyper-V sandbox. + * + * @return the hyperV value. + */ + Boolean hyperV(); + + /** + * Gets the lastModifiedTimeUtc property: Last time the app was modified, in UTC. Read-only. + * + * @return the lastModifiedTimeUtc value. + */ + OffsetDateTime lastModifiedTimeUtc(); + + /** + * Gets the siteConfig property: Configuration of the app. + * + * @return the siteConfig value. + */ + SiteConfig siteConfig(); + + /** + * Gets the trafficManagerHostNames property: Azure Traffic Manager hostnames associated with the app. Read-only. + * + * @return the trafficManagerHostNames value. + */ + List trafficManagerHostNames(); + + /** + * Gets the scmSiteAlsoStopped property: <code>true</code> to stop SCM (KUDU) site when the app is + * stopped; otherwise, <code>false</code>. The default is <code>false</code>. + * + * @return the scmSiteAlsoStopped value. + */ + Boolean scmSiteAlsoStopped(); + + /** + * Gets the targetSwapSlot property: Specifies which deployment slot this app will swap into. Read-only. + * + * @return the targetSwapSlot value. + */ + String targetSwapSlot(); + + /** + * Gets the hostingEnvironmentProfile property: App Service Environment to use for the app. + * + * @return the hostingEnvironmentProfile value. + */ + HostingEnvironmentProfile hostingEnvironmentProfile(); + + /** + * Gets the clientAffinityEnabled property: <code>true</code> to enable client affinity; + * <code>false</code> to stop sending session affinity cookies, which route client requests in the same + * session to the same instance. Default is <code>true</code>. + * + * @return the clientAffinityEnabled value. + */ + Boolean clientAffinityEnabled(); + + /** + * Gets the clientCertEnabled property: <code>true</code> to enable client certificate authentication + * (TLS mutual authentication); otherwise, <code>false</code>. Default is + * <code>false</code>. + * + * @return the clientCertEnabled value. + */ + Boolean clientCertEnabled(); + + /** + * Gets the clientCertMode property: This composes with ClientCertEnabled setting. - ClientCertEnabled: false means + * ClientCert is ignored. - ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required. - + * ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. + * + * @return the clientCertMode value. + */ + ClientCertMode clientCertMode(); + + /** + * Gets the clientCertExclusionPaths property: client certificate authentication comma-separated exclusion paths. + * + * @return the clientCertExclusionPaths value. + */ + String clientCertExclusionPaths(); + + /** + * Gets the hostNamesDisabled property: <code>true</code> to disable the public hostnames of the app; + * otherwise, <code>false</code>. If <code>true</code>, the app is only accessible via API + * management process. + * + * @return the hostNamesDisabled value. + */ + Boolean hostNamesDisabled(); + + /** + * Gets the customDomainVerificationId property: Unique identifier that verifies the custom domains assigned to the + * app. Customer will add this id to a txt record for verification. + * + * @return the customDomainVerificationId value. + */ + String customDomainVerificationId(); + + /** + * Gets the outboundIpAddresses property: List of IP addresses that the app uses for outbound connections (e.g. + * database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only. + * + * @return the outboundIpAddresses value. + */ + String outboundIpAddresses(); + + /** + * Gets the possibleOutboundIpAddresses property: List of IP addresses that the app uses for outbound connections + * (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only. + * + * @return the possibleOutboundIpAddresses value. + */ + String possibleOutboundIpAddresses(); + + /** + * Gets the containerSize property: Size of the function container. + * + * @return the containerSize value. + */ + Integer containerSize(); + + /** + * Gets the dailyMemoryTimeQuota property: Maximum allowed daily memory-time quota (applicable on dynamic apps + * only). + * + * @return the dailyMemoryTimeQuota value. + */ + Integer dailyMemoryTimeQuota(); + + /** + * Gets the suspendedTill property: App suspended till in case memory-time quota is exceeded. + * + * @return the suspendedTill value. + */ + OffsetDateTime suspendedTill(); + + /** + * Gets the maxNumberOfWorkers property: Maximum number of workers. This only applies to Functions container. + * + * @return the maxNumberOfWorkers value. + */ + Integer maxNumberOfWorkers(); + + /** + * Gets the cloningInfo property: If specified during app creation, the app is cloned from a source app. + * + * @return the cloningInfo value. + */ + CloningInfo cloningInfo(); + + /** + * Gets the resourceGroup property: Name of the resource group the app belongs to. Read-only. + * + * @return the resourceGroup value. + */ + String resourceGroup(); + + /** + * Gets the isDefaultContainer property: <code>true</code> if the app is a default container; otherwise, + * <code>false</code>. + * + * @return the isDefaultContainer value. + */ + Boolean isDefaultContainer(); + + /** + * Gets the defaultHostname property: Default hostname of the app. Read-only. + * + * @return the defaultHostname value. + */ + String defaultHostname(); + + /** + * Gets the slotSwapStatus property: Status of the last deployment slot swap operation. + * + * @return the slotSwapStatus value. + */ + SlotSwapStatus slotSwapStatus(); + + /** + * Gets the httpsOnly property: HttpsOnly: configures a web site to accept only https requests. Issues redirect for + * http requests. + * + * @return the httpsOnly value. + */ + Boolean httpsOnly(); + + /** + * Gets the redundancyMode property: Site redundancy mode. + * + * @return the redundancyMode value. + */ + RedundancyMode redundancyMode(); + + /** + * Gets the inProgressOperationId property: Specifies an operation id if this site has a pending operation. + * + * @return the inProgressOperationId value. + */ + UUID inProgressOperationId(); + + /** + * Gets the storageAccountRequired property: Checks if Customer provided storage account is required. + * + * @return the storageAccountRequired value. + */ + Boolean storageAccountRequired(); + + /** + * Gets the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + String keyVaultReferenceIdentity(); + + /** + * Gets the virtualNetworkSubnetId property: Azure Resource Manager ID of the Virtual network and subnet to be + * joined by Regional VNET Integration. This must be of the form + * /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + * + * @return the virtualNetworkSubnetId value. + */ + String virtualNetworkSubnetId(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SitePropertiesInner object. + * + * @return the inner object. + */ + SitePropertiesInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteRuntimeState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteRuntimeState.java new file mode 100644 index 0000000000000..e752f5db6d5e4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteRuntimeState.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for SiteRuntimeState. */ +public enum SiteRuntimeState { + /** Enum value READY. */ + READY("READY"), + + /** Enum value STOPPED. */ + STOPPED("STOPPED"), + + /** Enum value UNKNOWN. */ + UNKNOWN("UNKNOWN"); + + /** The actual serialized value for a SiteRuntimeState instance. */ + private final String value; + + SiteRuntimeState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SiteRuntimeState instance. + * + * @param value the serialized value to parse. + * @return the parsed SiteRuntimeState object, or null if unable to parse. + */ + @JsonCreator + public static SiteRuntimeState fromString(String value) { + SiteRuntimeState[] items = SiteRuntimeState.values(); + for (SiteRuntimeState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSeal.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSeal.java new file mode 100644 index 0000000000000..d4c2d3204489e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSeal.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSealInner; + +/** An immutable client-side representation of SiteSeal. */ +public interface SiteSeal { + /** + * Gets the html property: HTML snippet. + * + * @return the html value. + */ + String html(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteSealInner object. + * + * @return the inner object. + */ + SiteSealInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSealRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSealRequest.java new file mode 100644 index 0000000000000..3d59d46c8e8df --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSealRequest.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Site seal request. */ +@Fluent +public final class SiteSealRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SiteSealRequest.class); + + /* + * If true use the light color theme for site seal; otherwise, + * use the default color theme. + */ + @JsonProperty(value = "lightTheme") + private Boolean lightTheme; + + /* + * Locale of site seal. + */ + @JsonProperty(value = "locale") + private String locale; + + /** + * Get the lightTheme property: If <code>true</code> use the light color theme for site seal; otherwise, + * use the default color theme. + * + * @return the lightTheme value. + */ + public Boolean lightTheme() { + return this.lightTheme; + } + + /** + * Set the lightTheme property: If <code>true</code> use the light color theme for site seal; otherwise, + * use the default color theme. + * + * @param lightTheme the lightTheme value to set. + * @return the SiteSealRequest object itself. + */ + public SiteSealRequest withLightTheme(Boolean lightTheme) { + this.lightTheme = lightTheme; + return this; + } + + /** + * Get the locale property: Locale of site seal. + * + * @return the locale value. + */ + public String locale() { + return this.locale; + } + + /** + * Set the locale property: Locale of site seal. + * + * @param locale the locale value to set. + * @return the SiteSealRequest object itself. + */ + public SiteSealRequest withLocale(String locale) { + this.locale = locale; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSourceControl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSourceControl.java new file mode 100644 index 0000000000000..b51426bc4b140 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SiteSourceControl.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSourceControlInner; + +/** An immutable client-side representation of SiteSourceControl. */ +public interface SiteSourceControl { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the repoUrl property: Repository or source control URL. + * + * @return the repoUrl value. + */ + String repoUrl(); + + /** + * Gets the branch property: Name of branch to use for deployment. + * + * @return the branch value. + */ + String branch(); + + /** + * Gets the isManualIntegration property: <code>true</code> to limit to manual integration; + * <code>false</code> to enable continuous integration (which configures webhooks into online repos like + * GitHub). + * + * @return the isManualIntegration value. + */ + Boolean isManualIntegration(); + + /** + * Gets the isGitHubAction property: <code>true</code> if this is deployed via GitHub action. + * + * @return the isGitHubAction value. + */ + Boolean isGitHubAction(); + + /** + * Gets the deploymentRollbackEnabled property: <code>true</code> to enable deployment rollback; + * otherwise, <code>false</code>. + * + * @return the deploymentRollbackEnabled value. + */ + Boolean deploymentRollbackEnabled(); + + /** + * Gets the isMercurial property: <code>true</code> for a Mercurial repository; + * <code>false</code> for a Git repository. + * + * @return the isMercurial value. + */ + Boolean isMercurial(); + + /** + * Gets the gitHubActionConfiguration property: If GitHub Action is selected, than the associated configuration. + * + * @return the gitHubActionConfiguration value. + */ + GitHubActionConfiguration gitHubActionConfiguration(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SiteSourceControlInner object. + * + * @return the inner object. + */ + SiteSourceControlInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuCapacity.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuCapacity.java new file mode 100644 index 0000000000000..46736ac380014 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuCapacity.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Description of the App Service plan scale options. */ +@Fluent +public final class SkuCapacity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuCapacity.class); + + /* + * Minimum number of workers for this App Service plan SKU. + */ + @JsonProperty(value = "minimum") + private Integer minimum; + + /* + * Maximum number of workers for this App Service plan SKU. + */ + @JsonProperty(value = "maximum") + private Integer maximum; + + /* + * Maximum number of Elastic workers for this App Service plan SKU. + */ + @JsonProperty(value = "elasticMaximum") + private Integer elasticMaximum; + + /* + * Default number of workers for this App Service plan SKU. + */ + @JsonProperty(value = "default") + private Integer defaultProperty; + + /* + * Available scale configurations for an App Service plan. + */ + @JsonProperty(value = "scaleType") + private String scaleType; + + /** + * Get the minimum property: Minimum number of workers for this App Service plan SKU. + * + * @return the minimum value. + */ + public Integer minimum() { + return this.minimum; + } + + /** + * Set the minimum property: Minimum number of workers for this App Service plan SKU. + * + * @param minimum the minimum value to set. + * @return the SkuCapacity object itself. + */ + public SkuCapacity withMinimum(Integer minimum) { + this.minimum = minimum; + return this; + } + + /** + * Get the maximum property: Maximum number of workers for this App Service plan SKU. + * + * @return the maximum value. + */ + public Integer maximum() { + return this.maximum; + } + + /** + * Set the maximum property: Maximum number of workers for this App Service plan SKU. + * + * @param maximum the maximum value to set. + * @return the SkuCapacity object itself. + */ + public SkuCapacity withMaximum(Integer maximum) { + this.maximum = maximum; + return this; + } + + /** + * Get the elasticMaximum property: Maximum number of Elastic workers for this App Service plan SKU. + * + * @return the elasticMaximum value. + */ + public Integer elasticMaximum() { + return this.elasticMaximum; + } + + /** + * Set the elasticMaximum property: Maximum number of Elastic workers for this App Service plan SKU. + * + * @param elasticMaximum the elasticMaximum value to set. + * @return the SkuCapacity object itself. + */ + public SkuCapacity withElasticMaximum(Integer elasticMaximum) { + this.elasticMaximum = elasticMaximum; + return this; + } + + /** + * Get the defaultProperty property: Default number of workers for this App Service plan SKU. + * + * @return the defaultProperty value. + */ + public Integer defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: Default number of workers for this App Service plan SKU. + * + * @param defaultProperty the defaultProperty value to set. + * @return the SkuCapacity object itself. + */ + public SkuCapacity withDefaultProperty(Integer defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Get the scaleType property: Available scale configurations for an App Service plan. + * + * @return the scaleType value. + */ + public String scaleType() { + return this.scaleType; + } + + /** + * Set the scaleType property: Available scale configurations for an App Service plan. + * + * @param scaleType the scaleType value to set. + * @return the SkuCapacity object itself. + */ + public SkuCapacity withScaleType(String scaleType) { + this.scaleType = scaleType; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuDescription.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuDescription.java new file mode 100644 index 0000000000000..1d516369ca28f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuDescription.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.CapabilityInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Description of a SKU for a scalable resource. */ +@Fluent +public final class SkuDescription { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuDescription.class); + + /* + * Name of the resource SKU. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Service tier of the resource SKU. + */ + @JsonProperty(value = "tier") + private String tier; + + /* + * Size specifier of the resource SKU. + */ + @JsonProperty(value = "size") + private String size; + + /* + * Family code of the resource SKU. + */ + @JsonProperty(value = "family") + private String family; + + /* + * Current number of instances assigned to the resource. + */ + @JsonProperty(value = "capacity") + private Integer capacity; + + /* + * Min, max, and default scale values of the SKU. + */ + @JsonProperty(value = "skuCapacity") + private SkuCapacity skuCapacity; + + /* + * Locations of the SKU. + */ + @JsonProperty(value = "locations") + private List locations; + + /* + * Capabilities of the SKU, e.g., is traffic manager enabled? + */ + @JsonProperty(value = "capabilities") + private List capabilities; + + /** + * Get the name property: Name of the resource SKU. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the resource SKU. + * + * @param name the name value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withName(String name) { + this.name = name; + return this; + } + + /** + * Get the tier property: Service tier of the resource SKU. + * + * @return the tier value. + */ + public String tier() { + return this.tier; + } + + /** + * Set the tier property: Service tier of the resource SKU. + * + * @param tier the tier value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withTier(String tier) { + this.tier = tier; + return this; + } + + /** + * Get the size property: Size specifier of the resource SKU. + * + * @return the size value. + */ + public String size() { + return this.size; + } + + /** + * Set the size property: Size specifier of the resource SKU. + * + * @param size the size value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withSize(String size) { + this.size = size; + return this; + } + + /** + * Get the family property: Family code of the resource SKU. + * + * @return the family value. + */ + public String family() { + return this.family; + } + + /** + * Set the family property: Family code of the resource SKU. + * + * @param family the family value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get the capacity property: Current number of instances assigned to the resource. + * + * @return the capacity value. + */ + public Integer capacity() { + return this.capacity; + } + + /** + * Set the capacity property: Current number of instances assigned to the resource. + * + * @param capacity the capacity value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withCapacity(Integer capacity) { + this.capacity = capacity; + return this; + } + + /** + * Get the skuCapacity property: Min, max, and default scale values of the SKU. + * + * @return the skuCapacity value. + */ + public SkuCapacity skuCapacity() { + return this.skuCapacity; + } + + /** + * Set the skuCapacity property: Min, max, and default scale values of the SKU. + * + * @param skuCapacity the skuCapacity value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withSkuCapacity(SkuCapacity skuCapacity) { + this.skuCapacity = skuCapacity; + return this; + } + + /** + * Get the locations property: Locations of the SKU. + * + * @return the locations value. + */ + public List locations() { + return this.locations; + } + + /** + * Set the locations property: Locations of the SKU. + * + * @param locations the locations value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withLocations(List locations) { + this.locations = locations; + return this; + } + + /** + * Get the capabilities property: Capabilities of the SKU, e.g., is traffic manager enabled?. + * + * @return the capabilities value. + */ + public List capabilities() { + return this.capabilities; + } + + /** + * Set the capabilities property: Capabilities of the SKU, e.g., is traffic manager enabled?. + * + * @param capabilities the capabilities value to set. + * @return the SkuDescription object itself. + */ + public SkuDescription withCapabilities(List capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (skuCapacity() != null) { + skuCapacity().validate(); + } + if (capabilities() != null) { + capabilities().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfo.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfo.java new file mode 100644 index 0000000000000..fe4d074ce251c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfo.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfoInner; + +/** An immutable client-side representation of SkuInfo. */ +public interface SkuInfo { + /** + * Gets the resourceType property: Resource type that this SKU applies to. + * + * @return the resourceType value. + */ + String resourceType(); + + /** + * Gets the sku property: Name and tier of the SKU. + * + * @return the sku value. + */ + SkuDescription sku(); + + /** + * Gets the capacity property: Min, max, and default scale values of the SKU. + * + * @return the capacity value. + */ + SkuCapacity capacity(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfoInner object. + * + * @return the inner object. + */ + SkuInfoInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfoCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfoCollection.java new file mode 100644 index 0000000000000..14f880f2223f6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfoCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfoInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of SKU information. */ +@Fluent +public final class SkuInfoCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuInfoCollection.class); + + /* + * 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; + + /** + * 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 SkuInfoCollection object itself. + */ + public SkuInfoCollection 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 SkuInfoCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfos.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfos.java new file mode 100644 index 0000000000000..d964804b87e11 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuInfos.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfosInner; +import java.util.List; + +/** An immutable client-side representation of SkuInfos. */ +public interface SkuInfos { + /** + * Gets the resourceType property: Resource type that this SKU applies to. + * + * @return the resourceType value. + */ + String resourceType(); + + /** + * Gets the skus property: List of SKUs the subscription is able to use. + * + * @return the skus value. + */ + List skus(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SkuInfosInner object. + * + * @return the inner object. + */ + SkuInfosInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuName.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuName.java new file mode 100644 index 0000000000000..fc7832a13c009 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SkuName.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SkuName. */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Free for SkuName. */ + public static final SkuName FREE = fromString("Free"); + + /** Static value Shared for SkuName. */ + public static final SkuName SHARED = fromString("Shared"); + + /** Static value Basic for SkuName. */ + public static final SkuName BASIC = fromString("Basic"); + + /** Static value Standard for SkuName. */ + public static final SkuName STANDARD = fromString("Standard"); + + /** Static value Premium for SkuName. */ + public static final SkuName PREMIUM = fromString("Premium"); + + /** Static value Dynamic for SkuName. */ + public static final SkuName DYNAMIC = fromString("Dynamic"); + + /** Static value Isolated for SkuName. */ + public static final SkuName ISOLATED = fromString("Isolated"); + + /** Static value IsolatedV2 for SkuName. */ + public static final SkuName ISOLATED_V2 = fromString("IsolatedV2"); + + /** Static value PremiumV2 for SkuName. */ + public static final SkuName PREMIUM_V2 = fromString("PremiumV2"); + + /** Static value PremiumV3 for SkuName. */ + public static final SkuName PREMIUM_V3 = fromString("PremiumV3"); + + /** Static value PremiumContainer for SkuName. */ + public static final SkuName PREMIUM_CONTAINER = fromString("PremiumContainer"); + + /** Static value ElasticPremium for SkuName. */ + public static final SkuName ELASTIC_PREMIUM = fromString("ElasticPremium"); + + /** Static value ElasticIsolated for SkuName. */ + public static final SkuName ELASTIC_ISOLATED = fromString("ElasticIsolated"); + + /** + * 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); + } + + /** @return known SkuName values. */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotConfigNamesResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotConfigNamesResource.java new file mode 100644 index 0000000000000..c48afede88994 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotConfigNamesResource.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotConfigNamesResourceInner; +import java.util.List; + +/** An immutable client-side representation of SlotConfigNamesResource. */ +public interface SlotConfigNamesResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the connectionStringNames property: List of connection string names. + * + * @return the connectionStringNames value. + */ + List connectionStringNames(); + + /** + * Gets the appSettingNames property: List of application settings names. + * + * @return the appSettingNames value. + */ + List appSettingNames(); + + /** + * Gets the azureStorageConfigNames property: List of external Azure storage account identifiers. + * + * @return the azureStorageConfigNames value. + */ + List azureStorageConfigNames(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SlotConfigNamesResourceInner object. + * + * @return the inner object. + */ + SlotConfigNamesResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotDifference.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotDifference.java new file mode 100644 index 0000000000000..83f211f885717 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotDifference.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotDifferenceInner; + +/** An immutable client-side representation of SlotDifference. */ +public interface SlotDifference { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the level property: Level of the difference: Information, Warning or Error. + * + * @return the level value. + */ + String level(); + + /** + * Gets the settingType property: The type of the setting: General, AppSetting or ConnectionString. + * + * @return the settingType value. + */ + String settingType(); + + /** + * Gets the diffRule property: Rule that describes how to process the setting difference during a slot swap. + * + * @return the diffRule value. + */ + String diffRule(); + + /** + * Gets the settingName property: Name of the setting. + * + * @return the settingName value. + */ + String settingName(); + + /** + * Gets the valueInCurrentSlot property: Value of the setting in the current slot. + * + * @return the valueInCurrentSlot value. + */ + String valueInCurrentSlot(); + + /** + * Gets the valueInTargetSlot property: Value of the setting in the target slot. + * + * @return the valueInTargetSlot value. + */ + String valueInTargetSlot(); + + /** + * Gets the description property: Description of the setting difference. + * + * @return the description value. + */ + String description(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SlotDifferenceInner object. + * + * @return the inner object. + */ + SlotDifferenceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotDifferenceCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotDifferenceCollection.java new file mode 100644 index 0000000000000..8b35664ec7991 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotDifferenceCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotDifferenceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of slot differences. */ +@Fluent +public final class SlotDifferenceCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SlotDifferenceCollection.class); + + /* + * 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; + + /** + * 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 SlotDifferenceCollection object itself. + */ + public SlotDifferenceCollection 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 SlotDifferenceCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotSwapStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotSwapStatus.java new file mode 100644 index 0000000000000..f6a513726deac --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlotSwapStatus.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The status of the last successful slot swap operation. */ +@Immutable +public final class SlotSwapStatus { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SlotSwapStatus.class); + + /* + * The time the last successful slot swap completed. + */ + @JsonProperty(value = "timestampUtc", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timestampUtc; + + /* + * The source slot of the last swap operation. + */ + @JsonProperty(value = "sourceSlotName", access = JsonProperty.Access.WRITE_ONLY) + private String sourceSlotName; + + /* + * The destination slot of the last swap operation. + */ + @JsonProperty(value = "destinationSlotName", access = JsonProperty.Access.WRITE_ONLY) + private String destinationSlotName; + + /** + * Get the timestampUtc property: The time the last successful slot swap completed. + * + * @return the timestampUtc value. + */ + public OffsetDateTime timestampUtc() { + return this.timestampUtc; + } + + /** + * Get the sourceSlotName property: The source slot of the last swap operation. + * + * @return the sourceSlotName value. + */ + public String sourceSlotName() { + return this.sourceSlotName; + } + + /** + * Get the destinationSlotName property: The destination slot of the last swap operation. + * + * @return the destinationSlotName value. + */ + public String destinationSlotName() { + return this.destinationSlotName; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlowRequestsBasedTrigger.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlowRequestsBasedTrigger.java new file mode 100644 index 0000000000000..34dc93f806e23 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SlowRequestsBasedTrigger.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Trigger based on request execution time. */ +@Fluent +public final class SlowRequestsBasedTrigger { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SlowRequestsBasedTrigger.class); + + /* + * Time taken. + */ + @JsonProperty(value = "timeTaken") + private String timeTaken; + + /* + * Request Path. + */ + @JsonProperty(value = "path") + private String path; + + /* + * Request Count. + */ + @JsonProperty(value = "count") + private Integer count; + + /* + * Time interval. + */ + @JsonProperty(value = "timeInterval") + private String timeInterval; + + /** + * Get the timeTaken property: Time taken. + * + * @return the timeTaken value. + */ + public String timeTaken() { + return this.timeTaken; + } + + /** + * Set the timeTaken property: Time taken. + * + * @param timeTaken the timeTaken value to set. + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withTimeTaken(String timeTaken) { + this.timeTaken = timeTaken; + return this; + } + + /** + * Get the path property: Request Path. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: Request Path. + * + * @param path the path value to set. + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the count property: Request Count. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Request Count. + * + * @param count the count value to set. + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the timeInterval property: Time interval. + * + * @return the timeInterval value. + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set the timeInterval property: Time interval. + * + * @param timeInterval the timeInterval value to set. + * @return the SlowRequestsBasedTrigger object itself. + */ + public SlowRequestsBasedTrigger withTimeInterval(String timeInterval) { + this.timeInterval = timeInterval; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Snapshot.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Snapshot.java new file mode 100644 index 0000000000000..75f5b58106801 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Snapshot.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; + +/** An immutable client-side representation of Snapshot. */ +public interface Snapshot { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the time property: The time the snapshot was taken. + * + * @return the time value. + */ + String time(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner object. + * + * @return the inner object. + */ + SnapshotInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotCollection.java new file mode 100644 index 0000000000000..6946ab610eb23 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of snapshots which can be used to revert an app to a previous time. */ +@Fluent +public final class SnapshotCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotCollection.class); + + /* + * 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; + + /** + * 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 SnapshotCollection object itself. + */ + public SnapshotCollection 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 SnapshotCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotRecoverySource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotRecoverySource.java new file mode 100644 index 0000000000000..d1ae9e355cc5a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotRecoverySource.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Specifies the web app that snapshot contents will be retrieved from. */ +@Fluent +public final class SnapshotRecoverySource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotRecoverySource.class); + + /* + * Geographical location of the source web app, e.g. SouthEastAsia, + * SouthCentralUS + */ + @JsonProperty(value = "location") + private String location; + + /* + * ARM resource ID of the source app. + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + * for production slots and + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + * for other slots. + */ + @JsonProperty(value = "id") + private String id; + + /** + * Get the location property: Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS. + * + * @param location the location value to set. + * @return the SnapshotRecoverySource object itself. + */ + public SnapshotRecoverySource withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the id property: ARM resource ID of the source app. + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production + * slots and + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + * for other slots. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: ARM resource ID of the source app. + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production + * slots and + * /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + * for other slots. + * + * @param id the id value to set. + * @return the SnapshotRecoverySource object itself. + */ + public SnapshotRecoverySource withId(String id) { + this.id = id; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotRestoreRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotRestoreRequest.java new file mode 100644 index 0000000000000..49c100282d6fe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SnapshotRestoreRequest.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SnapshotRestoreRequestProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Details about app recovery operation. */ +@Fluent +public final class SnapshotRestoreRequest extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SnapshotRestoreRequest.class); + + /* + * SnapshotRestoreRequest resource specific properties + */ + @JsonProperty(value = "properties") + private SnapshotRestoreRequestProperties innerProperties; + + /** + * Get the innerProperties property: SnapshotRestoreRequest resource specific properties. + * + * @return the innerProperties value. + */ + private SnapshotRestoreRequestProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public SnapshotRestoreRequest withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the snapshotTime property: Point in time in which the app restore should be done, formatted as a DateTime + * string. + * + * @return the snapshotTime value. + */ + public String snapshotTime() { + return this.innerProperties() == null ? null : this.innerProperties().snapshotTime(); + } + + /** + * Set the snapshotTime property: Point in time in which the app restore should be done, formatted as a DateTime + * string. + * + * @param snapshotTime the snapshotTime value to set. + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withSnapshotTime(String snapshotTime) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotRestoreRequestProperties(); + } + this.innerProperties().withSnapshotTime(snapshotTime); + return this; + } + + /** + * Get the recoverySource property: Optional. Specifies the web app that snapshot contents will be retrieved from. + * If empty, the targeted web app will be used as the source. + * + * @return the recoverySource value. + */ + public SnapshotRecoverySource recoverySource() { + return this.innerProperties() == null ? null : this.innerProperties().recoverySource(); + } + + /** + * Set the recoverySource property: Optional. Specifies the web app that snapshot contents will be retrieved from. + * If empty, the targeted web app will be used as the source. + * + * @param recoverySource the recoverySource value to set. + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withRecoverySource(SnapshotRecoverySource recoverySource) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotRestoreRequestProperties(); + } + this.innerProperties().withRecoverySource(recoverySource); + return this; + } + + /** + * Get the overwrite property: If <code>true</code> the restore operation can overwrite source app; + * otherwise, <code>false</code>. + * + * @return the overwrite value. + */ + public Boolean overwrite() { + return this.innerProperties() == null ? null : this.innerProperties().overwrite(); + } + + /** + * Set the overwrite property: If <code>true</code> the restore operation can overwrite source app; + * otherwise, <code>false</code>. + * + * @param overwrite the overwrite value to set. + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withOverwrite(Boolean overwrite) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotRestoreRequestProperties(); + } + this.innerProperties().withOverwrite(overwrite); + return this; + } + + /** + * Get the recoverConfiguration property: If true, site configuration, in addition to content, will be reverted. + * + * @return the recoverConfiguration value. + */ + public Boolean recoverConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().recoverConfiguration(); + } + + /** + * Set the recoverConfiguration property: If true, site configuration, in addition to content, will be reverted. + * + * @param recoverConfiguration the recoverConfiguration value to set. + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withRecoverConfiguration(Boolean recoverConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotRestoreRequestProperties(); + } + this.innerProperties().withRecoverConfiguration(recoverConfiguration); + return this; + } + + /** + * Get the ignoreConflictingHostNames property: If true, custom hostname conflicts will be ignored when recovering + * to a target web app. This setting is only necessary when RecoverConfiguration is enabled. + * + * @return the ignoreConflictingHostNames value. + */ + public Boolean ignoreConflictingHostNames() { + return this.innerProperties() == null ? null : this.innerProperties().ignoreConflictingHostNames(); + } + + /** + * Set the ignoreConflictingHostNames property: If true, custom hostname conflicts will be ignored when recovering + * to a target web app. This setting is only necessary when RecoverConfiguration is enabled. + * + * @param ignoreConflictingHostNames the ignoreConflictingHostNames value to set. + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withIgnoreConflictingHostNames(Boolean ignoreConflictingHostNames) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotRestoreRequestProperties(); + } + this.innerProperties().withIgnoreConflictingHostNames(ignoreConflictingHostNames); + return this; + } + + /** + * Get the useDRSecondary property: If true, the snapshot is retrieved from DRSecondary endpoint. + * + * @return the useDRSecondary value. + */ + public Boolean useDRSecondary() { + return this.innerProperties() == null ? null : this.innerProperties().useDRSecondary(); + } + + /** + * Set the useDRSecondary property: If true, the snapshot is retrieved from DRSecondary endpoint. + * + * @param useDRSecondary the useDRSecondary value to set. + * @return the SnapshotRestoreRequest object itself. + */ + public SnapshotRestoreRequest withUseDRSecondary(Boolean useDRSecondary) { + if (this.innerProperties() == null) { + this.innerProperties = new SnapshotRestoreRequestProperties(); + } + this.innerProperties().withUseDRSecondary(useDRSecondary); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Solution.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Solution.java new file mode 100644 index 0000000000000..efb8be54bb1b4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Solution.java @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Class Representing Solution for problems detected. */ +@Fluent +public final class Solution { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Solution.class); + + /* + * Solution Id. + */ + @JsonProperty(value = "id") + private Double id; + + /* + * Display Name of the solution + */ + @JsonProperty(value = "displayName") + private String displayName; + + /* + * Order of the solution. + */ + @JsonProperty(value = "order") + private Double order; + + /* + * Description of the solution + */ + @JsonProperty(value = "description") + private String description; + + /* + * Type of Solution + */ + @JsonProperty(value = "type") + private SolutionType type; + + /* + * Solution Data. + */ + @JsonProperty(value = "data") + private List> data; + + /* + * Solution Metadata. + */ + @JsonProperty(value = "metadata") + private List> metadata; + + /** + * Get the id property: Solution Id. + * + * @return the id value. + */ + public Double id() { + return this.id; + } + + /** + * Set the id property: Solution Id. + * + * @param id the id value to set. + * @return the Solution object itself. + */ + public Solution withId(Double id) { + this.id = id; + return this; + } + + /** + * Get the displayName property: Display Name of the solution. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: Display Name of the solution. + * + * @param displayName the displayName value to set. + * @return the Solution object itself. + */ + public Solution withDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Get the order property: Order of the solution. + * + * @return the order value. + */ + public Double order() { + return this.order; + } + + /** + * Set the order property: Order of the solution. + * + * @param order the order value to set. + * @return the Solution object itself. + */ + public Solution withOrder(Double order) { + this.order = order; + return this; + } + + /** + * Get the description property: Description of the solution. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the solution. + * + * @param description the description value to set. + * @return the Solution object itself. + */ + public Solution withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the type property: Type of Solution. + * + * @return the type value. + */ + public SolutionType type() { + return this.type; + } + + /** + * Set the type property: Type of Solution. + * + * @param type the type value to set. + * @return the Solution object itself. + */ + public Solution withType(SolutionType type) { + this.type = type; + return this; + } + + /** + * Get the data property: Solution Data. + * + * @return the data value. + */ + public List> data() { + return this.data; + } + + /** + * Set the data property: Solution Data. + * + * @param data the data value to set. + * @return the Solution object itself. + */ + public Solution withData(List> data) { + this.data = data; + return this; + } + + /** + * Get the metadata property: Solution Metadata. + * + * @return the metadata value. + */ + public List> metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Solution Metadata. + * + * @param metadata the metadata value to set. + * @return the Solution object itself. + */ + public Solution withMetadata(List> metadata) { + this.metadata = metadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (data() != null) { + data().forEach(e -> e.forEach(e1 -> e1.validate())); + } + if (metadata() != null) { + metadata().forEach(e -> e.forEach(e1 -> e1.validate())); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SolutionType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SolutionType.java new file mode 100644 index 0000000000000..14f8238a6c65e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SolutionType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for SolutionType. */ +public enum SolutionType { + /** Enum value QuickSolution. */ + QUICK_SOLUTION("QuickSolution"), + + /** Enum value DeepInvestigation. */ + DEEP_INVESTIGATION("DeepInvestigation"), + + /** Enum value BestPractices. */ + BEST_PRACTICES("BestPractices"); + + /** The actual serialized value for a SolutionType instance. */ + private final String value; + + SolutionType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SolutionType instance. + * + * @param value the serialized value to parse. + * @return the parsed SolutionType object, or null if unable to parse. + */ + @JsonCreator + public static SolutionType fromString(String value) { + SolutionType[] items = SolutionType.values(); + for (SolutionType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SourceControl.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SourceControl.java new file mode 100644 index 0000000000000..d862e7f2c1c45 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SourceControl.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SourceControlInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of SourceControl. */ +public interface SourceControl { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the token property: OAuth access token. + * + * @return the token value. + */ + String token(); + + /** + * Gets the tokenSecret property: OAuth access token secret. + * + * @return the tokenSecret value. + */ + String tokenSecret(); + + /** + * Gets the refreshToken property: OAuth refresh token. + * + * @return the refreshToken value. + */ + String refreshToken(); + + /** + * Gets the expirationTime property: OAuth token expiration. + * + * @return the expirationTime value. + */ + OffsetDateTime expirationTime(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SourceControlInner object. + * + * @return the inner object. + */ + SourceControlInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SourceControlCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SourceControlCollection.java new file mode 100644 index 0000000000000..48e50c9876360 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SourceControlCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SourceControlInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of source controls. */ +@Fluent +public final class SourceControlCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SourceControlCollection.class); + + /* + * 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; + + /** + * 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 SourceControlCollection object itself. + */ + public SourceControlCollection 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 SourceControlCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SslState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SslState.java new file mode 100644 index 0000000000000..f82b766c3b2e6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SslState.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for SslState. */ +public enum SslState { + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value SniEnabled. */ + SNI_ENABLED("SniEnabled"), + + /** Enum value IpBasedEnabled. */ + IP_BASED_ENABLED("IpBasedEnabled"); + + /** The actual serialized value for a SslState instance. */ + private final String value; + + SslState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SslState instance. + * + * @param value the serialized value to parse. + * @return the parsed SslState object, or null if unable to parse. + */ + @JsonCreator + public static SslState fromString(String value) { + SslState[] items = SslState.values(); + for (SslState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackMajorVersion.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackMajorVersion.java new file mode 100644 index 0000000000000..0afe6d62bfa52 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackMajorVersion.java @@ -0,0 +1,323 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Application stack major version. */ +@Fluent +public final class StackMajorVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StackMajorVersion.class); + + /* + * Application stack major version (display only). + */ + @JsonProperty(value = "displayVersion") + private String displayVersion; + + /* + * Application stack major version (runtime only). + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /* + * true if this is the default major version; otherwise, + * false. + */ + @JsonProperty(value = "isDefault") + private Boolean isDefault; + + /* + * Minor versions associated with the major version. + */ + @JsonProperty(value = "minorVersions") + private List minorVersions; + + /* + * true if this supports Application Insights; otherwise, + * false. + */ + @JsonProperty(value = "applicationInsights") + private Boolean applicationInsights; + + /* + * true if this stack is in Preview, otherwise + * false. + */ + @JsonProperty(value = "isPreview") + private Boolean isPreview; + + /* + * true if this stack has been deprecated, otherwise + * false. + */ + @JsonProperty(value = "isDeprecated") + private Boolean isDeprecated; + + /* + * true if this stack should be hidden for new customers on + * portal, otherwise false. + */ + @JsonProperty(value = "isHidden") + private Boolean isHidden; + + /* + * + * + * + * Example: All the function apps need AppSetting: + * "FUNCTIONS_WORKER_RUNTIME" to be set stack name + */ + @JsonProperty(value = "appSettingsDictionary") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map appSettingsDictionary; + + /* + * + * + * + * Example: All Linux Function Apps, need Use32BitWorkerProcess to be set + * to 0 + */ + @JsonProperty(value = "siteConfigPropertiesDictionary") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map siteConfigPropertiesDictionary; + + /** + * Get the displayVersion property: Application stack major version (display only). + * + * @return the displayVersion value. + */ + public String displayVersion() { + return this.displayVersion; + } + + /** + * Set the displayVersion property: Application stack major version (display only). + * + * @param displayVersion the displayVersion value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withDisplayVersion(String displayVersion) { + this.displayVersion = displayVersion; + return this; + } + + /** + * Get the runtimeVersion property: Application stack major version (runtime only). + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: Application stack major version (runtime only). + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the isDefault property: <code>true</code> if this is the default major version; otherwise, + * <code>false</code>. + * + * @return the isDefault value. + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set the isDefault property: <code>true</code> if this is the default major version; otherwise, + * <code>false</code>. + * + * @param isDefault the isDefault value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get the minorVersions property: Minor versions associated with the major version. + * + * @return the minorVersions value. + */ + public List minorVersions() { + return this.minorVersions; + } + + /** + * Set the minorVersions property: Minor versions associated with the major version. + * + * @param minorVersions the minorVersions value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withMinorVersions(List minorVersions) { + this.minorVersions = minorVersions; + return this; + } + + /** + * Get the applicationInsights property: <code>true</code> if this supports Application Insights; + * otherwise, <code>false</code>. + * + * @return the applicationInsights value. + */ + public Boolean applicationInsights() { + return this.applicationInsights; + } + + /** + * Set the applicationInsights property: <code>true</code> if this supports Application Insights; + * otherwise, <code>false</code>. + * + * @param applicationInsights the applicationInsights value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withApplicationInsights(Boolean applicationInsights) { + this.applicationInsights = applicationInsights; + return this; + } + + /** + * Get the isPreview property: <code>true</code> if this stack is in Preview, otherwise + * <code>false</code>. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Set the isPreview property: <code>true</code> if this stack is in Preview, otherwise + * <code>false</code>. + * + * @param isPreview the isPreview value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsPreview(Boolean isPreview) { + this.isPreview = isPreview; + return this; + } + + /** + * Get the isDeprecated property: <code>true</code> if this stack has been deprecated, otherwise + * <code>false</code>. + * + * @return the isDeprecated value. + */ + public Boolean isDeprecated() { + return this.isDeprecated; + } + + /** + * Set the isDeprecated property: <code>true</code> if this stack has been deprecated, otherwise + * <code>false</code>. + * + * @param isDeprecated the isDeprecated value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsDeprecated(Boolean isDeprecated) { + this.isDeprecated = isDeprecated; + return this; + } + + /** + * Get the isHidden property: <code>true</code> if this stack should be hidden for new customers on + * portal, otherwise <code>false</code>. + * + * @return the isHidden value. + */ + public Boolean isHidden() { + return this.isHidden; + } + + /** + * Set the isHidden property: <code>true</code> if this stack should be hidden for new customers on + * portal, otherwise <code>false</code>. + * + * @param isHidden the isHidden value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withIsHidden(Boolean isHidden) { + this.isHidden = isHidden; + return this; + } + + /** + * Get the appSettingsDictionary property: <appSettings> <appSetting name="FUNCTIONS_WORKER_RUNTIME" + * value="dotnet" /> </appSettings> Example: All the function apps need AppSetting: + * "FUNCTIONS_WORKER_RUNTIME" to be set stack name. + * + * @return the appSettingsDictionary value. + */ + public Map appSettingsDictionary() { + return this.appSettingsDictionary; + } + + /** + * Set the appSettingsDictionary property: <appSettings> <appSetting name="FUNCTIONS_WORKER_RUNTIME" + * value="dotnet" /> </appSettings> Example: All the function apps need AppSetting: + * "FUNCTIONS_WORKER_RUNTIME" to be set stack name. + * + * @param appSettingsDictionary the appSettingsDictionary value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withAppSettingsDictionary(Map appSettingsDictionary) { + this.appSettingsDictionary = appSettingsDictionary; + return this; + } + + /** + * Get the siteConfigPropertiesDictionary property: <siteConfigProperties> <siteConfigProperty + * name="Use32BitWorkerProcess" value="false" /> </siteConfigProperties> Example: All Linux Function Apps, + * need Use32BitWorkerProcess to be set to 0. + * + * @return the siteConfigPropertiesDictionary value. + */ + public Map siteConfigPropertiesDictionary() { + return this.siteConfigPropertiesDictionary; + } + + /** + * Set the siteConfigPropertiesDictionary property: <siteConfigProperties> <siteConfigProperty + * name="Use32BitWorkerProcess" value="false" /> </siteConfigProperties> Example: All Linux Function Apps, + * need Use32BitWorkerProcess to be set to 0. + * + * @param siteConfigPropertiesDictionary the siteConfigPropertiesDictionary value to set. + * @return the StackMajorVersion object itself. + */ + public StackMajorVersion withSiteConfigPropertiesDictionary(Map siteConfigPropertiesDictionary) { + this.siteConfigPropertiesDictionary = siteConfigPropertiesDictionary; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (minorVersions() != null) { + minorVersions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackMinorVersion.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackMinorVersion.java new file mode 100644 index 0000000000000..2ca70c8d33dc9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackMinorVersion.java @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Application stack minor version. */ +@Fluent +public final class StackMinorVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StackMinorVersion.class); + + /* + * Application stack minor version (display only). + */ + @JsonProperty(value = "displayVersion") + private String displayVersion; + + /* + * Application stack minor version (runtime only). + */ + @JsonProperty(value = "runtimeVersion") + private String runtimeVersion; + + /* + * true if this is the default minor version; otherwise, + * false. + */ + @JsonProperty(value = "isDefault") + private Boolean isDefault; + + /* + * true if this supports Remote Debugging, otherwise + * false. + */ + @JsonProperty(value = "isRemoteDebuggingEnabled") + private Boolean isRemoteDebuggingEnabled; + + /** + * Get the displayVersion property: Application stack minor version (display only). + * + * @return the displayVersion value. + */ + public String displayVersion() { + return this.displayVersion; + } + + /** + * Set the displayVersion property: Application stack minor version (display only). + * + * @param displayVersion the displayVersion value to set. + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withDisplayVersion(String displayVersion) { + this.displayVersion = displayVersion; + return this; + } + + /** + * Get the runtimeVersion property: Application stack minor version (runtime only). + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Set the runtimeVersion property: Application stack minor version (runtime only). + * + * @param runtimeVersion the runtimeVersion value to set. + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withRuntimeVersion(String runtimeVersion) { + this.runtimeVersion = runtimeVersion; + return this; + } + + /** + * Get the isDefault property: <code>true</code> if this is the default minor version; otherwise, + * <code>false</code>. + * + * @return the isDefault value. + */ + public Boolean isDefault() { + return this.isDefault; + } + + /** + * Set the isDefault property: <code>true</code> if this is the default minor version; otherwise, + * <code>false</code>. + * + * @param isDefault the isDefault value to set. + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withIsDefault(Boolean isDefault) { + this.isDefault = isDefault; + return this; + } + + /** + * Get the isRemoteDebuggingEnabled property: <code>true</code> if this supports Remote Debugging, + * otherwise <code>false</code>. + * + * @return the isRemoteDebuggingEnabled value. + */ + public Boolean isRemoteDebuggingEnabled() { + return this.isRemoteDebuggingEnabled; + } + + /** + * Set the isRemoteDebuggingEnabled property: <code>true</code> if this supports Remote Debugging, + * otherwise <code>false</code>. + * + * @param isRemoteDebuggingEnabled the isRemoteDebuggingEnabled value to set. + * @return the StackMinorVersion object itself. + */ + public StackMinorVersion withIsRemoteDebuggingEnabled(Boolean isRemoteDebuggingEnabled) { + this.isRemoteDebuggingEnabled = isRemoteDebuggingEnabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackPreferredOs.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackPreferredOs.java new file mode 100644 index 0000000000000..f404e47956b8c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StackPreferredOs.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for StackPreferredOs. */ +public enum StackPreferredOs { + /** Enum value Windows. */ + WINDOWS("Windows"), + + /** Enum value Linux. */ + LINUX("Linux"); + + /** The actual serialized value for a StackPreferredOs instance. */ + private final String value; + + StackPreferredOs(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a StackPreferredOs instance. + * + * @param value the serialized value to parse. + * @return the parsed StackPreferredOs object, or null if unable to parse. + */ + @JsonCreator + public static StackPreferredOs fromString(String value) { + StackPreferredOs[] items = StackPreferredOs.values(); + for (StackPreferredOs item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StagingEnvironmentPolicy.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StagingEnvironmentPolicy.java new file mode 100644 index 0000000000000..dac0b20121520 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StagingEnvironmentPolicy.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for StagingEnvironmentPolicy. */ +public enum StagingEnvironmentPolicy { + /** Enum value Enabled. */ + ENABLED("Enabled"), + + /** Enum value Disabled. */ + DISABLED("Disabled"); + + /** The actual serialized value for a StagingEnvironmentPolicy instance. */ + private final String value; + + StagingEnvironmentPolicy(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a StagingEnvironmentPolicy instance. + * + * @param value the serialized value to parse. + * @return the parsed StagingEnvironmentPolicy object, or null if unable to parse. + */ + @JsonCreator + public static StagingEnvironmentPolicy fromString(String value) { + StagingEnvironmentPolicy[] items = StagingEnvironmentPolicy.values(); + for (StagingEnvironmentPolicy item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StampCapacity.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StampCapacity.java new file mode 100644 index 0000000000000..73e423e81d439 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StampCapacity.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StampCapacityInner; + +/** An immutable client-side representation of StampCapacity. */ +public interface StampCapacity { + /** + * Gets the name property: Name of the stamp. + * + * @return the name value. + */ + String name(); + + /** + * Gets the availableCapacity property: Available capacity (# of machines, bytes of storage etc...). + * + * @return the availableCapacity value. + */ + Long availableCapacity(); + + /** + * Gets the totalCapacity property: Total capacity (# of machines, bytes of storage etc...). + * + * @return the totalCapacity value. + */ + Long totalCapacity(); + + /** + * Gets the unit property: Name of the unit. + * + * @return the unit value. + */ + String unit(); + + /** + * Gets the computeMode property: Shared/dedicated workers. + * + * @return the computeMode value. + */ + ComputeModeOptions computeMode(); + + /** + * Gets the workerSize property: Size of the machines. + * + * @return the workerSize value. + */ + WorkerSizeOptions workerSize(); + + /** + * Gets the workerSizeId property: Size ID of machines: 0 - Small 1 - Medium 2 - Large. + * + * @return the workerSizeId value. + */ + Integer workerSizeId(); + + /** + * Gets the excludeFromCapacityAllocation property: If <code>true</code>, it includes basic apps. Basic + * apps are not used for capacity allocation. + * + * @return the excludeFromCapacityAllocation value. + */ + Boolean excludeFromCapacityAllocation(); + + /** + * Gets the isApplicableForAllComputeModes property: <code>true</code> if capacity is applicable for all + * apps; otherwise, <code>false</code>. + * + * @return the isApplicableForAllComputeModes value. + */ + Boolean isApplicableForAllComputeModes(); + + /** + * Gets the siteMode property: Shared or Dedicated. + * + * @return the siteMode value. + */ + String siteMode(); + + /** + * Gets the isLinux property: Is this a linux stamp capacity. + * + * @return the isLinux value. + */ + Boolean isLinux(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.StampCapacityInner object. + * + * @return the inner object. + */ + StampCapacityInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StampCapacityCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StampCapacityCollection.java new file mode 100644 index 0000000000000..b518012522c8e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StampCapacityCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StampCapacityInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of stamp capacities. */ +@Fluent +public final class StampCapacityCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StampCapacityCollection.class); + + /* + * 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; + + /** + * 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 StampCapacityCollection object itself. + */ + public StampCapacityCollection 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 StampCapacityCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteArmResource.java new file mode 100644 index 0000000000000..7e78d0957583f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteArmResource.java @@ -0,0 +1,764 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.management.Region; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteArmResourceInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of StaticSiteArmResource. */ +public interface StaticSiteArmResource { + /** + * 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 sku property: Description of a SKU for a scalable resource. + * + * @return the sku value. + */ + SkuDescription sku(); + + /** + * Gets the identity property: Managed service identity. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the defaultHostname property: The default autogenerated hostname for the static site. + * + * @return the defaultHostname value. + */ + String defaultHostname(); + + /** + * Gets the repositoryUrl property: URL for the repository of the static site. + * + * @return the repositoryUrl value. + */ + String repositoryUrl(); + + /** + * Gets the branch property: The target branch in the repository. + * + * @return the branch value. + */ + String branch(); + + /** + * Gets the customDomains property: The custom domains associated with this static site. + * + * @return the customDomains value. + */ + List customDomains(); + + /** + * Gets the repositoryToken property: A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * + * @return the repositoryToken value. + */ + String repositoryToken(); + + /** + * Gets the buildProperties property: Build properties to configure on the repository. + * + * @return the buildProperties value. + */ + StaticSiteBuildProperties buildProperties(); + + /** + * Gets the privateEndpointConnections property: Private endpoint connections. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + + /** + * Gets the stagingEnvironmentPolicy property: State indicating whether staging environments are allowed or not + * allowed for a static web app. + * + * @return the stagingEnvironmentPolicy value. + */ + StagingEnvironmentPolicy stagingEnvironmentPolicy(); + + /** + * Gets the allowConfigFileUpdates property: <code>false</code> if config file is locked for this static + * web app; otherwise, <code>true</code>. + * + * @return the allowConfigFileUpdates value. + */ + Boolean allowConfigFileUpdates(); + + /** + * Gets the templateProperties property: Template options for generating a new repository. + * + * @return the templateProperties value. + */ + StaticSiteTemplateOptions templateProperties(); + + /** + * Gets the contentDistributionEndpoint property: The content distribution endpoint for the static site. + * + * @return the contentDistributionEndpoint value. + */ + String contentDistributionEndpoint(); + + /** + * Gets the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + String keyVaultReferenceIdentity(); + + /** + * Gets the userProvidedFunctionApps property: User provided function apps registered with the static site. + * + * @return the userProvidedFunctionApps value. + */ + List userProvidedFunctionApps(); + + /** + * Gets the provider property: The provider that submitted the last deployment to the primary environment of the + * static site. + * + * @return the provider value. + */ + String provider(); + + /** + * Gets the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN serving + * traffic to the static web app. + * + * @return the enterpriseGradeCdnStatus value. + */ + EnterpriseGradeCdnStatus enterpriseGradeCdnStatus(); + + /** + * 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 inner com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteArmResourceInner object. + * + * @return the inner object. + */ + StaticSiteArmResourceInner innerModel(); + + /** The entirety of the StaticSiteArmResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The StaticSiteArmResource definition stages. */ + interface DefinitionStages { + /** The first stage of the StaticSiteArmResource definition. */ + interface Blank extends WithLocation { + } + /** The stage of the StaticSiteArmResource 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 StaticSiteArmResource definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the StaticSiteArmResource 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.WithSku, + DefinitionStages.WithIdentity, + DefinitionStages.WithKind, + DefinitionStages.WithRepositoryUrl, + DefinitionStages.WithBranch, + DefinitionStages.WithRepositoryToken, + DefinitionStages.WithBuildProperties, + DefinitionStages.WithStagingEnvironmentPolicy, + DefinitionStages.WithAllowConfigFileUpdates, + DefinitionStages.WithTemplateProperties, + DefinitionStages.WithProvider, + DefinitionStages.WithEnterpriseGradeCdnStatus { + /** + * Executes the create request. + * + * @return the created resource. + */ + StaticSiteArmResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + StaticSiteArmResource create(Context context); + } + /** The stage of the StaticSiteArmResource 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 StaticSiteArmResource definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Description of a SKU for a scalable resource.. + * + * @param sku Description of a SKU for a scalable resource. + * @return the next definition stage. + */ + WithCreate withSku(SkuDescription sku); + } + /** The stage of the StaticSiteArmResource definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: Managed service identity.. + * + * @param identity Managed service identity. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + /** The stage of the StaticSiteArmResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the StaticSiteArmResource definition allowing to specify repositoryUrl. */ + interface WithRepositoryUrl { + /** + * Specifies the repositoryUrl property: URL for the repository of the static site.. + * + * @param repositoryUrl URL for the repository of the static site. + * @return the next definition stage. + */ + WithCreate withRepositoryUrl(String repositoryUrl); + } + /** The stage of the StaticSiteArmResource definition allowing to specify branch. */ + interface WithBranch { + /** + * Specifies the branch property: The target branch in the repository.. + * + * @param branch The target branch in the repository. + * @return the next definition stage. + */ + WithCreate withBranch(String branch); + } + /** The stage of the StaticSiteArmResource definition allowing to specify repositoryToken. */ + interface WithRepositoryToken { + /** + * Specifies the repositoryToken property: A user's github repository token. This is used to setup the + * Github Actions workflow file and API secrets.. + * + * @param repositoryToken A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * @return the next definition stage. + */ + WithCreate withRepositoryToken(String repositoryToken); + } + /** The stage of the StaticSiteArmResource definition allowing to specify buildProperties. */ + interface WithBuildProperties { + /** + * Specifies the buildProperties property: Build properties to configure on the repository.. + * + * @param buildProperties Build properties to configure on the repository. + * @return the next definition stage. + */ + WithCreate withBuildProperties(StaticSiteBuildProperties buildProperties); + } + /** The stage of the StaticSiteArmResource definition allowing to specify stagingEnvironmentPolicy. */ + interface WithStagingEnvironmentPolicy { + /** + * Specifies the stagingEnvironmentPolicy property: State indicating whether staging environments are + * allowed or not allowed for a static web app.. + * + * @param stagingEnvironmentPolicy State indicating whether staging environments are allowed or not allowed + * for a static web app. + * @return the next definition stage. + */ + WithCreate withStagingEnvironmentPolicy(StagingEnvironmentPolicy stagingEnvironmentPolicy); + } + /** The stage of the StaticSiteArmResource definition allowing to specify allowConfigFileUpdates. */ + interface WithAllowConfigFileUpdates { + /** + * Specifies the allowConfigFileUpdates property: <code>false</code> if config file is locked + * for this static web app; otherwise, <code>true</code>.. + * + * @param allowConfigFileUpdates <code>false</code> if config file is locked for this static web + * app; otherwise, <code>true</code>. + * @return the next definition stage. + */ + WithCreate withAllowConfigFileUpdates(Boolean allowConfigFileUpdates); + } + /** The stage of the StaticSiteArmResource definition allowing to specify templateProperties. */ + interface WithTemplateProperties { + /** + * Specifies the templateProperties property: Template options for generating a new repository.. + * + * @param templateProperties Template options for generating a new repository. + * @return the next definition stage. + */ + WithCreate withTemplateProperties(StaticSiteTemplateOptions templateProperties); + } + /** The stage of the StaticSiteArmResource definition allowing to specify provider. */ + interface WithProvider { + /** + * Specifies the provider property: The provider that submitted the last deployment to the primary + * environment of the static site.. + * + * @param provider The provider that submitted the last deployment to the primary environment of the static + * site. + * @return the next definition stage. + */ + WithCreate withProvider(String provider); + } + /** The stage of the StaticSiteArmResource definition allowing to specify enterpriseGradeCdnStatus. */ + interface WithEnterpriseGradeCdnStatus { + /** + * Specifies the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN + * serving traffic to the static web app.. + * + * @param enterpriseGradeCdnStatus State indicating the status of the enterprise grade CDN serving traffic + * to the static web app. + * @return the next definition stage. + */ + WithCreate withEnterpriseGradeCdnStatus(EnterpriseGradeCdnStatus enterpriseGradeCdnStatus); + } + } + /** + * Begins update for the StaticSiteArmResource resource. + * + * @return the stage of resource update. + */ + StaticSiteArmResource.Update update(); + + /** The template for StaticSiteArmResource update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithRepositoryUrl, + UpdateStages.WithBranch, + UpdateStages.WithRepositoryToken, + UpdateStages.WithBuildProperties, + UpdateStages.WithStagingEnvironmentPolicy, + UpdateStages.WithAllowConfigFileUpdates, + UpdateStages.WithTemplateProperties, + UpdateStages.WithProvider, + UpdateStages.WithEnterpriseGradeCdnStatus { + /** + * Executes the update request. + * + * @return the updated resource. + */ + StaticSiteArmResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + StaticSiteArmResource apply(Context context); + } + /** The StaticSiteArmResource update stages. */ + interface UpdateStages { + /** The stage of the StaticSiteArmResource update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the StaticSiteArmResource update allowing to specify repositoryUrl. */ + interface WithRepositoryUrl { + /** + * Specifies the repositoryUrl property: URL for the repository of the static site.. + * + * @param repositoryUrl URL for the repository of the static site. + * @return the next definition stage. + */ + Update withRepositoryUrl(String repositoryUrl); + } + /** The stage of the StaticSiteArmResource update allowing to specify branch. */ + interface WithBranch { + /** + * Specifies the branch property: The target branch in the repository.. + * + * @param branch The target branch in the repository. + * @return the next definition stage. + */ + Update withBranch(String branch); + } + /** The stage of the StaticSiteArmResource update allowing to specify repositoryToken. */ + interface WithRepositoryToken { + /** + * Specifies the repositoryToken property: A user's github repository token. This is used to setup the + * Github Actions workflow file and API secrets.. + * + * @param repositoryToken A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * @return the next definition stage. + */ + Update withRepositoryToken(String repositoryToken); + } + /** The stage of the StaticSiteArmResource update allowing to specify buildProperties. */ + interface WithBuildProperties { + /** + * Specifies the buildProperties property: Build properties to configure on the repository.. + * + * @param buildProperties Build properties to configure on the repository. + * @return the next definition stage. + */ + Update withBuildProperties(StaticSiteBuildProperties buildProperties); + } + /** The stage of the StaticSiteArmResource update allowing to specify stagingEnvironmentPolicy. */ + interface WithStagingEnvironmentPolicy { + /** + * Specifies the stagingEnvironmentPolicy property: State indicating whether staging environments are + * allowed or not allowed for a static web app.. + * + * @param stagingEnvironmentPolicy State indicating whether staging environments are allowed or not allowed + * for a static web app. + * @return the next definition stage. + */ + Update withStagingEnvironmentPolicy(StagingEnvironmentPolicy stagingEnvironmentPolicy); + } + /** The stage of the StaticSiteArmResource update allowing to specify allowConfigFileUpdates. */ + interface WithAllowConfigFileUpdates { + /** + * Specifies the allowConfigFileUpdates property: <code>false</code> if config file is locked + * for this static web app; otherwise, <code>true</code>.. + * + * @param allowConfigFileUpdates <code>false</code> if config file is locked for this static web + * app; otherwise, <code>true</code>. + * @return the next definition stage. + */ + Update withAllowConfigFileUpdates(Boolean allowConfigFileUpdates); + } + /** The stage of the StaticSiteArmResource update allowing to specify templateProperties. */ + interface WithTemplateProperties { + /** + * Specifies the templateProperties property: Template options for generating a new repository.. + * + * @param templateProperties Template options for generating a new repository. + * @return the next definition stage. + */ + Update withTemplateProperties(StaticSiteTemplateOptions templateProperties); + } + /** The stage of the StaticSiteArmResource update allowing to specify provider. */ + interface WithProvider { + /** + * Specifies the provider property: The provider that submitted the last deployment to the primary + * environment of the static site.. + * + * @param provider The provider that submitted the last deployment to the primary environment of the static + * site. + * @return the next definition stage. + */ + Update withProvider(String provider); + } + /** The stage of the StaticSiteArmResource update allowing to specify enterpriseGradeCdnStatus. */ + interface WithEnterpriseGradeCdnStatus { + /** + * Specifies the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN + * serving traffic to the static web app.. + * + * @param enterpriseGradeCdnStatus State indicating the status of the enterprise grade CDN serving traffic + * to the static web app. + * @return the next definition stage. + */ + Update withEnterpriseGradeCdnStatus(EnterpriseGradeCdnStatus enterpriseGradeCdnStatus); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + StaticSiteArmResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + StaticSiteArmResource refresh(Context context); + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + StaticSiteUserInvitationResponseResource createUserRolesInvitationLink( + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope); + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + Response createUserRolesInvitationLinkWithResponse( + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, Context context); + + /** + * Description for Detaches a static site. + * + * @throws com.azure.resourcemanager.appservice.generated.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 detachStaticSite(); + + /** + * Description for Detaches a static site. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachStaticSite(Context context); + + /** + * Description for Gets the application settings of a static site. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listStaticSiteAppSettings(); + + /** + * Description for Gets the application settings of a static site. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listStaticSiteAppSettingsWithResponse(Context context); + + /** + * Description for Lists the roles configured for the static site. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + StringList listStaticSiteConfiguredRoles(); + + /** + * Description for Lists the roles configured for the static site. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + Response listStaticSiteConfiguredRolesWithResponse(Context context); + + /** + * Description for Gets the application settings of a static site. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listStaticSiteFunctionAppSettings(); + + /** + * Description for Gets the application settings of a static site. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listStaticSiteFunctionAppSettingsWithResponse(Context context); + + /** + * Description for Lists the secrets for an existing static site. + * + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listStaticSiteSecrets(); + + /** + * Description for Lists the secrets for an existing static site. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listStaticSiteSecretsWithResponse(Context context); + + /** + * Description for Resets the api key for an existing static site. + * + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetStaticSiteApiKey(StaticSiteResetPropertiesArmResource resetPropertiesEnvelope); + + /** + * Description for Resets the api key for an existing static site. + * + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resetStaticSiteApiKeyWithResponse( + StaticSiteResetPropertiesArmResource resetPropertiesEnvelope, Context context); + + /** + * Description for Deploys zipped content to a static site. + * + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSite(StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope); + + /** + * Description for Deploys zipped content to a static site. + * + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSite( + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildArmResource.java new file mode 100644 index 0000000000000..4b8b1bb86deb3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildArmResource.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteBuildArmResourceInner; +import java.time.OffsetDateTime; +import java.util.List; + +/** An immutable client-side representation of StaticSiteBuildArmResource. */ +public interface StaticSiteBuildArmResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the buildId property: An identifier for the static site build. + * + * @return the buildId value. + */ + String buildId(); + + /** + * Gets the sourceBranch property: The source branch. + * + * @return the sourceBranch value. + */ + String sourceBranch(); + + /** + * Gets the pullRequestTitle property: The title of a pull request that a static site build is related to. + * + * @return the pullRequestTitle value. + */ + String pullRequestTitle(); + + /** + * Gets the hostname property: The hostname for a static site build. + * + * @return the hostname value. + */ + String hostname(); + + /** + * Gets the createdTimeUtc property: When this build was created. + * + * @return the createdTimeUtc value. + */ + OffsetDateTime createdTimeUtc(); + + /** + * Gets the lastUpdatedOn property: When this build was updated. + * + * @return the lastUpdatedOn value. + */ + OffsetDateTime lastUpdatedOn(); + + /** + * Gets the status property: The status of the static site build. + * + * @return the status value. + */ + BuildStatus status(); + + /** + * Gets the userProvidedFunctionApps property: User provided function apps registered with the static site build. + * + * @return the userProvidedFunctionApps value. + */ + List userProvidedFunctionApps(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteBuildArmResourceInner + * object. + * + * @return the inner object. + */ + StaticSiteBuildArmResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildCollection.java new file mode 100644 index 0000000000000..251370f98301b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteBuildArmResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of static site builds. */ +@Fluent +public final class StaticSiteBuildCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteBuildCollection.class); + + /* + * 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; + + /** + * 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 StaticSiteBuildCollection object itself. + */ + public StaticSiteBuildCollection 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 StaticSiteBuildCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildProperties.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildProperties.java new file mode 100644 index 0000000000000..dcfc07884eec7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteBuildProperties.java @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Build properties for the static site. */ +@Fluent +public final class StaticSiteBuildProperties { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteBuildProperties.class); + + /* + * The path to the app code within the repository. + */ + @JsonProperty(value = "appLocation") + private String appLocation; + + /* + * The path to the api code within the repository. + */ + @JsonProperty(value = "apiLocation") + private String apiLocation; + + /* + * Deprecated: The path of the app artifacts after building (deprecated in + * favor of OutputLocation) + */ + @JsonProperty(value = "appArtifactLocation") + private String appArtifactLocation; + + /* + * The output path of the app after building. + */ + @JsonProperty(value = "outputLocation") + private String outputLocation; + + /* + * A custom command to run during deployment of the static content + * application. + */ + @JsonProperty(value = "appBuildCommand") + private String appBuildCommand; + + /* + * A custom command to run during deployment of the Azure Functions API + * application. + */ + @JsonProperty(value = "apiBuildCommand") + private String apiBuildCommand; + + /* + * Skip Github Action workflow generation. + */ + @JsonProperty(value = "skipGithubActionWorkflowGeneration") + private Boolean skipGithubActionWorkflowGeneration; + + /* + * Github Action secret name override. + */ + @JsonProperty(value = "githubActionSecretNameOverride") + private String githubActionSecretNameOverride; + + /** + * Get the appLocation property: The path to the app code within the repository. + * + * @return the appLocation value. + */ + public String appLocation() { + return this.appLocation; + } + + /** + * Set the appLocation property: The path to the app code within the repository. + * + * @param appLocation the appLocation value to set. + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withAppLocation(String appLocation) { + this.appLocation = appLocation; + return this; + } + + /** + * Get the apiLocation property: The path to the api code within the repository. + * + * @return the apiLocation value. + */ + public String apiLocation() { + return this.apiLocation; + } + + /** + * Set the apiLocation property: The path to the api code within the repository. + * + * @param apiLocation the apiLocation value to set. + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withApiLocation(String apiLocation) { + this.apiLocation = apiLocation; + return this; + } + + /** + * Get the appArtifactLocation property: Deprecated: The path of the app artifacts after building (deprecated in + * favor of OutputLocation). + * + * @return the appArtifactLocation value. + */ + public String appArtifactLocation() { + return this.appArtifactLocation; + } + + /** + * Set the appArtifactLocation property: Deprecated: The path of the app artifacts after building (deprecated in + * favor of OutputLocation). + * + * @param appArtifactLocation the appArtifactLocation value to set. + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withAppArtifactLocation(String appArtifactLocation) { + this.appArtifactLocation = appArtifactLocation; + return this; + } + + /** + * Get the outputLocation property: The output path of the app after building. + * + * @return the outputLocation value. + */ + public String outputLocation() { + return this.outputLocation; + } + + /** + * Set the outputLocation property: The output path of the app after building. + * + * @param outputLocation the outputLocation value to set. + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withOutputLocation(String outputLocation) { + this.outputLocation = outputLocation; + return this; + } + + /** + * Get the appBuildCommand property: A custom command to run during deployment of the static content application. + * + * @return the appBuildCommand value. + */ + public String appBuildCommand() { + return this.appBuildCommand; + } + + /** + * Set the appBuildCommand property: A custom command to run during deployment of the static content application. + * + * @param appBuildCommand the appBuildCommand value to set. + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withAppBuildCommand(String appBuildCommand) { + this.appBuildCommand = appBuildCommand; + return this; + } + + /** + * Get the apiBuildCommand property: A custom command to run during deployment of the Azure Functions API + * application. + * + * @return the apiBuildCommand value. + */ + public String apiBuildCommand() { + return this.apiBuildCommand; + } + + /** + * Set the apiBuildCommand property: A custom command to run during deployment of the Azure Functions API + * application. + * + * @param apiBuildCommand the apiBuildCommand value to set. + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withApiBuildCommand(String apiBuildCommand) { + this.apiBuildCommand = apiBuildCommand; + return this; + } + + /** + * Get the skipGithubActionWorkflowGeneration property: Skip Github Action workflow generation. + * + * @return the skipGithubActionWorkflowGeneration value. + */ + public Boolean skipGithubActionWorkflowGeneration() { + return this.skipGithubActionWorkflowGeneration; + } + + /** + * Set the skipGithubActionWorkflowGeneration property: Skip Github Action workflow generation. + * + * @param skipGithubActionWorkflowGeneration the skipGithubActionWorkflowGeneration value to set. + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withSkipGithubActionWorkflowGeneration( + Boolean skipGithubActionWorkflowGeneration) { + this.skipGithubActionWorkflowGeneration = skipGithubActionWorkflowGeneration; + return this; + } + + /** + * Get the githubActionSecretNameOverride property: Github Action secret name override. + * + * @return the githubActionSecretNameOverride value. + */ + public String githubActionSecretNameOverride() { + return this.githubActionSecretNameOverride; + } + + /** + * Set the githubActionSecretNameOverride property: Github Action secret name override. + * + * @param githubActionSecretNameOverride the githubActionSecretNameOverride value to set. + * @return the StaticSiteBuildProperties object itself. + */ + public StaticSiteBuildProperties withGithubActionSecretNameOverride(String githubActionSecretNameOverride) { + this.githubActionSecretNameOverride = githubActionSecretNameOverride; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCollection.java new file mode 100644 index 0000000000000..6636a4eefc59c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteArmResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of static sites. */ +@Fluent +public final class StaticSiteCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteCollection.class); + + /* + * 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; + + /** + * 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 StaticSiteCollection object itself. + */ + public StaticSiteCollection 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 StaticSiteCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainOverviewArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainOverviewArmResource.java new file mode 100644 index 0000000000000..15c4945df4b61 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainOverviewArmResource.java @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteCustomDomainOverviewArmResourceInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of StaticSiteCustomDomainOverviewArmResource. */ +public interface StaticSiteCustomDomainOverviewArmResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the domainName property: The domain name for the static site custom domain. + * + * @return the domainName value. + */ + String domainName(); + + /** + * Gets the createdOn property: The date and time on which the custom domain was created for the static site. + * + * @return the createdOn value. + */ + OffsetDateTime createdOn(); + + /** + * Gets the status property: The status of the custom domain. + * + * @return the status value. + */ + CustomDomainStatus status(); + + /** + * Gets the validationToken property: The TXT record validation token. + * + * @return the validationToken value. + */ + String validationToken(); + + /** + * Gets the errorMessage property: The errorMessage property. + * + * @return the errorMessage value. + */ + String errorMessage(); + + /** + * Gets the inner + * com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteCustomDomainOverviewArmResourceInner + * object. + * + * @return the inner object. + */ + StaticSiteCustomDomainOverviewArmResourceInner innerModel(); + + /** The entirety of the StaticSiteCustomDomainOverviewArmResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The StaticSiteCustomDomainOverviewArmResource definition stages. */ + interface DefinitionStages { + /** The first stage of the StaticSiteCustomDomainOverviewArmResource definition. */ + interface Blank extends WithParentResource { + } + /** + * The stage of the StaticSiteCustomDomainOverviewArmResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @return the next definition stage. + */ + WithCreate withExistingStaticSite(String resourceGroupName, String name); + } + /** + * The stage of the StaticSiteCustomDomainOverviewArmResource 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.WithKind, DefinitionStages.WithValidationMethod { + /** + * Executes the create request. + * + * @return the created resource. + */ + StaticSiteCustomDomainOverviewArmResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + StaticSiteCustomDomainOverviewArmResource create(Context context); + } + /** The stage of the StaticSiteCustomDomainOverviewArmResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** + * The stage of the StaticSiteCustomDomainOverviewArmResource definition allowing to specify validationMethod. + */ + interface WithValidationMethod { + /** + * Specifies the validationMethod property: Validation method for adding a custom domain. + * + * @param validationMethod Validation method for adding a custom domain. + * @return the next definition stage. + */ + WithCreate withValidationMethod(String validationMethod); + } + } + /** + * Begins update for the StaticSiteCustomDomainOverviewArmResource resource. + * + * @return the stage of resource update. + */ + StaticSiteCustomDomainOverviewArmResource.Update update(); + + /** The template for StaticSiteCustomDomainOverviewArmResource update. */ + interface Update extends UpdateStages.WithKind, UpdateStages.WithValidationMethod { + /** + * Executes the update request. + * + * @return the updated resource. + */ + StaticSiteCustomDomainOverviewArmResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + StaticSiteCustomDomainOverviewArmResource apply(Context context); + } + /** The StaticSiteCustomDomainOverviewArmResource update stages. */ + interface UpdateStages { + /** The stage of the StaticSiteCustomDomainOverviewArmResource update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the StaticSiteCustomDomainOverviewArmResource update allowing to specify validationMethod. */ + interface WithValidationMethod { + /** + * Specifies the validationMethod property: Validation method for adding a custom domain. + * + * @param validationMethod Validation method for adding a custom domain. + * @return the next definition stage. + */ + Update withValidationMethod(String validationMethod); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + StaticSiteCustomDomainOverviewArmResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + StaticSiteCustomDomainOverviewArmResource refresh(Context context); + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validateCustomDomainCanBeAddedToStaticSite( + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope); + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validateCustomDomainCanBeAddedToStaticSite( + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainOverviewCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainOverviewCollection.java new file mode 100644 index 0000000000000..e860174c5998d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainOverviewCollection.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteCustomDomainOverviewArmResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of static site custom domains. */ +@Fluent +public final class StaticSiteCustomDomainOverviewCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteCustomDomainOverviewCollection.class); + + /* + * 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; + + /** + * 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 StaticSiteCustomDomainOverviewCollection object itself. + */ + public StaticSiteCustomDomainOverviewCollection 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 StaticSiteCustomDomainOverviewCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainRequestPropertiesArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainRequestPropertiesArmResource.java new file mode 100644 index 0000000000000..dc9fb6ee7eb72 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteCustomDomainRequestPropertiesArmResource.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteCustomDomainRequestPropertiesArmResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Static Site Custom Domain Request Properties ARM resource. */ +@Fluent +public final class StaticSiteCustomDomainRequestPropertiesArmResource extends ProxyOnlyResource { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteCustomDomainRequestPropertiesArmResource.class); + + /* + * StaticSiteCustomDomainRequestPropertiesARMResource resource specific + * properties + */ + @JsonProperty(value = "properties") + private StaticSiteCustomDomainRequestPropertiesArmResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteCustomDomainRequestPropertiesARMResource resource specific + * properties. + * + * @return the innerProperties value. + */ + private StaticSiteCustomDomainRequestPropertiesArmResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteCustomDomainRequestPropertiesArmResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the validationMethod property: Validation method for adding a custom domain. + * + * @return the validationMethod value. + */ + public String validationMethod() { + return this.innerProperties() == null ? null : this.innerProperties().validationMethod(); + } + + /** + * Set the validationMethod property: Validation method for adding a custom domain. + * + * @param validationMethod the validationMethod value to set. + * @return the StaticSiteCustomDomainRequestPropertiesArmResource object itself. + */ + public StaticSiteCustomDomainRequestPropertiesArmResource withValidationMethod(String validationMethod) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteCustomDomainRequestPropertiesArmResourceProperties(); + } + this.innerProperties().withValidationMethod(validationMethod); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteFunctionOverviewArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteFunctionOverviewArmResource.java new file mode 100644 index 0000000000000..a561c6c2399b8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteFunctionOverviewArmResource.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteFunctionOverviewArmResourceInner; + +/** An immutable client-side representation of StaticSiteFunctionOverviewArmResource. */ +public interface StaticSiteFunctionOverviewArmResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the functionName property: The name for the function. + * + * @return the functionName value. + */ + String functionName(); + + /** + * Gets the triggerType property: The trigger type of the function. + * + * @return the triggerType value. + */ + TriggerTypes triggerType(); + + /** + * Gets the inner + * com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteFunctionOverviewArmResourceInner object. + * + * @return the inner object. + */ + StaticSiteFunctionOverviewArmResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteFunctionOverviewCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteFunctionOverviewCollection.java new file mode 100644 index 0000000000000..de20dcf79328c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteFunctionOverviewCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteFunctionOverviewArmResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of static site functions. */ +@Fluent +public final class StaticSiteFunctionOverviewCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteFunctionOverviewCollection.class); + + /* + * 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; + + /** + * 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 StaticSiteFunctionOverviewCollection object itself. + */ + public StaticSiteFunctionOverviewCollection 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 StaticSiteFunctionOverviewCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitePatchResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitePatchResource.java new file mode 100644 index 0000000000000..ab38bd952f785 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitePatchResource.java @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSite; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** ARM resource for a static site when patching. */ +@Fluent +public final class StaticSitePatchResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSitePatchResource.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private StaticSite innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private StaticSite innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSitePatchResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the defaultHostname property: The default autogenerated hostname for the static site. + * + * @return the defaultHostname value. + */ + public String defaultHostname() { + return this.innerProperties() == null ? null : this.innerProperties().defaultHostname(); + } + + /** + * Get the repositoryUrl property: URL for the repository of the static site. + * + * @return the repositoryUrl value. + */ + public String repositoryUrl() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryUrl(); + } + + /** + * Set the repositoryUrl property: URL for the repository of the static site. + * + * @param repositoryUrl the repositoryUrl value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withRepositoryUrl(String repositoryUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withRepositoryUrl(repositoryUrl); + return this; + } + + /** + * Get the branch property: The target branch in the repository. + * + * @return the branch value. + */ + public String branch() { + return this.innerProperties() == null ? null : this.innerProperties().branch(); + } + + /** + * Set the branch property: The target branch in the repository. + * + * @param branch the branch value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withBranch(String branch) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withBranch(branch); + return this; + } + + /** + * Get the customDomains property: The custom domains associated with this static site. + * + * @return the customDomains value. + */ + public List customDomains() { + return this.innerProperties() == null ? null : this.innerProperties().customDomains(); + } + + /** + * Get the repositoryToken property: A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * + * @return the repositoryToken value. + */ + public String repositoryToken() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryToken(); + } + + /** + * Set the repositoryToken property: A user's github repository token. This is used to setup the Github Actions + * workflow file and API secrets. + * + * @param repositoryToken the repositoryToken value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withRepositoryToken(String repositoryToken) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withRepositoryToken(repositoryToken); + return this; + } + + /** + * Get the buildProperties property: Build properties to configure on the repository. + * + * @return the buildProperties value. + */ + public StaticSiteBuildProperties buildProperties() { + return this.innerProperties() == null ? null : this.innerProperties().buildProperties(); + } + + /** + * Set the buildProperties property: Build properties to configure on the repository. + * + * @param buildProperties the buildProperties value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withBuildProperties(StaticSiteBuildProperties buildProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withBuildProperties(buildProperties); + return this; + } + + /** + * Get the privateEndpointConnections property: Private endpoint connections. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + + /** + * Get the stagingEnvironmentPolicy property: State indicating whether staging environments are allowed or not + * allowed for a static web app. + * + * @return the stagingEnvironmentPolicy value. + */ + public StagingEnvironmentPolicy stagingEnvironmentPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().stagingEnvironmentPolicy(); + } + + /** + * Set the stagingEnvironmentPolicy property: State indicating whether staging environments are allowed or not + * allowed for a static web app. + * + * @param stagingEnvironmentPolicy the stagingEnvironmentPolicy value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withStagingEnvironmentPolicy(StagingEnvironmentPolicy stagingEnvironmentPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withStagingEnvironmentPolicy(stagingEnvironmentPolicy); + return this; + } + + /** + * Get the allowConfigFileUpdates property: <code>false</code> if config file is locked for this static + * web app; otherwise, <code>true</code>. + * + * @return the allowConfigFileUpdates value. + */ + public Boolean allowConfigFileUpdates() { + return this.innerProperties() == null ? null : this.innerProperties().allowConfigFileUpdates(); + } + + /** + * Set the allowConfigFileUpdates property: <code>false</code> if config file is locked for this static + * web app; otherwise, <code>true</code>. + * + * @param allowConfigFileUpdates the allowConfigFileUpdates value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withAllowConfigFileUpdates(Boolean allowConfigFileUpdates) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withAllowConfigFileUpdates(allowConfigFileUpdates); + return this; + } + + /** + * Get the templateProperties property: Template options for generating a new repository. + * + * @return the templateProperties value. + */ + public StaticSiteTemplateOptions templateProperties() { + return this.innerProperties() == null ? null : this.innerProperties().templateProperties(); + } + + /** + * Set the templateProperties property: Template options for generating a new repository. + * + * @param templateProperties the templateProperties value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withTemplateProperties(StaticSiteTemplateOptions templateProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withTemplateProperties(templateProperties); + return this; + } + + /** + * Get the contentDistributionEndpoint property: The content distribution endpoint for the static site. + * + * @return the contentDistributionEndpoint value. + */ + public String contentDistributionEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().contentDistributionEndpoint(); + } + + /** + * Get the keyVaultReferenceIdentity property: Identity to use for Key Vault Reference authentication. + * + * @return the keyVaultReferenceIdentity value. + */ + public String keyVaultReferenceIdentity() { + return this.innerProperties() == null ? null : this.innerProperties().keyVaultReferenceIdentity(); + } + + /** + * Get the userProvidedFunctionApps property: User provided function apps registered with the static site. + * + * @return the userProvidedFunctionApps value. + */ + public List userProvidedFunctionApps() { + return this.innerProperties() == null ? null : this.innerProperties().userProvidedFunctionApps(); + } + + /** + * Get the provider property: The provider that submitted the last deployment to the primary environment of the + * static site. + * + * @return the provider value. + */ + public String provider() { + return this.innerProperties() == null ? null : this.innerProperties().provider(); + } + + /** + * Set the provider property: The provider that submitted the last deployment to the primary environment of the + * static site. + * + * @param provider the provider value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withProvider(String provider) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withProvider(provider); + return this; + } + + /** + * Get the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN serving + * traffic to the static web app. + * + * @return the enterpriseGradeCdnStatus value. + */ + public EnterpriseGradeCdnStatus enterpriseGradeCdnStatus() { + return this.innerProperties() == null ? null : this.innerProperties().enterpriseGradeCdnStatus(); + } + + /** + * Set the enterpriseGradeCdnStatus property: State indicating the status of the enterprise grade CDN serving + * traffic to the static web app. + * + * @param enterpriseGradeCdnStatus the enterpriseGradeCdnStatus value to set. + * @return the StaticSitePatchResource object itself. + */ + public StaticSitePatchResource withEnterpriseGradeCdnStatus(EnterpriseGradeCdnStatus enterpriseGradeCdnStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSite(); + } + this.innerProperties().withEnterpriseGradeCdnStatus(enterpriseGradeCdnStatus); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteResetPropertiesArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteResetPropertiesArmResource.java new file mode 100644 index 0000000000000..3acdea9e41f27 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteResetPropertiesArmResource.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteResetPropertiesArmResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Static Site Reset Properties ARM resource. */ +@Fluent +public final class StaticSiteResetPropertiesArmResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteResetPropertiesArmResource.class); + + /* + * StaticSiteResetPropertiesARMResource resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSiteResetPropertiesArmResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteResetPropertiesARMResource resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteResetPropertiesArmResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteResetPropertiesArmResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the repositoryToken property: The token which proves admin privileges to the repository. + * + * @return the repositoryToken value. + */ + public String repositoryToken() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryToken(); + } + + /** + * Set the repositoryToken property: The token which proves admin privileges to the repository. + * + * @param repositoryToken the repositoryToken value to set. + * @return the StaticSiteResetPropertiesArmResource object itself. + */ + public StaticSiteResetPropertiesArmResource withRepositoryToken(String repositoryToken) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteResetPropertiesArmResourceProperties(); + } + this.innerProperties().withRepositoryToken(repositoryToken); + return this; + } + + /** + * Get the shouldUpdateRepository property: Determines whether the repository should be updated with the new + * properties. + * + * @return the shouldUpdateRepository value. + */ + public Boolean shouldUpdateRepository() { + return this.innerProperties() == null ? null : this.innerProperties().shouldUpdateRepository(); + } + + /** + * Set the shouldUpdateRepository property: Determines whether the repository should be updated with the new + * properties. + * + * @param shouldUpdateRepository the shouldUpdateRepository value to set. + * @return the StaticSiteResetPropertiesArmResource object itself. + */ + public StaticSiteResetPropertiesArmResource withShouldUpdateRepository(Boolean shouldUpdateRepository) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteResetPropertiesArmResourceProperties(); + } + this.innerProperties().withShouldUpdateRepository(shouldUpdateRepository); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteTemplateOptions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteTemplateOptions.java new file mode 100644 index 0000000000000..fd8f900496862 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteTemplateOptions.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Template Options for the static site. */ +@Fluent +public final class StaticSiteTemplateOptions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteTemplateOptions.class); + + /* + * URL of the template repository. The newly generated repository will be + * based on this one. + */ + @JsonProperty(value = "templateRepositoryUrl") + private String templateRepositoryUrl; + + /* + * Owner of the newly generated repository. + */ + @JsonProperty(value = "owner") + private String owner; + + /* + * Name of the newly generated repository. + */ + @JsonProperty(value = "repositoryName") + private String repositoryName; + + /* + * Description of the newly generated repository. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Whether or not the newly generated repository is a private repository. + * Defaults to false (i.e. public). + */ + @JsonProperty(value = "isPrivate") + private Boolean isPrivate; + + /** + * Get the templateRepositoryUrl property: URL of the template repository. The newly generated repository will be + * based on this one. + * + * @return the templateRepositoryUrl value. + */ + public String templateRepositoryUrl() { + return this.templateRepositoryUrl; + } + + /** + * Set the templateRepositoryUrl property: URL of the template repository. The newly generated repository will be + * based on this one. + * + * @param templateRepositoryUrl the templateRepositoryUrl value to set. + * @return the StaticSiteTemplateOptions object itself. + */ + public StaticSiteTemplateOptions withTemplateRepositoryUrl(String templateRepositoryUrl) { + this.templateRepositoryUrl = templateRepositoryUrl; + return this; + } + + /** + * Get the owner property: Owner of the newly generated repository. + * + * @return the owner value. + */ + public String owner() { + return this.owner; + } + + /** + * Set the owner property: Owner of the newly generated repository. + * + * @param owner the owner value to set. + * @return the StaticSiteTemplateOptions object itself. + */ + public StaticSiteTemplateOptions withOwner(String owner) { + this.owner = owner; + return this; + } + + /** + * Get the repositoryName property: Name of the newly generated repository. + * + * @return the repositoryName value. + */ + public String repositoryName() { + return this.repositoryName; + } + + /** + * Set the repositoryName property: Name of the newly generated repository. + * + * @param repositoryName the repositoryName value to set. + * @return the StaticSiteTemplateOptions object itself. + */ + public StaticSiteTemplateOptions withRepositoryName(String repositoryName) { + this.repositoryName = repositoryName; + return this; + } + + /** + * Get the description property: Description of the newly generated repository. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the newly generated repository. + * + * @param description the description value to set. + * @return the StaticSiteTemplateOptions object itself. + */ + public StaticSiteTemplateOptions withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the isPrivate property: Whether or not the newly generated repository is a private repository. Defaults to + * false (i.e. public). + * + * @return the isPrivate value. + */ + public Boolean isPrivate() { + return this.isPrivate; + } + + /** + * Set the isPrivate property: Whether or not the newly generated repository is a private repository. Defaults to + * false (i.e. public). + * + * @param isPrivate the isPrivate value to set. + * @return the StaticSiteTemplateOptions object itself. + */ + public StaticSiteTemplateOptions withIsPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserArmResource.java new file mode 100644 index 0000000000000..a4669fe2c9596 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserArmResource.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; + +/** An immutable client-side representation of StaticSiteUserArmResource. */ +public interface StaticSiteUserArmResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the provider property: The identity provider for the static site user. + * + * @return the provider value. + */ + String provider(); + + /** + * Gets the userId property: The user id for the static site user. + * + * @return the userId value. + */ + String userId(); + + /** + * Gets the displayName property: The display name for the static site user. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the roles property: The roles for the static site user, in free-form string format. + * + * @return the roles value. + */ + String roles(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner + * object. + * + * @return the inner object. + */ + StaticSiteUserArmResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserCollection.java new file mode 100644 index 0000000000000..df299aea27483 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of static site custom users. */ +@Fluent +public final class StaticSiteUserCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteUserCollection.class); + + /* + * 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; + + /** + * 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 StaticSiteUserCollection object itself. + */ + public StaticSiteUserCollection 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 StaticSiteUserCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserInvitationRequestResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserInvitationRequestResource.java new file mode 100644 index 0000000000000..7d61f52caa3a2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserInvitationRequestResource.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserInvitationRequestResourceProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Static sites user roles invitation resource. */ +@Fluent +public final class StaticSiteUserInvitationRequestResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteUserInvitationRequestResource.class); + + /* + * StaticSiteUserInvitationRequestResource resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSiteUserInvitationRequestResourceProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteUserInvitationRequestResource resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteUserInvitationRequestResourceProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteUserInvitationRequestResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the domain property: The domain name for the static site custom domain. + * + * @return the domain value. + */ + public String domain() { + return this.innerProperties() == null ? null : this.innerProperties().domain(); + } + + /** + * Set the domain property: The domain name for the static site custom domain. + * + * @param domain the domain value to set. + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withDomain(String domain) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserInvitationRequestResourceProperties(); + } + this.innerProperties().withDomain(domain); + return this; + } + + /** + * Get the provider property: The identity provider for the static site user. + * + * @return the provider value. + */ + public String provider() { + return this.innerProperties() == null ? null : this.innerProperties().provider(); + } + + /** + * Set the provider property: The identity provider for the static site user. + * + * @param provider the provider value to set. + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withProvider(String provider) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserInvitationRequestResourceProperties(); + } + this.innerProperties().withProvider(provider); + return this; + } + + /** + * Get the userDetails property: The user id for the static site user. + * + * @return the userDetails value. + */ + public String userDetails() { + return this.innerProperties() == null ? null : this.innerProperties().userDetails(); + } + + /** + * Set the userDetails property: The user id for the static site user. + * + * @param userDetails the userDetails value to set. + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withUserDetails(String userDetails) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserInvitationRequestResourceProperties(); + } + this.innerProperties().withUserDetails(userDetails); + return this; + } + + /** + * Get the roles property: The roles for the static site user, in free-form string format. + * + * @return the roles value. + */ + public String roles() { + return this.innerProperties() == null ? null : this.innerProperties().roles(); + } + + /** + * Set the roles property: The roles for the static site user, in free-form string format. + * + * @param roles the roles value to set. + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withRoles(String roles) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserInvitationRequestResourceProperties(); + } + this.innerProperties().withRoles(roles); + return this; + } + + /** + * Get the numHoursToExpiration property: The number of hours the sas token stays valid. + * + * @return the numHoursToExpiration value. + */ + public Integer numHoursToExpiration() { + return this.innerProperties() == null ? null : this.innerProperties().numHoursToExpiration(); + } + + /** + * Set the numHoursToExpiration property: The number of hours the sas token stays valid. + * + * @param numHoursToExpiration the numHoursToExpiration value to set. + * @return the StaticSiteUserInvitationRequestResource object itself. + */ + public StaticSiteUserInvitationRequestResource withNumHoursToExpiration(Integer numHoursToExpiration) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserInvitationRequestResourceProperties(); + } + this.innerProperties().withNumHoursToExpiration(numHoursToExpiration); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserInvitationResponseResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserInvitationResponseResource.java new file mode 100644 index 0000000000000..fc9b9692bcd51 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserInvitationResponseResource.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserInvitationResponseResourceInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of StaticSiteUserInvitationResponseResource. */ +public interface StaticSiteUserInvitationResponseResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the expiresOn property: The expiration time of the invitation. + * + * @return the expiresOn value. + */ + OffsetDateTime expiresOn(); + + /** + * Gets the invitationUrl property: The url for the invitation link. + * + * @return the invitationUrl value. + */ + String invitationUrl(); + + /** + * Gets the inner + * com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserInvitationResponseResourceInner + * object. + * + * @return the inner object. + */ + StaticSiteUserInvitationResponseResourceInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionApp.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionApp.java new file mode 100644 index 0000000000000..21d8ec9b85711 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionApp.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** A static site user provided function. */ +@Fluent +public final class StaticSiteUserProvidedFunctionApp extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteUserProvidedFunctionApp.class); + + /* + * StaticSiteUserProvidedFunctionApp resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSiteUserProvidedFunctionAppProperties innerProperties; + + /** + * Get the innerProperties property: StaticSiteUserProvidedFunctionApp resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSiteUserProvidedFunctionAppProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteUserProvidedFunctionApp withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @return the functionAppResourceId value. + */ + public String functionAppResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().functionAppResourceId(); + } + + /** + * Set the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @param functionAppResourceId the functionAppResourceId value to set. + * @return the StaticSiteUserProvidedFunctionApp object itself. + */ + public StaticSiteUserProvidedFunctionApp withFunctionAppResourceId(String functionAppResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserProvidedFunctionAppProperties(); + } + this.innerProperties().withFunctionAppResourceId(functionAppResourceId); + return this; + } + + /** + * Get the functionAppRegion property: The region of the function app registered with the static site. + * + * @return the functionAppRegion value. + */ + public String functionAppRegion() { + return this.innerProperties() == null ? null : this.innerProperties().functionAppRegion(); + } + + /** + * Set the functionAppRegion property: The region of the function app registered with the static site. + * + * @param functionAppRegion the functionAppRegion value to set. + * @return the StaticSiteUserProvidedFunctionApp object itself. + */ + public StaticSiteUserProvidedFunctionApp withFunctionAppRegion(String functionAppRegion) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteUserProvidedFunctionAppProperties(); + } + this.innerProperties().withFunctionAppRegion(functionAppRegion); + return this; + } + + /** + * Get the createdOn property: The date and time on which the function app was registered with the static site. + * + * @return the createdOn value. + */ + public OffsetDateTime createdOn() { + return this.innerProperties() == null ? null : this.innerProperties().createdOn(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionAppArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionAppArmResource.java new file mode 100644 index 0000000000000..76f3358a6d9c3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionAppArmResource.java @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of StaticSiteUserProvidedFunctionAppArmResource. */ +public interface StaticSiteUserProvidedFunctionAppArmResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the functionAppResourceId property: The resource id of the function app registered with the static site. + * + * @return the functionAppResourceId value. + */ + String functionAppResourceId(); + + /** + * Gets the functionAppRegion property: The region of the function app registered with the static site. + * + * @return the functionAppRegion value. + */ + String functionAppRegion(); + + /** + * Gets the createdOn property: The date and time on which the function app was registered with the static site. + * + * @return the createdOn value. + */ + OffsetDateTime createdOn(); + + /** + * Gets the inner + * com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner + * object. + * + * @return the inner object. + */ + StaticSiteUserProvidedFunctionAppArmResourceInner innerModel(); + + /** The entirety of the StaticSiteUserProvidedFunctionAppArmResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The StaticSiteUserProvidedFunctionAppArmResource definition stages. */ + interface DefinitionStages { + /** The first stage of the StaticSiteUserProvidedFunctionAppArmResource definition. */ + interface Blank extends WithParentResource { + } + /** + * The stage of the StaticSiteUserProvidedFunctionAppArmResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name, environmentName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @return the next definition stage. + */ + WithCreate withExistingBuild(String resourceGroupName, String name, String environmentName); + } + /** + * The stage of the StaticSiteUserProvidedFunctionAppArmResource 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.WithKind, + DefinitionStages.WithFunctionAppResourceId, + DefinitionStages.WithFunctionAppRegion, + DefinitionStages.WithIsForced { + /** + * Executes the create request. + * + * @return the created resource. + */ + StaticSiteUserProvidedFunctionAppArmResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + StaticSiteUserProvidedFunctionAppArmResource create(Context context); + } + /** The stage of the StaticSiteUserProvidedFunctionAppArmResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** + * The stage of the StaticSiteUserProvidedFunctionAppArmResource definition allowing to specify + * functionAppResourceId. + */ + interface WithFunctionAppResourceId { + /** + * Specifies the functionAppResourceId property: The resource id of the function app registered with the + * static site. + * + * @param functionAppResourceId The resource id of the function app registered with the static site. + * @return the next definition stage. + */ + WithCreate withFunctionAppResourceId(String functionAppResourceId); + } + /** + * The stage of the StaticSiteUserProvidedFunctionAppArmResource definition allowing to specify + * functionAppRegion. + */ + interface WithFunctionAppRegion { + /** + * Specifies the functionAppRegion property: The region of the function app registered with the static site. + * + * @param functionAppRegion The region of the function app registered with the static site. + * @return the next definition stage. + */ + WithCreate withFunctionAppRegion(String functionAppRegion); + } + /** The stage of the StaticSiteUserProvidedFunctionAppArmResource definition allowing to specify isForced. */ + interface WithIsForced { + /** + * Specifies the isForced property: Specify <code>true</code> to force the update of the auth + * configuration on the function app even if an AzureStaticWebApps provider is already configured on the + * function app. The default is <code>false</code>.. + * + * @param isForced Specify <code>true</code> to force the update of the auth configuration on + * the function app even if an AzureStaticWebApps provider is already configured on the function app. + * The default is <code>false</code>. + * @return the next definition stage. + */ + WithCreate withIsForced(Boolean isForced); + } + } + /** + * Begins update for the StaticSiteUserProvidedFunctionAppArmResource resource. + * + * @return the stage of resource update. + */ + StaticSiteUserProvidedFunctionAppArmResource.Update update(); + + /** The template for StaticSiteUserProvidedFunctionAppArmResource update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithFunctionAppResourceId, + UpdateStages.WithFunctionAppRegion, + UpdateStages.WithIsForced { + /** + * Executes the update request. + * + * @return the updated resource. + */ + StaticSiteUserProvidedFunctionAppArmResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + StaticSiteUserProvidedFunctionAppArmResource apply(Context context); + } + /** The StaticSiteUserProvidedFunctionAppArmResource update stages. */ + interface UpdateStages { + /** The stage of the StaticSiteUserProvidedFunctionAppArmResource update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** + * The stage of the StaticSiteUserProvidedFunctionAppArmResource update allowing to specify + * functionAppResourceId. + */ + interface WithFunctionAppResourceId { + /** + * Specifies the functionAppResourceId property: The resource id of the function app registered with the + * static site. + * + * @param functionAppResourceId The resource id of the function app registered with the static site. + * @return the next definition stage. + */ + Update withFunctionAppResourceId(String functionAppResourceId); + } + /** + * The stage of the StaticSiteUserProvidedFunctionAppArmResource update allowing to specify functionAppRegion. + */ + interface WithFunctionAppRegion { + /** + * Specifies the functionAppRegion property: The region of the function app registered with the static site. + * + * @param functionAppRegion The region of the function app registered with the static site. + * @return the next definition stage. + */ + Update withFunctionAppRegion(String functionAppRegion); + } + /** The stage of the StaticSiteUserProvidedFunctionAppArmResource update allowing to specify isForced. */ + interface WithIsForced { + /** + * Specifies the isForced property: Specify <code>true</code> to force the update of the auth + * configuration on the function app even if an AzureStaticWebApps provider is already configured on the + * function app. The default is <code>false</code>.. + * + * @param isForced Specify <code>true</code> to force the update of the auth configuration on + * the function app even if an AzureStaticWebApps provider is already configured on the function app. + * The default is <code>false</code>. + * @return the next definition stage. + */ + Update withIsForced(Boolean isForced); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + StaticSiteUserProvidedFunctionAppArmResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + StaticSiteUserProvidedFunctionAppArmResource refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionAppsCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionAppsCollection.java new file mode 100644 index 0000000000000..9de2124b65cb9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteUserProvidedFunctionAppsCollection.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of static site user provided function apps. */ +@Fluent +public final class StaticSiteUserProvidedFunctionAppsCollection { + @JsonIgnore + private final ClientLogger logger = new ClientLogger(StaticSiteUserProvidedFunctionAppsCollection.class); + + /* + * 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; + + /** + * 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 StaticSiteUserProvidedFunctionAppsCollection object itself. + */ + public StaticSiteUserProvidedFunctionAppsCollection 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 StaticSiteUserProvidedFunctionAppsCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteZipDeploymentArmResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteZipDeploymentArmResource.java new file mode 100644 index 0000000000000..0c14ab5f045ae --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSiteZipDeploymentArmResource.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteZipDeployment; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Static site zip deployment ARM resource. */ +@Fluent +public final class StaticSiteZipDeploymentArmResource extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSiteZipDeploymentArmResource.class); + + /* + * Core resource properties + */ + @JsonProperty(value = "properties") + private StaticSiteZipDeployment innerProperties; + + /** + * Get the innerProperties property: Core resource properties. + * + * @return the innerProperties value. + */ + private StaticSiteZipDeployment innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSiteZipDeploymentArmResource withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the appZipUrl property: URL for the zipped app content. + * + * @return the appZipUrl value. + */ + public String appZipUrl() { + return this.innerProperties() == null ? null : this.innerProperties().appZipUrl(); + } + + /** + * Set the appZipUrl property: URL for the zipped app content. + * + * @param appZipUrl the appZipUrl value to set. + * @return the StaticSiteZipDeploymentArmResource object itself. + */ + public StaticSiteZipDeploymentArmResource withAppZipUrl(String appZipUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteZipDeployment(); + } + this.innerProperties().withAppZipUrl(appZipUrl); + return this; + } + + /** + * Get the apiZipUrl property: URL for the zipped api content. + * + * @return the apiZipUrl value. + */ + public String apiZipUrl() { + return this.innerProperties() == null ? null : this.innerProperties().apiZipUrl(); + } + + /** + * Set the apiZipUrl property: URL for the zipped api content. + * + * @param apiZipUrl the apiZipUrl value to set. + * @return the StaticSiteZipDeploymentArmResource object itself. + */ + public StaticSiteZipDeploymentArmResource withApiZipUrl(String apiZipUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteZipDeployment(); + } + this.innerProperties().withApiZipUrl(apiZipUrl); + return this; + } + + /** + * Get the deploymentTitle property: A title to label the deployment. + * + * @return the deploymentTitle value. + */ + public String deploymentTitle() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentTitle(); + } + + /** + * Set the deploymentTitle property: A title to label the deployment. + * + * @param deploymentTitle the deploymentTitle value to set. + * @return the StaticSiteZipDeploymentArmResource object itself. + */ + public StaticSiteZipDeploymentArmResource withDeploymentTitle(String deploymentTitle) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteZipDeployment(); + } + this.innerProperties().withDeploymentTitle(deploymentTitle); + return this; + } + + /** + * Get the provider property: The provider submitting this deployment. + * + * @return the provider value. + */ + public String provider() { + return this.innerProperties() == null ? null : this.innerProperties().provider(); + } + + /** + * Set the provider property: The provider submitting this deployment. + * + * @param provider the provider value to set. + * @return the StaticSiteZipDeploymentArmResource object itself. + */ + public StaticSiteZipDeploymentArmResource withProvider(String provider) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteZipDeployment(); + } + this.innerProperties().withProvider(provider); + return this; + } + + /** + * Get the functionLanguage property: The language of the api content, if it exists. + * + * @return the functionLanguage value. + */ + public String functionLanguage() { + return this.innerProperties() == null ? null : this.innerProperties().functionLanguage(); + } + + /** + * Set the functionLanguage property: The language of the api content, if it exists. + * + * @param functionLanguage the functionLanguage value to set. + * @return the StaticSiteZipDeploymentArmResource object itself. + */ + public StaticSiteZipDeploymentArmResource withFunctionLanguage(String functionLanguage) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSiteZipDeployment(); + } + this.innerProperties().withFunctionLanguage(functionLanguage); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSites.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSites.java new file mode 100644 index 0000000000000..86c32f27fbdd1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSites.java @@ -0,0 +1,1561 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.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.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; + +/** Resource collection API of StaticSites. */ +public interface StaticSites { + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + StaticSitesWorkflowPreview previewWorkflow( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest); + + /** + * Description for Generates a preview workflow file for the static site. + * + * @param location Location where you plan to create the static site. + * @param staticSitesWorkflowPreviewRequest A JSON representation of the StaticSitesWorkflowPreviewRequest + * properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return preview for the Static Site Workflow to be generated. + */ + Response previewWorkflowWithResponse( + String location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Context context); + + /** + * Description for Get all Static Sites for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 static sites. + */ + PagedIterable list(); + + /** + * Description for Get all Static Sites for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static sites. + */ + PagedIterable list(Context context); + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static sites. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Gets all static sites in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static sites. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + StaticSiteArmResource getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Gets the details of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name); + + /** + * Description for Deletes a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 name, Context context); + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site custom users. + */ + PagedIterable listStaticSiteUsers( + String resourceGroupName, String name, String authprovider); + + /** + * Description for Gets the list of users of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for the users. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site custom users. + */ + PagedIterable listStaticSiteUsers( + String resourceGroupName, String name, String authprovider, Context context); + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteUser(String resourceGroupName, String name, String authprovider, String userid); + + /** + * Description for Deletes the user entry from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the staticsite. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteStaticSiteUserWithResponse( + String resourceGroupName, String name, String authprovider, String userid, Context context); + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + StaticSiteUserArmResource updateStaticSiteUser( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope); + + /** + * Description for Updates a user entry with the listed roles. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param authprovider The auth provider for this user. + * @param userid The user id of the user. + * @param staticSiteUserEnvelope A JSON representation of the StaticSiteUser properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User ARM resource. + */ + Response updateStaticSiteUserWithResponse( + String resourceGroupName, + String name, + String authprovider, + String userid, + StaticSiteUserArmResourceInner staticSiteUserEnvelope, + Context context); + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site builds. + */ + PagedIterable getStaticSiteBuilds(String resourceGroupName, String name); + + /** + * Description for Gets all static site builds for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site builds. + */ + PagedIterable getStaticSiteBuilds( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + StaticSiteBuildArmResource getStaticSiteBuild(String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the details of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Build ARM resource. + */ + Response getStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteBuild(String resourceGroupName, String name, String environmentName); + + /** + * Description for Deletes a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteBuild(String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary createOrUpdateStaticSiteBuildAppSettings( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings); + + /** + * Description for Creates or updates the app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response createOrUpdateStaticSiteBuildAppSettingsWithResponse( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context); + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary createOrUpdateStaticSiteBuildFunctionAppSettings( + String resourceGroupName, String name, String environmentName, StringDictionaryInner appSettings); + + /** + * Description for Creates or updates the function app settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param appSettings The dictionary containing the static site function app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponse( + String resourceGroupName, + String name, + String environmentName, + StringDictionaryInner appSettings, + Context context); + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site functions. + */ + PagedIterable listStaticSiteBuildFunctions( + String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the functions of a particular static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site functions. + */ + PagedIterable listStaticSiteBuildFunctions( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listStaticSiteBuildAppSettings(String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listStaticSiteBuildAppSettingsWithResponse( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listStaticSiteBuildFunctionAppSettings( + String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the application settings of a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listStaticSiteBuildFunctionAppSettingsWithResponse( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site user provided function apps. + */ + PagedIterable getUserProvidedFunctionAppsForStaticSiteBuild( + String resourceGroupName, String name, String environmentName); + + /** + * Description for Gets the details of the user provided function apps registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site user provided function apps. + */ + PagedIterable getUserProvidedFunctionAppsForStaticSiteBuild( + String resourceGroupName, String name, String environmentName, Context context); + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + StaticSiteUserProvidedFunctionAppArmResource getUserProvidedFunctionAppForStaticSiteBuild( + String resourceGroupName, String name, String environmentName, String functionAppName); + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + Response getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context); + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachUserProvidedFunctionAppFromStaticSiteBuild( + String resourceGroupName, String name, String environmentName, String functionAppName); + + /** + * Description for Detach the user provided function app from the static site build. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName The stage site identifier. + * @param functionAppName Name of the function app registered with the static site build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response detachUserProvidedFunctionAppFromStaticSiteBuildWithResponse( + String resourceGroupName, String name, String environmentName, String functionAppName, Context context); + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope); + + /** + * Description for Deploys zipped content to a specific environment of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param environmentName Name of the environment. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSiteBuild( + String resourceGroupName, + String name, + String environmentName, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context); + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary createOrUpdateStaticSiteAppSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings); + + /** + * Description for Creates or updates the app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response createOrUpdateStaticSiteAppSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context); + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary createOrUpdateStaticSiteFunctionAppSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings); + + /** + * Description for Creates or updates the function app settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param appSettings The dictionary containing the static site function app settings to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response createOrUpdateStaticSiteFunctionAppSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context); + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + StaticSiteUserInvitationResponseResource createUserRolesInvitationLink( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope); + + /** + * Description for Creates an invitation link for a user with the role. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteUserRolesInvitationEnvelope Static sites user roles invitation resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static sites user roles invitation link resource. + */ + Response createUserRolesInvitationLinkWithResponse( + String resourceGroupName, + String name, + StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, + Context context); + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site custom domains. + */ + PagedIterable listStaticSiteCustomDomains( + String resourceGroupName, String name); + + /** + * Description for Gets all static site custom domains for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site custom domains. + */ + PagedIterable listStaticSiteCustomDomains( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + StaticSiteCustomDomainOverviewArmResource getStaticSiteCustomDomain( + String resourceGroupName, String name, String domainName); + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site resource to search in. + * @param domainName The custom domain name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + Response getStaticSiteCustomDomainWithResponse( + String resourceGroupName, String name, String domainName, Context context); + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteCustomDomain(String resourceGroupName, String name, String domainName); + + /** + * Description for Deletes a custom domain. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to delete. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteCustomDomain(String resourceGroupName, String name, String domainName, Context context); + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope); + + /** + * Description for Validates a particular custom domain can be added to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param domainName The custom domain to validate. + * @param staticSiteCustomDomainRequestPropertiesEnvelope A JSON representation of the static site custom domain + * request properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 validateCustomDomainCanBeAddedToStaticSite( + String resourceGroupName, + String name, + String domainName, + StaticSiteCustomDomainRequestPropertiesArmResource staticSiteCustomDomainRequestPropertiesEnvelope, + Context context); + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachStaticSite(String resourceGroupName, String name); + + /** + * Description for Detaches a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site to detach. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachStaticSite(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site functions. + */ + PagedIterable listStaticSiteFunctions(String resourceGroupName, String name); + + /** + * Description for Gets the functions of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site functions. + */ + PagedIterable listStaticSiteFunctions( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listStaticSiteAppSettings(String resourceGroupName, String name); + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listStaticSiteAppSettingsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + StringList listStaticSiteConfiguredRoles(String resourceGroupName, String name); + + /** + * Description for Lists the roles configured for the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string list resource. + */ + Response listStaticSiteConfiguredRolesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listStaticSiteFunctionAppSettings(String resourceGroupName, String name); + + /** + * Description for Gets the application settings of a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listStaticSiteFunctionAppSettingsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listStaticSiteSecrets(String resourceGroupName, String name); + + /** + * Description for Lists the secrets for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listStaticSiteSecretsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name); + + /** + * Description for Gets the list of private endpoint connections associated with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param privateEndpointWrapper Request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + PrivateLinkResourcesWrapper getPrivateLinkResources(String resourceGroupName, String name); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetStaticSiteApiKey( + String resourceGroupName, String name, StaticSiteResetPropertiesArmResource resetPropertiesEnvelope); + + /** + * Description for Resets the api key for an existing static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param resetPropertiesEnvelope Static Site Reset Properties ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resetStaticSiteApiKeyWithResponse( + String resourceGroupName, + String name, + StaticSiteResetPropertiesArmResource resetPropertiesEnvelope, + Context context); + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site user provided function apps. + */ + PagedIterable getUserProvidedFunctionAppsForStaticSite( + String resourceGroupName, String name); + + /** + * Description for Gets the details of the user provided function apps registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 static site user provided function apps. + */ + PagedIterable getUserProvidedFunctionAppsForStaticSite( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + StaticSiteUserProvidedFunctionAppArmResource getUserProvidedFunctionAppForStaticSite( + String resourceGroupName, String name, String functionAppName); + + /** + * Description for Gets the details of the user provided function app registered with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + Response getUserProvidedFunctionAppForStaticSiteWithResponse( + String resourceGroupName, String name, String functionAppName, Context context); + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + StaticSiteUserProvidedFunctionAppArmResource registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced); + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + StaticSiteUserProvidedFunctionAppArmResource registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope); + + /** + * Description for Register a user provided function app with a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app to register with the static site. + * @param staticSiteUserProvidedFunctionEnvelope A JSON representation of the user provided function app properties. + * See example. + * @param isForced Specify <code>true</code> to force the update of the auth configuration on the + * function app even if an AzureStaticWebApps provider is already configured on the function app. The default is + * <code>false</code>. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + StaticSiteUserProvidedFunctionAppArmResource registerUserProvidedFunctionAppWithStaticSite( + String resourceGroupName, + String name, + String functionAppName, + StaticSiteUserProvidedFunctionAppArmResourceInner staticSiteUserProvidedFunctionEnvelope, + Boolean isForced, + Context context); + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 detachUserProvidedFunctionAppFromStaticSite(String resourceGroupName, String name, String functionAppName); + + /** + * Description for Detach the user provided function app from the static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param functionAppName Name of the function app registered with the static site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response detachUserProvidedFunctionAppFromStaticSiteWithResponse( + String resourceGroupName, String name, String functionAppName, Context context); + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSite( + String resourceGroupName, String name, StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope); + + /** + * Description for Deploys zipped content to a static site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the static site. + * @param staticSiteZipDeploymentEnvelope A JSON representation of the StaticSiteZipDeployment properties. See + * example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 createZipDeploymentForStaticSite( + String resourceGroupName, + String name, + StaticSiteZipDeploymentArmResource staticSiteZipDeploymentEnvelope, + Context context); + + /** + * Description for Gets the details of a static site. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + StaticSiteArmResource getById(String id); + + /** + * Description for Gets the details of a static site. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site ARM resource. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + StaticSiteUserProvidedFunctionAppArmResource getUserProvidedFunctionAppForStaticSiteBuildById(String id); + + /** + * Description for Gets the details of the user provided function app registered with a static site build. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site User Provided Function App ARM resource. + */ + Response getUserProvidedFunctionAppForStaticSiteBuildByIdWithResponse( + String id, Context context); + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + StaticSiteCustomDomainOverviewArmResource getStaticSiteCustomDomainById(String id); + + /** + * Description for Gets an existing custom domain for a particular static site. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return static Site Custom Domain Overview ARM resource. + */ + Response getStaticSiteCustomDomainByIdWithResponse( + String id, Context context); + + /** + * Description for Deletes a static site. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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); + + /** + * Description for Deletes a static site. + * + * @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.appservice.generated.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); + + /** + * Description for Deletes a custom domain. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteStaticSiteCustomDomainById(String id); + + /** + * Description for Deletes a custom domain. + * + * @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.appservice.generated.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 deleteStaticSiteCustomDomainByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new StaticSiteArmResource resource. + * + * @param name resource name. + * @return the first stage of the new StaticSiteArmResource definition. + */ + StaticSiteArmResource.DefinitionStages.Blank defineStaticSite(String name); + + /** + * Begins definition for a new StaticSiteUserProvidedFunctionAppArmResource resource. + * + * @param name resource name. + * @return the first stage of the new StaticSiteUserProvidedFunctionAppArmResource definition. + */ + StaticSiteUserProvidedFunctionAppArmResource.DefinitionStages.Blank + defineStaticSiteUserProvidedFunctionAppArmResource(String name); + + /** + * Begins definition for a new StaticSiteCustomDomainOverviewArmResource resource. + * + * @param name resource name. + * @return the first stage of the new StaticSiteCustomDomainOverviewArmResource definition. + */ + StaticSiteCustomDomainOverviewArmResource.DefinitionStages.Blank defineStaticSiteCustomDomain(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitesWorkflowPreview.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitesWorkflowPreview.java new file mode 100644 index 0000000000000..d3411f6a38445 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitesWorkflowPreview.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSitesWorkflowPreviewInner; + +/** An immutable client-side representation of StaticSitesWorkflowPreview. */ +public interface StaticSitesWorkflowPreview { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the path property: The path for the workflow file to be generated. + * + * @return the path value. + */ + String path(); + + /** + * Gets the contents property: The contents for the workflow file to be generated. + * + * @return the contents value. + */ + String contents(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.StaticSitesWorkflowPreviewInner + * object. + * + * @return the inner object. + */ + StaticSitesWorkflowPreviewInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitesWorkflowPreviewRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitesWorkflowPreviewRequest.java new file mode 100644 index 0000000000000..0cc350bdf2b6a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StaticSitesWorkflowPreviewRequest.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSitesWorkflowPreviewRequestProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Request entity for previewing the Static Site workflow. */ +@Fluent +public final class StaticSitesWorkflowPreviewRequest extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StaticSitesWorkflowPreviewRequest.class); + + /* + * StaticSitesWorkflowPreviewRequest resource specific properties + */ + @JsonProperty(value = "properties") + private StaticSitesWorkflowPreviewRequestProperties innerProperties; + + /** + * Get the innerProperties property: StaticSitesWorkflowPreviewRequest resource specific properties. + * + * @return the innerProperties value. + */ + private StaticSitesWorkflowPreviewRequestProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StaticSitesWorkflowPreviewRequest withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the repositoryUrl property: URL for the repository of the static site. + * + * @return the repositoryUrl value. + */ + public String repositoryUrl() { + return this.innerProperties() == null ? null : this.innerProperties().repositoryUrl(); + } + + /** + * Set the repositoryUrl property: URL for the repository of the static site. + * + * @param repositoryUrl the repositoryUrl value to set. + * @return the StaticSitesWorkflowPreviewRequest object itself. + */ + public StaticSitesWorkflowPreviewRequest withRepositoryUrl(String repositoryUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSitesWorkflowPreviewRequestProperties(); + } + this.innerProperties().withRepositoryUrl(repositoryUrl); + return this; + } + + /** + * Get the branch property: The target branch in the repository. + * + * @return the branch value. + */ + public String branch() { + return this.innerProperties() == null ? null : this.innerProperties().branch(); + } + + /** + * Set the branch property: The target branch in the repository. + * + * @param branch the branch value to set. + * @return the StaticSitesWorkflowPreviewRequest object itself. + */ + public StaticSitesWorkflowPreviewRequest withBranch(String branch) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSitesWorkflowPreviewRequestProperties(); + } + this.innerProperties().withBranch(branch); + return this; + } + + /** + * Get the buildProperties property: Build properties to configure on the repository. + * + * @return the buildProperties value. + */ + public StaticSiteBuildProperties buildProperties() { + return this.innerProperties() == null ? null : this.innerProperties().buildProperties(); + } + + /** + * Set the buildProperties property: Build properties to configure on the repository. + * + * @param buildProperties the buildProperties value to set. + * @return the StaticSitesWorkflowPreviewRequest object itself. + */ + public StaticSitesWorkflowPreviewRequest withBuildProperties(StaticSiteBuildProperties buildProperties) { + if (this.innerProperties() == null) { + this.innerProperties = new StaticSitesWorkflowPreviewRequestProperties(); + } + this.innerProperties().withBuildProperties(buildProperties); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Status.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Status.java new file mode 100644 index 0000000000000..54f60ed6b7c68 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Status.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Identify the status of the most severe insight generated by the detector. */ +@Fluent +public final class Status { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Status.class); + + /* + * Descriptive message. + */ + @JsonProperty(value = "message") + private String message; + + /* + * Level of the most severe insight generated by the detector. + */ + @JsonProperty(value = "statusId") + private InsightStatus statusId; + + /** + * Get the message property: Descriptive message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Descriptive message. + * + * @param message the message value to set. + * @return the Status object itself. + */ + public Status withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the statusId property: Level of the most severe insight generated by the detector. + * + * @return the statusId value. + */ + public InsightStatus statusId() { + return this.statusId; + } + + /** + * Set the statusId property: Level of the most severe insight generated by the detector. + * + * @param statusId the statusId value to set. + * @return the Status object itself. + */ + public Status withStatusId(InsightStatus 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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusCodesBasedTrigger.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusCodesBasedTrigger.java new file mode 100644 index 0000000000000..cd5e5fa65bc24 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusCodesBasedTrigger.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Trigger based on status code. */ +@Fluent +public final class StatusCodesBasedTrigger { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StatusCodesBasedTrigger.class); + + /* + * HTTP status code. + */ + @JsonProperty(value = "status") + private Integer status; + + /* + * Request Sub Status. + */ + @JsonProperty(value = "subStatus") + private Integer subStatus; + + /* + * Win32 error code. + */ + @JsonProperty(value = "win32Status") + private Integer win32Status; + + /* + * Request Count. + */ + @JsonProperty(value = "count") + private Integer count; + + /* + * Time interval. + */ + @JsonProperty(value = "timeInterval") + private String timeInterval; + + /* + * Request Path + */ + @JsonProperty(value = "path") + private String path; + + /** + * Get the status property: HTTP status code. + * + * @return the status value. + */ + public Integer status() { + return this.status; + } + + /** + * Set the status property: HTTP status code. + * + * @param status the status value to set. + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withStatus(Integer status) { + this.status = status; + return this; + } + + /** + * Get the subStatus property: Request Sub Status. + * + * @return the subStatus value. + */ + public Integer subStatus() { + return this.subStatus; + } + + /** + * Set the subStatus property: Request Sub Status. + * + * @param subStatus the subStatus value to set. + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withSubStatus(Integer subStatus) { + this.subStatus = subStatus; + return this; + } + + /** + * Get the win32Status property: Win32 error code. + * + * @return the win32Status value. + */ + public Integer win32Status() { + return this.win32Status; + } + + /** + * Set the win32Status property: Win32 error code. + * + * @param win32Status the win32Status value to set. + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withWin32Status(Integer win32Status) { + this.win32Status = win32Status; + return this; + } + + /** + * Get the count property: Request Count. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Request Count. + * + * @param count the count value to set. + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the timeInterval property: Time interval. + * + * @return the timeInterval value. + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set the timeInterval property: Time interval. + * + * @param timeInterval the timeInterval value to set. + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withTimeInterval(String timeInterval) { + this.timeInterval = timeInterval; + return this; + } + + /** + * Get the path property: Request Path. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: Request Path. + * + * @param path the path value to set. + * @return the StatusCodesBasedTrigger object itself. + */ + public StatusCodesBasedTrigger withPath(String path) { + this.path = path; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusCodesRangeBasedTrigger.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusCodesRangeBasedTrigger.java new file mode 100644 index 0000000000000..7237756b9f8fc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusCodesRangeBasedTrigger.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Trigger based on range of status codes. */ +@Fluent +public final class StatusCodesRangeBasedTrigger { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StatusCodesRangeBasedTrigger.class); + + /* + * HTTP status code. + */ + @JsonProperty(value = "statusCodes") + private String statusCodes; + + /* + * The path property. + */ + @JsonProperty(value = "path") + private String path; + + /* + * Request Count. + */ + @JsonProperty(value = "count") + private Integer count; + + /* + * Time interval. + */ + @JsonProperty(value = "timeInterval") + private String timeInterval; + + /** + * Get the statusCodes property: HTTP status code. + * + * @return the statusCodes value. + */ + public String statusCodes() { + return this.statusCodes; + } + + /** + * Set the statusCodes property: HTTP status code. + * + * @param statusCodes the statusCodes value to set. + * @return the StatusCodesRangeBasedTrigger object itself. + */ + public StatusCodesRangeBasedTrigger withStatusCodes(String statusCodes) { + this.statusCodes = statusCodes; + return this; + } + + /** + * Get the path property: The path property. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The path property. + * + * @param path the path value to set. + * @return the StatusCodesRangeBasedTrigger object itself. + */ + public StatusCodesRangeBasedTrigger withPath(String path) { + this.path = path; + return this; + } + + /** + * Get the count property: Request Count. + * + * @return the count value. + */ + public Integer count() { + return this.count; + } + + /** + * Set the count property: Request Count. + * + * @param count the count value to set. + * @return the StatusCodesRangeBasedTrigger object itself. + */ + public StatusCodesRangeBasedTrigger withCount(Integer count) { + this.count = count; + return this; + } + + /** + * Get the timeInterval property: Time interval. + * + * @return the timeInterval value. + */ + public String timeInterval() { + return this.timeInterval; + } + + /** + * Set the timeInterval property: Time interval. + * + * @param timeInterval the timeInterval value to set. + * @return the StatusCodesRangeBasedTrigger object itself. + */ + public StatusCodesRangeBasedTrigger withTimeInterval(String timeInterval) { + this.timeInterval = timeInterval; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusOptions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusOptions.java new file mode 100644 index 0000000000000..30e51072b8a8e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StatusOptions.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for StatusOptions. */ +public enum StatusOptions { + /** Enum value Ready. */ + READY("Ready"), + + /** Enum value Pending. */ + PENDING("Pending"), + + /** Enum value Creating. */ + CREATING("Creating"); + + /** The actual serialized value for a StatusOptions instance. */ + private final String value; + + StatusOptions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a StatusOptions instance. + * + * @param value the serialized value to parse. + * @return the parsed StatusOptions object, or null if unable to parse. + */ + @JsonCreator + public static StatusOptions fromString(String value) { + StatusOptions[] items = StatusOptions.values(); + for (StatusOptions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageMigrationOptions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageMigrationOptions.java new file mode 100644 index 0000000000000..f31a804badcee --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageMigrationOptions.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.StorageMigrationOptionsProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Options for app content migration. */ +@Fluent +public final class StorageMigrationOptions extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageMigrationOptions.class); + + /* + * StorageMigrationOptions resource specific properties + */ + @JsonProperty(value = "properties") + private StorageMigrationOptionsProperties innerProperties; + + /** + * Get the innerProperties property: StorageMigrationOptions resource specific properties. + * + * @return the innerProperties value. + */ + private StorageMigrationOptionsProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public StorageMigrationOptions withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the azurefilesConnectionString property: AzureFiles connection string. + * + * @return the azurefilesConnectionString value. + */ + public String azurefilesConnectionString() { + return this.innerProperties() == null ? null : this.innerProperties().azurefilesConnectionString(); + } + + /** + * Set the azurefilesConnectionString property: AzureFiles connection string. + * + * @param azurefilesConnectionString the azurefilesConnectionString value to set. + * @return the StorageMigrationOptions object itself. + */ + public StorageMigrationOptions withAzurefilesConnectionString(String azurefilesConnectionString) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageMigrationOptionsProperties(); + } + this.innerProperties().withAzurefilesConnectionString(azurefilesConnectionString); + return this; + } + + /** + * Get the azurefilesShare property: AzureFiles share. + * + * @return the azurefilesShare value. + */ + public String azurefilesShare() { + return this.innerProperties() == null ? null : this.innerProperties().azurefilesShare(); + } + + /** + * Set the azurefilesShare property: AzureFiles share. + * + * @param azurefilesShare the azurefilesShare value to set. + * @return the StorageMigrationOptions object itself. + */ + public StorageMigrationOptions withAzurefilesShare(String azurefilesShare) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageMigrationOptionsProperties(); + } + this.innerProperties().withAzurefilesShare(azurefilesShare); + return this; + } + + /** + * Get the switchSiteAfterMigration property: <code>true</code>if the app should be switched over; + * otherwise, <code>false</code>. + * + * @return the switchSiteAfterMigration value. + */ + public Boolean switchSiteAfterMigration() { + return this.innerProperties() == null ? null : this.innerProperties().switchSiteAfterMigration(); + } + + /** + * Set the switchSiteAfterMigration property: <code>true</code>if the app should be switched over; + * otherwise, <code>false</code>. + * + * @param switchSiteAfterMigration the switchSiteAfterMigration value to set. + * @return the StorageMigrationOptions object itself. + */ + public StorageMigrationOptions withSwitchSiteAfterMigration(Boolean switchSiteAfterMigration) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageMigrationOptionsProperties(); + } + this.innerProperties().withSwitchSiteAfterMigration(switchSiteAfterMigration); + return this; + } + + /** + * Get the blockWriteAccessToSite property: <code>true</code> if the app should be read only during copy + * operation; otherwise, <code>false</code>. + * + * @return the blockWriteAccessToSite value. + */ + public Boolean blockWriteAccessToSite() { + return this.innerProperties() == null ? null : this.innerProperties().blockWriteAccessToSite(); + } + + /** + * Set the blockWriteAccessToSite property: <code>true</code> if the app should be read only during copy + * operation; otherwise, <code>false</code>. + * + * @param blockWriteAccessToSite the blockWriteAccessToSite value to set. + * @return the StorageMigrationOptions object itself. + */ + public StorageMigrationOptions withBlockWriteAccessToSite(Boolean blockWriteAccessToSite) { + if (this.innerProperties() == null) { + this.innerProperties = new StorageMigrationOptionsProperties(); + } + this.innerProperties().withBlockWriteAccessToSite(blockWriteAccessToSite); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageMigrationResponse.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageMigrationResponse.java new file mode 100644 index 0000000000000..0a4aa7d2ae8da --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageMigrationResponse.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StorageMigrationResponseInner; + +/** An immutable client-side representation of StorageMigrationResponse. */ +public interface StorageMigrationResponse { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the operationId property: When server starts the migration process, it will return an operation ID + * identifying that particular migration operation. + * + * @return the operationId value. + */ + String operationId(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.StorageMigrationResponseInner object. + * + * @return the inner object. + */ + StorageMigrationResponseInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageType.java new file mode 100644 index 0000000000000..d0743e214d0fe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StorageType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for StorageType. */ +public enum StorageType { + /** Enum value LocalNode. */ + LOCAL_NODE("LocalNode"), + + /** Enum value NetworkFileSystem. */ + NETWORK_FILE_SYSTEM("NetworkFileSystem"); + + /** The actual serialized value for a StorageType instance. */ + private final String value; + + StorageType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a StorageType instance. + * + * @param value the serialized value to parse. + * @return the parsed StorageType object, or null if unable to parse. + */ + @JsonCreator + public static StorageType fromString(String value) { + StorageType[] items = StorageType.values(); + for (StorageType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StringDictionary.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StringDictionary.java new file mode 100644 index 0000000000000..53905b8bd7a42 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StringDictionary.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.Map; + +/** An immutable client-side representation of StringDictionary. */ +public interface StringDictionary { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the properties property: Settings. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner object. + * + * @return the inner object. + */ + StringDictionaryInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StringList.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StringList.java new file mode 100644 index 0000000000000..deb784eef1391 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/StringList.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.StringListInner; +import java.util.List; + +/** An immutable client-side representation of StringList. */ +public interface StringList { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the properties property: List of string resources. + * + * @return the properties value. + */ + List properties(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.StringListInner object. + * + * @return the inner object. + */ + StringListInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SupportTopic.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SupportTopic.java new file mode 100644 index 0000000000000..ad6d09e5b4616 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SupportTopic.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Defines a unique Support Topic. */ +@Immutable +public final class SupportTopic { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SupportTopic.class); + + /* + * Support Topic Id + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Unique resource Id + */ + @JsonProperty(value = "pesId", access = JsonProperty.Access.WRITE_ONLY) + private String pesId; + + /** + * Get the id property: Support Topic Id. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the pesId property: Unique resource Id. + * + * @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/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SupportedTlsVersions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SupportedTlsVersions.java new file mode 100644 index 0000000000000..5bbe8baddc1bb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SupportedTlsVersions.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for SupportedTlsVersions. */ +public final class SupportedTlsVersions extends ExpandableStringEnum { + /** Static value 1.0 for SupportedTlsVersions. */ + public static final SupportedTlsVersions ONE_ZERO = fromString("1.0"); + + /** Static value 1.1 for SupportedTlsVersions. */ + public static final SupportedTlsVersions ONE_ONE = fromString("1.1"); + + /** Static value 1.2 for SupportedTlsVersions. */ + public static final SupportedTlsVersions ONE_TWO = fromString("1.2"); + + /** + * Creates or finds a SupportedTlsVersions from its string representation. + * + * @param name a name to look for. + * @return the corresponding SupportedTlsVersions. + */ + @JsonCreator + public static SupportedTlsVersions fromString(String name) { + return fromString(name, SupportedTlsVersions.class); + } + + /** @return known SupportedTlsVersions values. */ + public static Collection values() { + return values(SupportedTlsVersions.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SwiftVirtualNetwork.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SwiftVirtualNetwork.java new file mode 100644 index 0000000000000..f3d72f2f4db1c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/SwiftVirtualNetwork.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.SwiftVirtualNetworkInner; + +/** An immutable client-side representation of SwiftVirtualNetwork. */ +public interface SwiftVirtualNetwork { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the subnetResourceId property: The Virtual Network subnet's resource ID. This is the subnet that this Web + * App will join. This subnet must have a delegation to Microsoft.Web/serverFarms defined first. + * + * @return the subnetResourceId value. + */ + String subnetResourceId(); + + /** + * Gets the swiftSupported property: A flag that specifies if the scale unit this Web App is on supports Swift + * integration. + * + * @return the swiftSupported value. + */ + Boolean swiftSupported(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.SwiftVirtualNetworkInner object. + * + * @return the inner object. + */ + SwiftVirtualNetworkInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Template.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Template.java new file mode 100644 index 0000000000000..b89d39a475753 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Template.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Container App versioned application definition. Defines the desired state of an immutable revision. Any changes to + * this section Will result in a new revision being created. + */ +@Fluent +public final class Template { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Template.class); + + /* + * User friendly suffix that is appended to the revision name + */ + @JsonProperty(value = "revisionSuffix") + private String revisionSuffix; + + /* + * List of container definitions for the Container App. + */ + @JsonProperty(value = "containers") + private List containers; + + /* + * Scaling properties for the Container App. + */ + @JsonProperty(value = "scale") + private Scale scale; + + /* + * Dapr configuration for the Container App. + */ + @JsonProperty(value = "dapr") + private Dapr dapr; + + /** + * Get the revisionSuffix property: User friendly suffix that is appended to the revision name. + * + * @return the revisionSuffix value. + */ + public String revisionSuffix() { + return this.revisionSuffix; + } + + /** + * Set the revisionSuffix property: User friendly suffix that is appended to the revision name. + * + * @param revisionSuffix the revisionSuffix value to set. + * @return the Template object itself. + */ + public Template withRevisionSuffix(String revisionSuffix) { + this.revisionSuffix = revisionSuffix; + return this; + } + + /** + * Get the containers property: List of container definitions for the Container App. + * + * @return the containers value. + */ + public List containers() { + return this.containers; + } + + /** + * Set the containers property: List of container definitions for the Container App. + * + * @param containers the containers value to set. + * @return the Template object itself. + */ + public Template withContainers(List containers) { + this.containers = containers; + return this; + } + + /** + * Get the scale property: Scaling properties for the Container App. + * + * @return the scale value. + */ + public Scale scale() { + return this.scale; + } + + /** + * Set the scale property: Scaling properties for the Container App. + * + * @param scale the scale value to set. + * @return the Template object itself. + */ + public Template withScale(Scale scale) { + this.scale = scale; + return this; + } + + /** + * Get the dapr property: Dapr configuration for the Container App. + * + * @return the dapr value. + */ + public Dapr dapr() { + return this.dapr; + } + + /** + * Set the dapr property: Dapr configuration for the Container App. + * + * @param dapr the dapr value to set. + * @return the Template object itself. + */ + public Template withDapr(Dapr dapr) { + this.dapr = dapr; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (containers() != null) { + containers().forEach(e -> e.validate()); + } + if (scale() != null) { + scale().validate(); + } + if (dapr() != null) { + dapr().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TldLegalAgreement.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TldLegalAgreement.java new file mode 100644 index 0000000000000..a4b7204c2be5c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TldLegalAgreement.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.TldLegalAgreementInner; + +/** An immutable client-side representation of TldLegalAgreement. */ +public interface TldLegalAgreement { + /** + * Gets the agreementKey property: Unique identifier for the agreement. + * + * @return the agreementKey value. + */ + String agreementKey(); + + /** + * Gets the title property: Agreement title. + * + * @return the title value. + */ + String title(); + + /** + * Gets the content property: Agreement details. + * + * @return the content value. + */ + String content(); + + /** + * Gets the url property: URL where a copy of the agreement details is hosted. + * + * @return the url value. + */ + String url(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.TldLegalAgreementInner object. + * + * @return the inner object. + */ + TldLegalAgreementInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TldLegalAgreementCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TldLegalAgreementCollection.java new file mode 100644 index 0000000000000..dcde73578331b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TldLegalAgreementCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.TldLegalAgreementInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of top-level domain legal agreements. */ +@Fluent +public final class TldLegalAgreementCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TldLegalAgreementCollection.class); + + /* + * 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; + + /** + * 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 TldLegalAgreementCollection object itself. + */ + public TldLegalAgreementCollection 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 TldLegalAgreementCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TokenStore.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TokenStore.java new file mode 100644 index 0000000000000..4b3c9ff629a26 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TokenStore.java @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the token store. */ +@Fluent +public final class TokenStore { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TokenStore.class); + + /* + * true to durably store platform-specific security tokens + * that are obtained during login flows; otherwise, false. + * The default is false. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The number of hours after session token expiration that a session token + * can be used to + * call the token refresh API. The default is 72 hours. + */ + @JsonProperty(value = "tokenRefreshExtensionHours") + private Double tokenRefreshExtensionHours; + + /* + * The configuration settings of the storage of the tokens if a file system + * is used. + */ + @JsonProperty(value = "fileSystem") + private FileSystemTokenStore fileSystem; + + /* + * The configuration settings of the storage of the tokens if blob storage + * is used. + */ + @JsonProperty(value = "azureBlobStorage") + private BlobStorageTokenStore azureBlobStorage; + + /** + * Get the enabled property: <code>true</code> to durably store platform-specific security tokens that + * are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>true</code> to durably store platform-specific security tokens that + * are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @param enabled the enabled value to set. + * @return the TokenStore object itself. + */ + public TokenStore withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @return the tokenRefreshExtensionHours value. + */ + public Double tokenRefreshExtensionHours() { + return this.tokenRefreshExtensionHours; + } + + /** + * Set the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @param tokenRefreshExtensionHours the tokenRefreshExtensionHours value to set. + * @return the TokenStore object itself. + */ + public TokenStore withTokenRefreshExtensionHours(Double tokenRefreshExtensionHours) { + this.tokenRefreshExtensionHours = tokenRefreshExtensionHours; + return this; + } + + /** + * Get the fileSystem property: The configuration settings of the storage of the tokens if a file system is used. + * + * @return the fileSystem value. + */ + public FileSystemTokenStore fileSystem() { + return this.fileSystem; + } + + /** + * Set the fileSystem property: The configuration settings of the storage of the tokens if a file system is used. + * + * @param fileSystem the fileSystem value to set. + * @return the TokenStore object itself. + */ + public TokenStore withFileSystem(FileSystemTokenStore fileSystem) { + this.fileSystem = fileSystem; + return this; + } + + /** + * Get the azureBlobStorage property: The configuration settings of the storage of the tokens if blob storage is + * used. + * + * @return the azureBlobStorage value. + */ + public BlobStorageTokenStore azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set the azureBlobStorage property: The configuration settings of the storage of the tokens if blob storage is + * used. + * + * @param azureBlobStorage the azureBlobStorage value to set. + * @return the TokenStore object itself. + */ + public TokenStore withAzureBlobStorage(BlobStorageTokenStore azureBlobStorage) { + this.azureBlobStorage = azureBlobStorage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (fileSystem() != null) { + fileSystem().validate(); + } + if (azureBlobStorage() != null) { + azureBlobStorage().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomain.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomain.java new file mode 100644 index 0000000000000..094e6ce982256 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomain.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.TopLevelDomainInner; + +/** An immutable client-side representation of TopLevelDomain. */ +public interface TopLevelDomain { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the privacy property: If <code>true</code>, then the top level domain supports domain privacy; + * otherwise, <code>false</code>. + * + * @return the privacy value. + */ + Boolean privacy(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.TopLevelDomainInner object. + * + * @return the inner object. + */ + TopLevelDomainInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomainAgreementOption.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomainAgreementOption.java new file mode 100644 index 0000000000000..a378fb9a62886 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomainAgreementOption.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Options for retrieving the list of top level domain legal agreements. */ +@Fluent +public final class TopLevelDomainAgreementOption { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopLevelDomainAgreementOption.class); + + /* + * If true, then the list of agreements will include + * agreements for domain privacy as well; otherwise, false. + */ + @JsonProperty(value = "includePrivacy") + private Boolean includePrivacy; + + /* + * If true, then the list of agreements will include + * agreements for domain transfer as well; otherwise, false. + */ + @JsonProperty(value = "forTransfer") + private Boolean forTransfer; + + /** + * Get the includePrivacy property: If <code>true</code>, then the list of agreements will include + * agreements for domain privacy as well; otherwise, <code>false</code>. + * + * @return the includePrivacy value. + */ + public Boolean includePrivacy() { + return this.includePrivacy; + } + + /** + * Set the includePrivacy property: If <code>true</code>, then the list of agreements will include + * agreements for domain privacy as well; otherwise, <code>false</code>. + * + * @param includePrivacy the includePrivacy value to set. + * @return the TopLevelDomainAgreementOption object itself. + */ + public TopLevelDomainAgreementOption withIncludePrivacy(Boolean includePrivacy) { + this.includePrivacy = includePrivacy; + return this; + } + + /** + * Get the forTransfer property: If <code>true</code>, then the list of agreements will include + * agreements for domain transfer as well; otherwise, <code>false</code>. + * + * @return the forTransfer value. + */ + public Boolean forTransfer() { + return this.forTransfer; + } + + /** + * Set the forTransfer property: If <code>true</code>, then the list of agreements will include + * agreements for domain transfer as well; otherwise, <code>false</code>. + * + * @param forTransfer the forTransfer value to set. + * @return the TopLevelDomainAgreementOption object itself. + */ + public TopLevelDomainAgreementOption withForTransfer(Boolean forTransfer) { + this.forTransfer = forTransfer; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomainCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomainCollection.java new file mode 100644 index 0000000000000..8abe74ed5611e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomainCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.TopLevelDomainInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Top-level domains. */ +@Fluent +public final class TopLevelDomainCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TopLevelDomainCollection.class); + + /* + * 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; + + /** + * 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 TopLevelDomainCollection object itself. + */ + public TopLevelDomainCollection 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 TopLevelDomainCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomains.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomains.java new file mode 100644 index 0000000000000..de1f9191588c6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TopLevelDomains.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.appservice.generated.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 TopLevelDomains. */ +public interface TopLevelDomains { + /** + * Description for Get all top-level domains supported for registration. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 Top-level domains. + */ + PagedIterable list(); + + /** + * Description for Get all top-level domains supported for registration. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Top-level domains. + */ + PagedIterable list(Context context); + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 top level domain object. + */ + TopLevelDomain get(String name); + + /** + * Description for Get details of a top-level domain. + * + * @param name Name of the top-level domain. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 top level domain object. + */ + Response getWithResponse(String name, Context context); + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 top-level domain legal agreements. + */ + PagedIterable listAgreements(String name, TopLevelDomainAgreementOption agreementOption); + + /** + * Description for Gets all legal agreements that user needs to accept before purchasing a domain. + * + * @param name Name of the top-level domain. + * @param agreementOption Domain agreement options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 top-level domain legal agreements. + */ + PagedIterable listAgreements( + String name, TopLevelDomainAgreementOption agreementOption, Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TrafficWeight.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TrafficWeight.java new file mode 100644 index 0000000000000..013451afdd350 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TrafficWeight.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Traffic weight assigned to a revision. */ +@Fluent +public final class TrafficWeight { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TrafficWeight.class); + + /* + * Name of a revision + */ + @JsonProperty(value = "revisionName") + private String revisionName; + + /* + * Traffic weight assigned to a revision + */ + @JsonProperty(value = "weight") + private Integer weight; + + /* + * Indicates that the traffic weight belongs to a latest stable revision + */ + @JsonProperty(value = "latestRevision") + private Boolean latestRevision; + + /** + * Get the revisionName property: Name of a revision. + * + * @return the revisionName value. + */ + public String revisionName() { + return this.revisionName; + } + + /** + * Set the revisionName property: Name of a revision. + * + * @param revisionName the revisionName value to set. + * @return the TrafficWeight object itself. + */ + public TrafficWeight withRevisionName(String revisionName) { + this.revisionName = revisionName; + return this; + } + + /** + * Get the weight property: Traffic weight assigned to a revision. + * + * @return the weight value. + */ + public Integer weight() { + return this.weight; + } + + /** + * Set the weight property: Traffic weight assigned to a revision. + * + * @param weight the weight value to set. + * @return the TrafficWeight object itself. + */ + public TrafficWeight withWeight(Integer weight) { + this.weight = weight; + return this; + } + + /** + * Get the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision. + * + * @return the latestRevision value. + */ + public Boolean latestRevision() { + return this.latestRevision; + } + + /** + * Set the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision. + * + * @param latestRevision the latestRevision value to set. + * @return the TrafficWeight object itself. + */ + public TrafficWeight withLatestRevision(Boolean latestRevision) { + this.latestRevision = latestRevision; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggerTypes.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggerTypes.java new file mode 100644 index 0000000000000..9e3b426cbe3be --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggerTypes.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for TriggerTypes. */ +public final class TriggerTypes extends ExpandableStringEnum { + /** Static value HttpTrigger for TriggerTypes. */ + public static final TriggerTypes HTTP_TRIGGER = fromString("HttpTrigger"); + + /** Static value Unknown for TriggerTypes. */ + public static final TriggerTypes UNKNOWN = fromString("Unknown"); + + /** + * Creates or finds a TriggerTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding TriggerTypes. + */ + @JsonCreator + public static TriggerTypes fromString(String name) { + return fromString(name, TriggerTypes.class); + } + + /** @return known TriggerTypes values. */ + public static Collection values() { + return values(TriggerTypes.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobHistory.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobHistory.java new file mode 100644 index 0000000000000..ed2f7b0a8b4dd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobHistory.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredJobHistoryInner; +import java.util.List; + +/** An immutable client-side representation of TriggeredJobHistory. */ +public interface TriggeredJobHistory { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the runs property: List of triggered web job runs. + * + * @return the runs value. + */ + List runs(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredJobHistoryInner object. + * + * @return the inner object. + */ + TriggeredJobHistoryInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobHistoryCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobHistoryCollection.java new file mode 100644 index 0000000000000..443ffd6b5e1c3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobHistoryCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredJobHistoryInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu continuous web job information elements. */ +@Fluent +public final class TriggeredJobHistoryCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggeredJobHistoryCollection.class); + + /* + * 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; + + /** + * 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 TriggeredJobHistoryCollection object itself. + */ + public TriggeredJobHistoryCollection 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 TriggeredJobHistoryCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobRun.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobRun.java new file mode 100644 index 0000000000000..58a2129ccd198 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredJobRun.java @@ -0,0 +1,311 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Triggered Web Job Run Information. */ +@Fluent +public final class TriggeredJobRun { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggeredJobRun.class); + + /* + * Job ID. + */ + @JsonProperty(value = "web_job_id") + private String webJobId; + + /* + * Job name. + */ + @JsonProperty(value = "web_job_name") + private String webJobName; + + /* + * Job status. + */ + @JsonProperty(value = "status") + private TriggeredWebJobStatus status; + + /* + * Start time. + */ + @JsonProperty(value = "start_time") + private OffsetDateTime startTime; + + /* + * End time. + */ + @JsonProperty(value = "end_time") + private OffsetDateTime endTime; + + /* + * Job duration. + */ + @JsonProperty(value = "duration") + private String duration; + + /* + * Output URL. + */ + @JsonProperty(value = "output_url") + private String outputUrl; + + /* + * Error URL. + */ + @JsonProperty(value = "error_url") + private String errorUrl; + + /* + * Job URL. + */ + @JsonProperty(value = "url") + private String url; + + /* + * Job name. + */ + @JsonProperty(value = "job_name") + private String jobName; + + /* + * Job trigger. + */ + @JsonProperty(value = "trigger") + private String trigger; + + /** + * Get the webJobId property: Job ID. + * + * @return the webJobId value. + */ + public String webJobId() { + return this.webJobId; + } + + /** + * Set the webJobId property: Job ID. + * + * @param webJobId the webJobId value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withWebJobId(String webJobId) { + this.webJobId = webJobId; + return this; + } + + /** + * Get the webJobName property: Job name. + * + * @return the webJobName value. + */ + public String webJobName() { + return this.webJobName; + } + + /** + * Set the webJobName property: Job name. + * + * @param webJobName the webJobName value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withWebJobName(String webJobName) { + this.webJobName = webJobName; + return this; + } + + /** + * Get the status property: Job status. + * + * @return the status value. + */ + public TriggeredWebJobStatus status() { + return this.status; + } + + /** + * Set the status property: Job status. + * + * @param status the status value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withStatus(TriggeredWebJobStatus status) { + this.status = status; + return this; + } + + /** + * Get the startTime property: Start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Start time. + * + * @param startTime the startTime value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: End time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: End time. + * + * @param endTime the endTime value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the duration property: Job duration. + * + * @return the duration value. + */ + public String duration() { + return this.duration; + } + + /** + * Set the duration property: Job duration. + * + * @param duration the duration value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withDuration(String duration) { + this.duration = duration; + return this; + } + + /** + * Get the outputUrl property: Output URL. + * + * @return the outputUrl value. + */ + public String outputUrl() { + return this.outputUrl; + } + + /** + * Set the outputUrl property: Output URL. + * + * @param outputUrl the outputUrl value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withOutputUrl(String outputUrl) { + this.outputUrl = outputUrl; + return this; + } + + /** + * Get the errorUrl property: Error URL. + * + * @return the errorUrl value. + */ + public String errorUrl() { + return this.errorUrl; + } + + /** + * Set the errorUrl property: Error URL. + * + * @param errorUrl the errorUrl value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withErrorUrl(String errorUrl) { + this.errorUrl = errorUrl; + return this; + } + + /** + * Get the url property: Job URL. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: Job URL. + * + * @param url the url value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the jobName property: Job name. + * + * @return the jobName value. + */ + public String jobName() { + return this.jobName; + } + + /** + * Set the jobName property: Job name. + * + * @param jobName the jobName value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withJobName(String jobName) { + this.jobName = jobName; + return this; + } + + /** + * Get the trigger property: Job trigger. + * + * @return the trigger value. + */ + public String trigger() { + return this.trigger; + } + + /** + * Set the trigger property: Job trigger. + * + * @param trigger the trigger value to set. + * @return the TriggeredJobRun object itself. + */ + public TriggeredJobRun withTrigger(String trigger) { + this.trigger = trigger; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJob.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJob.java new file mode 100644 index 0000000000000..d1507cbac8dbf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJob.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredWebJobInner; +import java.util.Map; + +/** An immutable client-side representation of TriggeredWebJob. */ +public interface TriggeredWebJob { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the latestRun property: Latest job run information. + * + * @return the latestRun value. + */ + TriggeredJobRun latestRun(); + + /** + * Gets the historyUrl property: History URL. + * + * @return the historyUrl value. + */ + String historyUrl(); + + /** + * Gets the schedulerLogsUrl property: Scheduler Logs URL. + * + * @return the schedulerLogsUrl value. + */ + String schedulerLogsUrl(); + + /** + * Gets the runCommand property: Run command. + * + * @return the runCommand value. + */ + String runCommand(); + + /** + * Gets the url property: Job URL. + * + * @return the url value. + */ + String url(); + + /** + * Gets the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + String extraInfoUrl(); + + /** + * Gets the webJobType property: Job type. + * + * @return the webJobType value. + */ + WebJobType webJobType(); + + /** + * Gets the error property: Error information. + * + * @return the error value. + */ + String error(); + + /** + * Gets the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + Boolean usingSdk(); + + /** + * Gets the settings property: Job settings. + * + * @return the settings value. + */ + Map settings(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredWebJobInner object. + * + * @return the inner object. + */ + TriggeredWebJobInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJobCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJobCollection.java new file mode 100644 index 0000000000000..1ca6acf98c6b9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJobCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.TriggeredWebJobInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu continuous web job information elements. */ +@Fluent +public final class TriggeredWebJobCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TriggeredWebJobCollection.class); + + /* + * 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; + + /** + * 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 TriggeredWebJobCollection object itself. + */ + public TriggeredWebJobCollection 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 TriggeredWebJobCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJobStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJobStatus.java new file mode 100644 index 0000000000000..ec410358b7d7e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TriggeredWebJobStatus.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for TriggeredWebJobStatus. */ +public enum TriggeredWebJobStatus { + /** Enum value Success. */ + SUCCESS("Success"), + + /** Enum value Failed. */ + FAILED("Failed"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a TriggeredWebJobStatus instance. */ + private final String value; + + TriggeredWebJobStatus(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a TriggeredWebJobStatus instance. + * + * @param value the serialized value to parse. + * @return the parsed TriggeredWebJobStatus object, or null if unable to parse. + */ + @JsonCreator + public static TriggeredWebJobStatus fromString(String value) { + TriggeredWebJobStatus[] items = TriggeredWebJobStatus.values(); + for (TriggeredWebJobStatus item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Twitter.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Twitter.java new file mode 100644 index 0000000000000..1e69cbe518245 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Twitter.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the Twitter provider. */ +@Fluent +public final class Twitter { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Twitter.class); + + /* + * 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. + */ + @JsonProperty(value = "registration") + private TwitterRegistration registration; + + /** + * Get the enabled property: <code>false</code> if the Twitter provider should not be enabled despite + * the set registration; otherwise, <code>true</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>false</code> if the Twitter provider should not be enabled despite + * the set registration; otherwise, <code>true</code>. + * + * @param enabled the enabled value to set. + * @return the Twitter object itself. + */ + public Twitter withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the registration property: The configuration settings of the app registration for the Twitter provider. + * + * @return the registration value. + */ + public TwitterRegistration registration() { + return this.registration; + } + + /** + * Set the registration property: The configuration settings of the app registration for the Twitter provider. + * + * @param registration the registration value to set. + * @return the Twitter object itself. + */ + public Twitter withRegistration(TwitterRegistration registration) { + this.registration = registration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registration() != null) { + registration().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TwitterRegistration.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TwitterRegistration.java new file mode 100644 index 0000000000000..3b561a4c65722 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/TwitterRegistration.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the app registration for the Twitter provider. */ +@Fluent +public final class TwitterRegistration { + @JsonIgnore private final ClientLogger logger = new ClientLogger(TwitterRegistration.class); + + /* + * The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in + */ + @JsonProperty(value = "consumerKey") + private String consumerKey; + + /* + * 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; + + /** + * Get the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. This + * setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @return the consumerKey value. + */ + public String consumerKey() { + return this.consumerKey; + } + + /** + * Set the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. This + * setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: + * https://dev.twitter.com/web/sign-in. + * + * @param consumerKey the consumerKey value to set. + * @return the TwitterRegistration object itself. + */ + public TwitterRegistration withConsumerKey(String consumerKey) { + this.consumerKey = consumerKey; + return this; + } + + /** + * Get the consumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer secret of + * the Twitter application used for sign-in. + * + * @return the consumerSecretSettingName value. + */ + public String consumerSecretSettingName() { + return this.consumerSecretSettingName; + } + + /** + * Set the consumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer secret of + * the Twitter application used for sign-in. + * + * @param consumerSecretSettingName the consumerSecretSettingName value to set. + * @return the TwitterRegistration object itself. + */ + public TwitterRegistration withConsumerSecretSettingName(String consumerSecretSettingName) { + this.consumerSecretSettingName = consumerSecretSettingName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UnauthenticatedClientAction.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UnauthenticatedClientAction.java new file mode 100644 index 0000000000000..f387d91857a45 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UnauthenticatedClientAction.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for UnauthenticatedClientAction. */ +public enum UnauthenticatedClientAction { + /** Enum value RedirectToLoginPage. */ + REDIRECT_TO_LOGIN_PAGE("RedirectToLoginPage"), + + /** Enum value AllowAnonymous. */ + ALLOW_ANONYMOUS("AllowAnonymous"); + + /** The actual serialized value for a UnauthenticatedClientAction instance. */ + private final String value; + + UnauthenticatedClientAction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UnauthenticatedClientAction instance. + * + * @param value the serialized value to parse. + * @return the parsed UnauthenticatedClientAction object, or null if unable to parse. + */ + @JsonCreator + public static UnauthenticatedClientAction fromString(String value) { + UnauthenticatedClientAction[] items = UnauthenticatedClientAction.values(); + for (UnauthenticatedClientAction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UnauthenticatedClientActionV2.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UnauthenticatedClientActionV2.java new file mode 100644 index 0000000000000..8947c0f9c9df2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UnauthenticatedClientActionV2.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for UnauthenticatedClientActionV2. */ +public enum UnauthenticatedClientActionV2 { + /** Enum value RedirectToLoginPage. */ + REDIRECT_TO_LOGIN_PAGE("RedirectToLoginPage"), + + /** Enum value AllowAnonymous. */ + ALLOW_ANONYMOUS("AllowAnonymous"), + + /** Enum value Return401. */ + RETURN401("Return401"), + + /** Enum value Return403. */ + RETURN403("Return403"); + + /** The actual serialized value for a UnauthenticatedClientActionV2 instance. */ + private final String value; + + UnauthenticatedClientActionV2(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UnauthenticatedClientActionV2 instance. + * + * @param value the serialized value to parse. + * @return the parsed UnauthenticatedClientActionV2 object, or null if unable to parse. + */ + @JsonCreator + public static UnauthenticatedClientActionV2 fromString(String value) { + UnauthenticatedClientActionV2[] items = UnauthenticatedClientActionV2.values(); + for (UnauthenticatedClientActionV2 item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Usage.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Usage.java new file mode 100644 index 0000000000000..6e388c004f8f7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/Usage.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.UsageInner; +import java.time.OffsetDateTime; + +/** An immutable client-side representation of Usage. */ +public interface Usage { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the displayName property: Friendly name shown in the UI. + * + * @return the displayName value. + */ + String displayName(); + + /** + * Gets the resourceName property: Name of the quota resource. + * + * @return the resourceName value. + */ + String resourceName(); + + /** + * Gets the unit property: Units of measurement for the quota resource. + * + * @return the unit value. + */ + String unit(); + + /** + * Gets the currentValue property: The current value of the resource counter. + * + * @return the currentValue value. + */ + Long currentValue(); + + /** + * Gets the limit property: The resource limit. + * + * @return the limit value. + */ + Long limit(); + + /** + * Gets the nextResetTime property: Next reset time for the resource counter. + * + * @return the nextResetTime value. + */ + OffsetDateTime nextResetTime(); + + /** + * Gets the computeMode property: Compute mode used for this usage. + * + * @return the computeMode value. + */ + ComputeModeOptions computeMode(); + + /** + * Gets the siteMode property: Site mode used for this usage. + * + * @return the siteMode value. + */ + String siteMode(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.UsageInner object. + * + * @return the inner object. + */ + UsageInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UsageCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UsageCollection.java new file mode 100644 index 0000000000000..42877cf09e415 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UsageCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.UsageInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of usages. */ +@Fluent +public final class UsageCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageCollection.class); + + /* + * 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; + + /** + * 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 UsageCollection object itself. + */ + public UsageCollection 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 UsageCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UsageState.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UsageState.java new file mode 100644 index 0000000000000..77bceef764fb9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UsageState.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for UsageState. */ +public enum UsageState { + /** Enum value Normal. */ + NORMAL("Normal"), + + /** Enum value Exceeded. */ + EXCEEDED("Exceeded"); + + /** The actual serialized value for a UsageState instance. */ + private final String value; + + UsageState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UsageState instance. + * + * @param value the serialized value to parse. + * @return the parsed UsageState object, or null if unable to parse. + */ + @JsonCreator + public static UsageState fromString(String value) { + UsageState[] items = UsageState.values(); + for (UsageState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/User.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/User.java new file mode 100644 index 0000000000000..6aaff9e73a347 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/User.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.UserInner; + +/** An immutable client-side representation of User. */ +public interface User { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the publishingUsername property: Username used for publishing. + * + * @return the publishingUsername value. + */ + String publishingUsername(); + + /** + * Gets the publishingPassword property: Password used for publishing. + * + * @return the publishingPassword value. + */ + String publishingPassword(); + + /** + * Gets the publishingPasswordHash property: Password hash used for publishing. + * + * @return the publishingPasswordHash value. + */ + String publishingPasswordHash(); + + /** + * Gets the publishingPasswordHashSalt property: Password hash salt used for publishing. + * + * @return the publishingPasswordHashSalt value. + */ + String publishingPasswordHashSalt(); + + /** + * Gets the scmUri property: Url of SCM site. + * + * @return the scmUri value. + */ + String scmUri(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.UserInner object. + * + * @return the inner object. + */ + UserInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UserAssignedIdentity.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UserAssignedIdentity.java new file mode 100644 index 0000000000000..e3e182426cfba --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/UserAssignedIdentity.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** User Assigned identity. */ +@Immutable +public class UserAssignedIdentity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(UserAssignedIdentity.class); + + /* + * Principal Id of user assigned identity + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * Client Id of user assigned identity + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** + * Get the principalId property: Principal Id of user assigned identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the clientId property: Client Id of user assigned identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateRequest.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateRequest.java new file mode 100644 index 0000000000000..a7eea4e76603b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateRequest.java @@ -0,0 +1,469 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.AppServiceEnvironment; +import com.azure.resourcemanager.appservice.generated.fluent.models.ValidateProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Resource validation request content. */ +@Fluent +public final class ValidateRequest { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateRequest.class); + + /* + * Resource name to verify. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Resource type used for verification. + */ + @JsonProperty(value = "type", required = true) + private ValidateResourceTypes type; + + /* + * Expected location of the resource. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /* + * Properties of the resource to validate. + */ + @JsonProperty(value = "properties", required = true) + private ValidateProperties innerProperties = new ValidateProperties(); + + /** + * Get the name property: Resource name to verify. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Resource name to verify. + * + * @param name the name value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: Resource type used for verification. + * + * @return the type value. + */ + public ValidateResourceTypes type() { + return this.type; + } + + /** + * Set the type property: Resource type used for verification. + * + * @param type the type value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withType(ValidateResourceTypes type) { + this.type = type; + return this; + } + + /** + * Get the location property: Expected location of the resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Expected location of the resource. + * + * @param location the location value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the innerProperties property: Properties of the resource to validate. + * + * @return the innerProperties value. + */ + private ValidateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the serverFarmId property: ARM resource ID of an App Service plan that would host the app. + * + * @return the serverFarmId value. + */ + public String serverFarmId() { + return this.innerProperties() == null ? null : this.innerProperties().serverFarmId(); + } + + /** + * Set the serverFarmId property: ARM resource ID of an App Service plan that would host the app. + * + * @param serverFarmId the serverFarmId value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withServerFarmId(String serverFarmId) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withServerFarmId(serverFarmId); + return this; + } + + /** + * Get the skuName property: Name of the target SKU for the App Service plan. + * + * @return the skuName value. + */ + public String skuName() { + return this.innerProperties() == null ? null : this.innerProperties().skuName(); + } + + /** + * Set the skuName property: Name of the target SKU for the App Service plan. + * + * @param skuName the skuName value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withSkuName(String skuName) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withSkuName(skuName); + return this; + } + + /** + * Get the needLinuxWorkers property: <code>true</code> if App Service plan is for Linux workers; + * otherwise, <code>false</code>. + * + * @return the needLinuxWorkers value. + */ + public Boolean needLinuxWorkers() { + return this.innerProperties() == null ? null : this.innerProperties().needLinuxWorkers(); + } + + /** + * Set the needLinuxWorkers property: <code>true</code> if App Service plan is for Linux workers; + * otherwise, <code>false</code>. + * + * @param needLinuxWorkers the needLinuxWorkers value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withNeedLinuxWorkers(Boolean needLinuxWorkers) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withNeedLinuxWorkers(needLinuxWorkers); + return this; + } + + /** + * Get the isSpot property: <code>true</code> if App Service plan is for Spot instances; otherwise, + * <code>false</code>. + * + * @return the isSpot value. + */ + public Boolean isSpot() { + return this.innerProperties() == null ? null : this.innerProperties().isSpot(); + } + + /** + * Set the isSpot property: <code>true</code> if App Service plan is for Spot instances; otherwise, + * <code>false</code>. + * + * @param isSpot the isSpot value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withIsSpot(Boolean isSpot) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withIsSpot(isSpot); + return this; + } + + /** + * Get the capacity property: Target capacity of the App Service plan (number of VMs). + * + * @return the capacity value. + */ + public Integer capacity() { + return this.innerProperties() == null ? null : this.innerProperties().capacity(); + } + + /** + * Set the capacity property: Target capacity of the App Service plan (number of VMs). + * + * @param capacity the capacity value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withCapacity(Integer capacity) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withCapacity(capacity); + return this; + } + + /** + * Get the hostingEnvironment property: Name of App Service Environment where app or App Service plan should be + * created. + * + * @return the hostingEnvironment value. + */ + public String hostingEnvironment() { + return this.innerProperties() == null ? null : this.innerProperties().hostingEnvironment(); + } + + /** + * Set the hostingEnvironment property: Name of App Service Environment where app or App Service plan should be + * created. + * + * @param hostingEnvironment the hostingEnvironment value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withHostingEnvironment(String hostingEnvironment) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withHostingEnvironment(hostingEnvironment); + return this; + } + + /** + * Get the isXenon property: <code>true</code> if App Service plan is running as a windows container. + * + * @return the isXenon value. + */ + public Boolean isXenon() { + return this.innerProperties() == null ? null : this.innerProperties().isXenon(); + } + + /** + * Set the isXenon property: <code>true</code> if App Service plan is running as a windows container. + * + * @param isXenon the isXenon value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withIsXenon(Boolean isXenon) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withIsXenon(isXenon); + return this; + } + + /** + * Get the containerRegistryBaseUrl property: Base URL of the container registry. + * + * @return the containerRegistryBaseUrl value. + */ + public String containerRegistryBaseUrl() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistryBaseUrl(); + } + + /** + * Set the containerRegistryBaseUrl property: Base URL of the container registry. + * + * @param containerRegistryBaseUrl the containerRegistryBaseUrl value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerRegistryBaseUrl(String containerRegistryBaseUrl) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withContainerRegistryBaseUrl(containerRegistryBaseUrl); + return this; + } + + /** + * Get the containerRegistryUsername property: Username for to access the container registry. + * + * @return the containerRegistryUsername value. + */ + public String containerRegistryUsername() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistryUsername(); + } + + /** + * Set the containerRegistryUsername property: Username for to access the container registry. + * + * @param containerRegistryUsername the containerRegistryUsername value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerRegistryUsername(String containerRegistryUsername) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withContainerRegistryUsername(containerRegistryUsername); + return this; + } + + /** + * Get the containerRegistryPassword property: Password for to access the container registry. + * + * @return the containerRegistryPassword value. + */ + public String containerRegistryPassword() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistryPassword(); + } + + /** + * Set the containerRegistryPassword property: Password for to access the container registry. + * + * @param containerRegistryPassword the containerRegistryPassword value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerRegistryPassword(String containerRegistryPassword) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withContainerRegistryPassword(containerRegistryPassword); + return this; + } + + /** + * Get the containerImageRepository property: Repository name (image name). + * + * @return the containerImageRepository value. + */ + public String containerImageRepository() { + return this.innerProperties() == null ? null : this.innerProperties().containerImageRepository(); + } + + /** + * Set the containerImageRepository property: Repository name (image name). + * + * @param containerImageRepository the containerImageRepository value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerImageRepository(String containerImageRepository) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withContainerImageRepository(containerImageRepository); + return this; + } + + /** + * Get the containerImageTag property: Image tag. + * + * @return the containerImageTag value. + */ + public String containerImageTag() { + return this.innerProperties() == null ? null : this.innerProperties().containerImageTag(); + } + + /** + * Set the containerImageTag property: Image tag. + * + * @param containerImageTag the containerImageTag value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerImageTag(String containerImageTag) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withContainerImageTag(containerImageTag); + return this; + } + + /** + * Get the containerImagePlatform property: Platform (windows or linux). + * + * @return the containerImagePlatform value. + */ + public String containerImagePlatform() { + return this.innerProperties() == null ? null : this.innerProperties().containerImagePlatform(); + } + + /** + * Set the containerImagePlatform property: Platform (windows or linux). + * + * @param containerImagePlatform the containerImagePlatform value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withContainerImagePlatform(String containerImagePlatform) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withContainerImagePlatform(containerImagePlatform); + return this; + } + + /** + * Get the appServiceEnvironment property: App Service Environment Properties. + * + * @return the appServiceEnvironment value. + */ + public AppServiceEnvironment appServiceEnvironment() { + return this.innerProperties() == null ? null : this.innerProperties().appServiceEnvironment(); + } + + /** + * Set the appServiceEnvironment property: App Service Environment Properties. + * + * @param appServiceEnvironment the appServiceEnvironment value to set. + * @return the ValidateRequest object itself. + */ + public ValidateRequest withAppServiceEnvironment(AppServiceEnvironment appServiceEnvironment) { + if (this.innerProperties() == null) { + this.innerProperties = new ValidateProperties(); + } + this.innerProperties().withAppServiceEnvironment(appServiceEnvironment); + 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 ValidateRequest")); + } + if (type() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property type in model ValidateRequest")); + } + if (location() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property location in model ValidateRequest")); + } + if (innerProperties() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model ValidateRequest")); + } else { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResourceTypes.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResourceTypes.java new file mode 100644 index 0000000000000..7d714e20050f8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResourceTypes.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.appservice.generated.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ValidateResourceTypes. */ +public final class ValidateResourceTypes extends ExpandableStringEnum { + /** Static value ServerFarm for ValidateResourceTypes. */ + public static final ValidateResourceTypes SERVER_FARM = fromString("ServerFarm"); + + /** Static value Site for ValidateResourceTypes. */ + public static final ValidateResourceTypes SITE = fromString("Site"); + + /** Static value Microsoft.Web/hostingEnvironments for ValidateResourceTypes. */ + public static final ValidateResourceTypes MICROSOFT_WEB_HOSTING_ENVIRONMENTS = + fromString("Microsoft.Web/hostingEnvironments"); + + /** + * Creates or finds a ValidateResourceTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ValidateResourceTypes. + */ + @JsonCreator + public static ValidateResourceTypes fromString(String name) { + return fromString(name, ValidateResourceTypes.class); + } + + /** @return known ValidateResourceTypes values. */ + public static Collection values() { + return values(ValidateResourceTypes.class); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResponse.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResponse.java new file mode 100644 index 0000000000000..c91d1076c8eb0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResponse.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.ValidateResponseInner; + +/** An immutable client-side representation of ValidateResponse. */ +public interface ValidateResponse { + /** + * Gets the status property: Result of validation. + * + * @return the status value. + */ + String status(); + + /** + * Gets the error property: Error details for the case when validation fails. + * + * @return the error value. + */ + ValidateResponseError error(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.ValidateResponseInner object. + * + * @return the inner object. + */ + ValidateResponseInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResponseError.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResponseError.java new file mode 100644 index 0000000000000..ba3abe785124f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/ValidateResponseError.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Error details for when validation fails. */ +@Fluent +public final class ValidateResponseError { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ValidateResponseError.class); + + /* + * Validation error code. + */ + @JsonProperty(value = "code") + private String code; + + /* + * Validation error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the code property: Validation error code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: Validation error code. + * + * @param code the code value to set. + * @return the ValidateResponseError object itself. + */ + public ValidateResponseError withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: Validation error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Validation error message. + * + * @param message the message value to set. + * @return the ValidateResponseError object itself. + */ + public ValidateResponseError withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualApplication.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualApplication.java new file mode 100644 index 0000000000000..94359685058c3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualApplication.java @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Virtual application in an app. */ +@Fluent +public final class VirtualApplication { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualApplication.class); + + /* + * Virtual path. + */ + @JsonProperty(value = "virtualPath") + private String virtualPath; + + /* + * Physical path. + */ + @JsonProperty(value = "physicalPath") + private String physicalPath; + + /* + * true if preloading is enabled; otherwise, + * false. + */ + @JsonProperty(value = "preloadEnabled") + private Boolean preloadEnabled; + + /* + * Virtual directories for virtual application. + */ + @JsonProperty(value = "virtualDirectories") + private List virtualDirectories; + + /** + * Get the virtualPath property: Virtual path. + * + * @return the virtualPath value. + */ + public String virtualPath() { + return this.virtualPath; + } + + /** + * Set the virtualPath property: Virtual path. + * + * @param virtualPath the virtualPath value to set. + * @return the VirtualApplication object itself. + */ + public VirtualApplication withVirtualPath(String virtualPath) { + this.virtualPath = virtualPath; + return this; + } + + /** + * Get the physicalPath property: Physical path. + * + * @return the physicalPath value. + */ + public String physicalPath() { + return this.physicalPath; + } + + /** + * Set the physicalPath property: Physical path. + * + * @param physicalPath the physicalPath value to set. + * @return the VirtualApplication object itself. + */ + public VirtualApplication withPhysicalPath(String physicalPath) { + this.physicalPath = physicalPath; + return this; + } + + /** + * Get the preloadEnabled property: <code>true</code> if preloading is enabled; otherwise, + * <code>false</code>. + * + * @return the preloadEnabled value. + */ + public Boolean preloadEnabled() { + return this.preloadEnabled; + } + + /** + * Set the preloadEnabled property: <code>true</code> if preloading is enabled; otherwise, + * <code>false</code>. + * + * @param preloadEnabled the preloadEnabled value to set. + * @return the VirtualApplication object itself. + */ + public VirtualApplication withPreloadEnabled(Boolean preloadEnabled) { + this.preloadEnabled = preloadEnabled; + return this; + } + + /** + * Get the virtualDirectories property: Virtual directories for virtual application. + * + * @return the virtualDirectories value. + */ + public List virtualDirectories() { + return this.virtualDirectories; + } + + /** + * Set the virtualDirectories property: Virtual directories for virtual application. + * + * @param virtualDirectories the virtualDirectories value to set. + * @return the VirtualApplication object itself. + */ + public VirtualApplication withVirtualDirectories(List virtualDirectories) { + this.virtualDirectories = virtualDirectories; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (virtualDirectories() != null) { + virtualDirectories().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualDirectory.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualDirectory.java new file mode 100644 index 0000000000000..65b2ca649739a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualDirectory.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Directory for virtual application. */ +@Fluent +public final class VirtualDirectory { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualDirectory.class); + + /* + * Path to virtual application. + */ + @JsonProperty(value = "virtualPath") + private String virtualPath; + + /* + * Physical path. + */ + @JsonProperty(value = "physicalPath") + private String physicalPath; + + /** + * Get the virtualPath property: Path to virtual application. + * + * @return the virtualPath value. + */ + public String virtualPath() { + return this.virtualPath; + } + + /** + * Set the virtualPath property: Path to virtual application. + * + * @param virtualPath the virtualPath value to set. + * @return the VirtualDirectory object itself. + */ + public VirtualDirectory withVirtualPath(String virtualPath) { + this.virtualPath = virtualPath; + return this; + } + + /** + * Get the physicalPath property: Physical path. + * + * @return the physicalPath value. + */ + public String physicalPath() { + return this.physicalPath; + } + + /** + * Set the physicalPath property: Physical path. + * + * @param physicalPath the physicalPath value to set. + * @return the VirtualDirectory object itself. + */ + public VirtualDirectory withPhysicalPath(String physicalPath) { + this.physicalPath = physicalPath; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualIpMapping.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualIpMapping.java new file mode 100644 index 0000000000000..dcf33d1644e89 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualIpMapping.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Virtual IP mapping. */ +@Fluent +public final class VirtualIpMapping { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualIpMapping.class); + + /* + * Virtual IP address. + */ + @JsonProperty(value = "virtualIP") + private String virtualIp; + + /* + * Internal HTTP port. + */ + @JsonProperty(value = "internalHttpPort") + private Integer internalHttpPort; + + /* + * Internal HTTPS port. + */ + @JsonProperty(value = "internalHttpsPort") + private Integer internalHttpsPort; + + /* + * Is virtual IP mapping in use. + */ + @JsonProperty(value = "inUse") + private Boolean inUse; + + /* + * name of the service that virtual IP is assigned to + */ + @JsonProperty(value = "serviceName") + private String serviceName; + + /** + * Get the virtualIp property: Virtual IP address. + * + * @return the virtualIp value. + */ + public String virtualIp() { + return this.virtualIp; + } + + /** + * Set the virtualIp property: Virtual IP address. + * + * @param virtualIp the virtualIp value to set. + * @return the VirtualIpMapping object itself. + */ + public VirtualIpMapping withVirtualIp(String virtualIp) { + this.virtualIp = virtualIp; + return this; + } + + /** + * Get the internalHttpPort property: Internal HTTP port. + * + * @return the internalHttpPort value. + */ + public Integer internalHttpPort() { + return this.internalHttpPort; + } + + /** + * Set the internalHttpPort property: Internal HTTP port. + * + * @param internalHttpPort the internalHttpPort value to set. + * @return the VirtualIpMapping object itself. + */ + public VirtualIpMapping withInternalHttpPort(Integer internalHttpPort) { + this.internalHttpPort = internalHttpPort; + return this; + } + + /** + * Get the internalHttpsPort property: Internal HTTPS port. + * + * @return the internalHttpsPort value. + */ + public Integer internalHttpsPort() { + return this.internalHttpsPort; + } + + /** + * Set the internalHttpsPort property: Internal HTTPS port. + * + * @param internalHttpsPort the internalHttpsPort value to set. + * @return the VirtualIpMapping object itself. + */ + public VirtualIpMapping withInternalHttpsPort(Integer internalHttpsPort) { + this.internalHttpsPort = internalHttpsPort; + return this; + } + + /** + * Get the inUse property: Is virtual IP mapping in use. + * + * @return the inUse value. + */ + public Boolean inUse() { + return this.inUse; + } + + /** + * Set the inUse property: Is virtual IP mapping in use. + * + * @param inUse the inUse value to set. + * @return the VirtualIpMapping object itself. + */ + public VirtualIpMapping withInUse(Boolean inUse) { + this.inUse = inUse; + return this; + } + + /** + * Get the serviceName property: name of the service that virtual IP is assigned to. + * + * @return the serviceName value. + */ + public String serviceName() { + return this.serviceName; + } + + /** + * Set the serviceName property: name of the service that virtual IP is assigned to. + * + * @param serviceName the serviceName value to set. + * @return the VirtualIpMapping object itself. + */ + public VirtualIpMapping withServiceName(String serviceName) { + this.serviceName = serviceName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualNetworkProfile.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualNetworkProfile.java new file mode 100644 index 0000000000000..d0fa2c917fce3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VirtualNetworkProfile.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.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Specification for using a Virtual Network. */ +@Fluent +public final class VirtualNetworkProfile { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VirtualNetworkProfile.class); + + /* + * Resource id of the Virtual Network. + */ + @JsonProperty(value = "id", required = true) + private String id; + + /* + * Name of the Virtual Network (read-only). + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Resource type of the Virtual Network (read-only). + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Subnet within the Virtual Network. + */ + @JsonProperty(value = "subnet") + private String subnet; + + /** + * Get the id property: Resource id of the Virtual Network. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Resource id of the Virtual Network. + * + * @param id the id value to set. + * @return the VirtualNetworkProfile object itself. + */ + public VirtualNetworkProfile withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of the Virtual Network (read-only). + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the type property: Resource type of the Virtual Network (read-only). + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the subnet property: Subnet within the Virtual Network. + * + * @return the subnet value. + */ + public String subnet() { + return this.subnet; + } + + /** + * Set the subnet property: Subnet within the Virtual Network. + * + * @param subnet the subnet value to set. + * @return the VirtualNetworkProfile object itself. + */ + public VirtualNetworkProfile withSubnet(String subnet) { + this.subnet = subnet; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (id() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property id in model VirtualNetworkProfile")); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetGateway.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetGateway.java new file mode 100644 index 0000000000000..17de6f0dfdab1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetGateway.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; + +/** An immutable client-side representation of VnetGateway. */ +public interface VnetGateway { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the vnetName property: The Virtual Network name. + * + * @return the vnetName value. + */ + String vnetName(); + + /** + * Gets the vpnPackageUri property: The URI where the VPN package can be downloaded. + * + * @return the vpnPackageUri value. + */ + String vpnPackageUri(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner object. + * + * @return the inner object. + */ + VnetGatewayInner innerModel(); + + /** The entirety of the VnetGateway definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The VnetGateway definition stages. */ + interface DefinitionStages { + /** The first stage of the VnetGateway definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the VnetGateway definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name, vnetName, slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update a gateway + * for the production slot's Virtual Network. + * @return the next definition stage. + */ + WithCreate withExistingVirtualNetworkConnection( + String resourceGroupName, String name, String vnetName, String slot); + } + /** + * The stage of the VnetGateway 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.WithKind, DefinitionStages.WithVnetName, DefinitionStages.WithVpnPackageUri { + /** + * Executes the create request. + * + * @return the created resource. + */ + VnetGateway create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VnetGateway create(Context context); + } + /** The stage of the VnetGateway definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the VnetGateway definition allowing to specify vnetName. */ + interface WithVnetName { + /** + * Specifies the vnetName property: The Virtual Network name.. + * + * @param vnetName The Virtual Network name. + * @return the next definition stage. + */ + WithCreate withVnetName(String vnetName); + } + /** The stage of the VnetGateway definition allowing to specify vpnPackageUri. */ + interface WithVpnPackageUri { + /** + * Specifies the vpnPackageUri property: The URI where the VPN package can be downloaded.. + * + * @param vpnPackageUri The URI where the VPN package can be downloaded. + * @return the next definition stage. + */ + WithCreate withVpnPackageUri(String vpnPackageUri); + } + } + /** + * Begins update for the VnetGateway resource. + * + * @return the stage of resource update. + */ + VnetGateway.Update update(); + + /** The template for VnetGateway update. */ + interface Update extends UpdateStages.WithKind, UpdateStages.WithVpnPackageUri { + /** + * Executes the update request. + * + * @return the updated resource. + */ + VnetGateway apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + VnetGateway apply(Context context); + } + /** The VnetGateway update stages. */ + interface UpdateStages { + /** The stage of the VnetGateway update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the VnetGateway update allowing to specify vpnPackageUri. */ + interface WithVpnPackageUri { + /** + * Specifies the vpnPackageUri property: The URI where the VPN package can be downloaded.. + * + * @param vpnPackageUri The URI where the VPN package can be downloaded. + * @return the next definition stage. + */ + Update withVpnPackageUri(String vpnPackageUri); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + VnetGateway refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + VnetGateway refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetInfoResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetInfoResource.java new file mode 100644 index 0000000000000..15d5ffc07ca79 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetInfoResource.java @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import java.util.List; + +/** An immutable client-side representation of VnetInfoResource. */ +public interface VnetInfoResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the vnetResourceId property: The Virtual Network's resource ID. + * + * @return the vnetResourceId value. + */ + String vnetResourceId(); + + /** + * Gets the certThumbprint property: The client certificate thumbprint. + * + * @return the certThumbprint value. + */ + String certThumbprint(); + + /** + * Gets the certBlob property: A certificate file (.cer) blob containing the public key of the private key used to + * authenticate a Point-To-Site VPN connection. + * + * @return the certBlob value. + */ + String certBlob(); + + /** + * Gets the routes property: The routes that this Virtual Network connection uses. + * + * @return the routes value. + */ + List routes(); + + /** + * Gets the resyncRequired property: <code>true</code> if a resync is required; otherwise, + * <code>false</code>. + * + * @return the resyncRequired value. + */ + Boolean resyncRequired(); + + /** + * Gets the dnsServers property: DNS servers to be used by this Virtual Network. This should be a comma-separated + * list of IP addresses. + * + * @return the dnsServers value. + */ + String dnsServers(); + + /** + * Gets the isSwift property: Flag that is used to denote if this is VNET injection. + * + * @return the isSwift value. + */ + Boolean isSwift(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner object. + * + * @return the inner object. + */ + VnetInfoResourceInner innerModel(); + + /** The entirety of the VnetInfoResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The VnetInfoResource definition stages. */ + interface DefinitionStages { + /** The first stage of the VnetInfoResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the VnetInfoResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name, slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update + * connections for the production slot. + * @return the next definition stage. + */ + WithCreate withExistingSlot(String resourceGroupName, String name, String slot); + } + /** + * The stage of the VnetInfoResource 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.WithKind, + DefinitionStages.WithVnetResourceId, + DefinitionStages.WithCertBlob, + DefinitionStages.WithDnsServers, + DefinitionStages.WithIsSwift { + /** + * Executes the create request. + * + * @return the created resource. + */ + VnetInfoResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VnetInfoResource create(Context context); + } + /** The stage of the VnetInfoResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the VnetInfoResource definition allowing to specify vnetResourceId. */ + interface WithVnetResourceId { + /** + * Specifies the vnetResourceId property: The Virtual Network's resource ID.. + * + * @param vnetResourceId The Virtual Network's resource ID. + * @return the next definition stage. + */ + WithCreate withVnetResourceId(String vnetResourceId); + } + /** The stage of the VnetInfoResource definition allowing to specify certBlob. */ + interface WithCertBlob { + /** + * Specifies the certBlob property: A certificate file (.cer) blob containing the public key of the private + * key used to authenticate a Point-To-Site VPN connection.. + * + * @param certBlob A certificate file (.cer) blob containing the public key of the private key used to + * authenticate a Point-To-Site VPN connection. + * @return the next definition stage. + */ + WithCreate withCertBlob(String certBlob); + } + /** The stage of the VnetInfoResource definition allowing to specify dnsServers. */ + interface WithDnsServers { + /** + * Specifies the dnsServers property: DNS servers to be used by this Virtual Network. This should be a + * comma-separated list of IP addresses.. + * + * @param dnsServers DNS servers to be used by this Virtual Network. This should be a comma-separated list + * of IP addresses. + * @return the next definition stage. + */ + WithCreate withDnsServers(String dnsServers); + } + /** The stage of the VnetInfoResource definition allowing to specify isSwift. */ + interface WithIsSwift { + /** + * Specifies the isSwift property: Flag that is used to denote if this is VNET injection. + * + * @param isSwift Flag that is used to denote if this is VNET injection. + * @return the next definition stage. + */ + WithCreate withIsSwift(Boolean isSwift); + } + } + /** + * Begins update for the VnetInfoResource resource. + * + * @return the stage of resource update. + */ + VnetInfoResource.Update update(); + + /** The template for VnetInfoResource update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithVnetResourceId, + UpdateStages.WithCertBlob, + UpdateStages.WithDnsServers, + UpdateStages.WithIsSwift { + /** + * Executes the update request. + * + * @return the updated resource. + */ + VnetInfoResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + VnetInfoResource apply(Context context); + } + /** The VnetInfoResource update stages. */ + interface UpdateStages { + /** The stage of the VnetInfoResource update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the VnetInfoResource update allowing to specify vnetResourceId. */ + interface WithVnetResourceId { + /** + * Specifies the vnetResourceId property: The Virtual Network's resource ID.. + * + * @param vnetResourceId The Virtual Network's resource ID. + * @return the next definition stage. + */ + Update withVnetResourceId(String vnetResourceId); + } + /** The stage of the VnetInfoResource update allowing to specify certBlob. */ + interface WithCertBlob { + /** + * Specifies the certBlob property: A certificate file (.cer) blob containing the public key of the private + * key used to authenticate a Point-To-Site VPN connection.. + * + * @param certBlob A certificate file (.cer) blob containing the public key of the private key used to + * authenticate a Point-To-Site VPN connection. + * @return the next definition stage. + */ + Update withCertBlob(String certBlob); + } + /** The stage of the VnetInfoResource update allowing to specify dnsServers. */ + interface WithDnsServers { + /** + * Specifies the dnsServers property: DNS servers to be used by this Virtual Network. This should be a + * comma-separated list of IP addresses.. + * + * @param dnsServers DNS servers to be used by this Virtual Network. This should be a comma-separated list + * of IP addresses. + * @return the next definition stage. + */ + Update withDnsServers(String dnsServers); + } + /** The stage of the VnetInfoResource update allowing to specify isSwift. */ + interface WithIsSwift { + /** + * Specifies the isSwift property: Flag that is used to denote if this is VNET injection. + * + * @param isSwift Flag that is used to denote if this is VNET injection. + * @return the next definition stage. + */ + Update withIsSwift(Boolean isSwift); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + VnetInfoResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + VnetInfoResource refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetParameters.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetParameters.java new file mode 100644 index 0000000000000..b9ddb04edc693 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetParameters.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetParametersProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The required set of inputs to validate a VNET. */ +@Fluent +public final class VnetParameters extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetParameters.class); + + /* + * VnetParameters resource specific properties + */ + @JsonProperty(value = "properties") + private VnetParametersProperties innerProperties; + + /** + * Get the innerProperties property: VnetParameters resource specific properties. + * + * @return the innerProperties value. + */ + private VnetParametersProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public VnetParameters withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the vnetResourceGroup property: The Resource Group of the VNET to be validated. + * + * @return the vnetResourceGroup value. + */ + public String vnetResourceGroup() { + return this.innerProperties() == null ? null : this.innerProperties().vnetResourceGroup(); + } + + /** + * Set the vnetResourceGroup property: The Resource Group of the VNET to be validated. + * + * @param vnetResourceGroup the vnetResourceGroup value to set. + * @return the VnetParameters object itself. + */ + public VnetParameters withVnetResourceGroup(String vnetResourceGroup) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetParametersProperties(); + } + this.innerProperties().withVnetResourceGroup(vnetResourceGroup); + return this; + } + + /** + * Get the vnetName property: The name of the VNET to be validated. + * + * @return the vnetName value. + */ + public String vnetName() { + return this.innerProperties() == null ? null : this.innerProperties().vnetName(); + } + + /** + * Set the vnetName property: The name of the VNET to be validated. + * + * @param vnetName the vnetName value to set. + * @return the VnetParameters object itself. + */ + public VnetParameters withVnetName(String vnetName) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetParametersProperties(); + } + this.innerProperties().withVnetName(vnetName); + return this; + } + + /** + * Get the vnetSubnetName property: The subnet name to be validated. + * + * @return the vnetSubnetName value. + */ + public String vnetSubnetName() { + return this.innerProperties() == null ? null : this.innerProperties().vnetSubnetName(); + } + + /** + * Set the vnetSubnetName property: The subnet name to be validated. + * + * @param vnetSubnetName the vnetSubnetName value to set. + * @return the VnetParameters object itself. + */ + public VnetParameters withVnetSubnetName(String vnetSubnetName) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetParametersProperties(); + } + this.innerProperties().withVnetSubnetName(vnetSubnetName); + return this; + } + + /** + * Get the subnetResourceId property: The ARM Resource ID of the subnet to validate. + * + * @return the subnetResourceId value. + */ + public String subnetResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().subnetResourceId(); + } + + /** + * Set the subnetResourceId property: The ARM Resource ID of the subnet to validate. + * + * @param subnetResourceId the subnetResourceId value to set. + * @return the VnetParameters object itself. + */ + public VnetParameters withSubnetResourceId(String subnetResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetParametersProperties(); + } + this.innerProperties().withSubnetResourceId(subnetResourceId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetRoute.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetRoute.java new file mode 100644 index 0000000000000..9d1352bf28468 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetRoute.java @@ -0,0 +1,253 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetRouteInner; + +/** An immutable client-side representation of VnetRoute. */ +public interface VnetRoute { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the startAddress property: The starting address for this route. This may also include a CIDR notation, in + * which case the end address must not be specified. + * + * @return the startAddress value. + */ + String startAddress(); + + /** + * Gets the endAddress property: The ending address for this route. If the start address is specified in CIDR + * notation, this must be omitted. + * + * @return the endAddress value. + */ + String endAddress(); + + /** + * Gets the routeType property: The type of route this is: DEFAULT - By default, every app has routes to the local + * address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes STATIC - + * Static route set on the app only + * + *

These values will be used for syncing an app's routes with those from a Virtual Network. + * + * @return the routeType value. + */ + RouteType routeType(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.VnetRouteInner object. + * + * @return the inner object. + */ + VnetRouteInner innerModel(); + + /** The entirety of the VnetRoute definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The VnetRoute definition stages. */ + interface DefinitionStages { + /** The first stage of the VnetRoute definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the VnetRoute definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name, vnetName. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service plan. + * @param vnetName Name of the Virtual Network. + * @return the next definition stage. + */ + WithCreate withExistingVirtualNetworkConnection(String resourceGroupName, String name, String vnetName); + } + /** + * The stage of the VnetRoute 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.WithKind, + DefinitionStages.WithStartAddress, + DefinitionStages.WithEndAddress, + DefinitionStages.WithRouteType { + /** + * Executes the create request. + * + * @return the created resource. + */ + VnetRoute create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + VnetRoute create(Context context); + } + /** The stage of the VnetRoute definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the VnetRoute definition allowing to specify startAddress. */ + interface WithStartAddress { + /** + * Specifies the startAddress property: The starting address for this route. This may also include a CIDR + * notation, in which case the end address must not be specified.. + * + * @param startAddress The starting address for this route. This may also include a CIDR notation, in which + * case the end address must not be specified. + * @return the next definition stage. + */ + WithCreate withStartAddress(String startAddress); + } + /** The stage of the VnetRoute definition allowing to specify endAddress. */ + interface WithEndAddress { + /** + * Specifies the endAddress property: The ending address for this route. If the start address is specified + * in CIDR notation, this must be omitted.. + * + * @param endAddress The ending address for this route. If the start address is specified in CIDR notation, + * this must be omitted. + * @return the next definition stage. + */ + WithCreate withEndAddress(String endAddress); + } + /** The stage of the VnetRoute definition allowing to specify routeType. */ + interface WithRouteType { + /** + * Specifies the routeType property: The type of route this is: DEFAULT - By default, every app has routes + * to the local address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual + * Network routes STATIC - Static route set on the app only + * + *

These values will be used for syncing an app's routes with those from a Virtual Network.. + * + * @param routeType The type of route this is: DEFAULT - By default, every app has routes to the local + * address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes + * STATIC - Static route set on the app only + *

These values will be used for syncing an app's routes with those from a Virtual Network. + * @return the next definition stage. + */ + WithCreate withRouteType(RouteType routeType); + } + } + /** + * Begins update for the VnetRoute resource. + * + * @return the stage of resource update. + */ + VnetRoute.Update update(); + + /** The template for VnetRoute update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithStartAddress, + UpdateStages.WithEndAddress, + UpdateStages.WithRouteType { + /** + * Executes the update request. + * + * @return the updated resource. + */ + VnetRoute apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + VnetRoute apply(Context context); + } + /** The VnetRoute update stages. */ + interface UpdateStages { + /** The stage of the VnetRoute update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the VnetRoute update allowing to specify startAddress. */ + interface WithStartAddress { + /** + * Specifies the startAddress property: The starting address for this route. This may also include a CIDR + * notation, in which case the end address must not be specified.. + * + * @param startAddress The starting address for this route. This may also include a CIDR notation, in which + * case the end address must not be specified. + * @return the next definition stage. + */ + Update withStartAddress(String startAddress); + } + /** The stage of the VnetRoute update allowing to specify endAddress. */ + interface WithEndAddress { + /** + * Specifies the endAddress property: The ending address for this route. If the start address is specified + * in CIDR notation, this must be omitted.. + * + * @param endAddress The ending address for this route. If the start address is specified in CIDR notation, + * this must be omitted. + * @return the next definition stage. + */ + Update withEndAddress(String endAddress); + } + /** The stage of the VnetRoute update allowing to specify routeType. */ + interface WithRouteType { + /** + * Specifies the routeType property: The type of route this is: DEFAULT - By default, every app has routes + * to the local address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual + * Network routes STATIC - Static route set on the app only + * + *

These values will be used for syncing an app's routes with those from a Virtual Network.. + * + * @param routeType The type of route this is: DEFAULT - By default, every app has routes to the local + * address ranges specified by RFC1918 INHERITED - Routes inherited from the real Virtual Network routes + * STATIC - Static route set on the app only + *

These values will be used for syncing an app's routes with those from a Virtual Network. + * @return the next definition stage. + */ + Update withRouteType(RouteType routeType); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetValidationFailureDetails.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetValidationFailureDetails.java new file mode 100644 index 0000000000000..11bf89dbe9555 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetValidationFailureDetails.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetValidationFailureDetailsInner; +import java.util.List; + +/** An immutable client-side representation of VnetValidationFailureDetails. */ +public interface VnetValidationFailureDetails { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the message property: Text describing the validation outcome. + * + * @return the message value. + */ + String message(); + + /** + * Gets the failed property: A flag describing whether or not validation failed. + * + * @return the failed value. + */ + Boolean failed(); + + /** + * Gets the failedTests property: A list of tests that failed in the validation. + * + * @return the failedTests value. + */ + List failedTests(); + + /** + * Gets the warnings property: A list of warnings generated during validation. + * + * @return the warnings value. + */ + List warnings(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.VnetValidationFailureDetailsInner + * object. + * + * @return the inner object. + */ + VnetValidationFailureDetailsInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetValidationTestFailure.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetValidationTestFailure.java new file mode 100644 index 0000000000000..9f3839b665e21 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/VnetValidationTestFailure.java @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetValidationTestFailureProperties; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A class that describes a test that failed during NSG and UDR validation. */ +@Fluent +public final class VnetValidationTestFailure extends ProxyOnlyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(VnetValidationTestFailure.class); + + /* + * VnetValidationTestFailure resource specific properties + */ + @JsonProperty(value = "properties") + private VnetValidationTestFailureProperties innerProperties; + + /** + * Get the innerProperties property: VnetValidationTestFailure resource specific properties. + * + * @return the innerProperties value. + */ + private VnetValidationTestFailureProperties innerProperties() { + return this.innerProperties; + } + + /** {@inheritDoc} */ + @Override + public VnetValidationTestFailure withKind(String kind) { + super.withKind(kind); + return this; + } + + /** + * Get the testName property: The name of the test that failed. + * + * @return the testName value. + */ + public String testName() { + return this.innerProperties() == null ? null : this.innerProperties().testName(); + } + + /** + * Set the testName property: The name of the test that failed. + * + * @param testName the testName value to set. + * @return the VnetValidationTestFailure object itself. + */ + public VnetValidationTestFailure withTestName(String testName) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetValidationTestFailureProperties(); + } + this.innerProperties().withTestName(testName); + return this; + } + + /** + * Get the details property: The details of what caused the failure, e.g. the blocking rule name, etc. + * + * @return the details value. + */ + public String details() { + return this.innerProperties() == null ? null : this.innerProperties().details(); + } + + /** + * Set the details property: The details of what caused the failure, e.g. the blocking rule name, etc. + * + * @param details the details value to set. + * @return the VnetValidationTestFailure object itself. + */ + public VnetValidationTestFailure withDetails(String details) { + if (this.innerProperties() == null) { + this.innerProperties = new VnetValidationTestFailureProperties(); + } + this.innerProperties().withDetails(details); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppCollection.java new file mode 100644 index 0000000000000..db1b1e00233f3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of App Service apps. */ +@Fluent +public final class WebAppCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppCollection.class); + + /* + * 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; + + /** + * 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 WebAppCollection object itself. + */ + public WebAppCollection 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 WebAppCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppInstanceStatusCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppInstanceStatusCollection.java new file mode 100644 index 0000000000000..8343ecd5fc31c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppInstanceStatusCollection.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebSiteInstanceStatusInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of app instances. */ +@Fluent +public final class WebAppInstanceStatusCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppInstanceStatusCollection.class); + + /* + * 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; + + /** + * 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 WebAppInstanceStatusCollection object itself. + */ + public WebAppInstanceStatusCollection 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 WebAppInstanceStatusCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppMajorVersion.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppMajorVersion.java new file mode 100644 index 0000000000000..afaf23d7f1dc0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppMajorVersion.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Web App stack major version. */ +@Immutable +public final class WebAppMajorVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppMajorVersion.class); + + /* + * Web App stack major version (display only). + */ + @JsonProperty(value = "displayText", access = JsonProperty.Access.WRITE_ONLY) + private String displayText; + + /* + * Web App stack major version name. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /* + * Minor versions associated with the major version. + */ + @JsonProperty(value = "minorVersions", access = JsonProperty.Access.WRITE_ONLY) + private List minorVersions; + + /** + * Get the displayText property: Web App stack major version (display only). + * + * @return the displayText value. + */ + public String displayText() { + return this.displayText; + } + + /** + * Get the value property: Web App stack major version name. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Get the minorVersions property: Minor versions associated with the major version. + * + * @return the minorVersions value. + */ + public List minorVersions() { + return this.minorVersions; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (minorVersions() != null) { + minorVersions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppMinorVersion.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppMinorVersion.java new file mode 100644 index 0000000000000..245dd1c8b6d11 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppMinorVersion.java @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Web App stack minor version. */ +@Immutable +public final class WebAppMinorVersion { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppMinorVersion.class); + + /* + * Web App stack minor version (display only). + */ + @JsonProperty(value = "displayText", access = JsonProperty.Access.WRITE_ONLY) + private String displayText; + + /* + * Web App stack major version name. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /* + * Settings associated with the minor version. + */ + @JsonProperty(value = "stackSettings", access = JsonProperty.Access.WRITE_ONLY) + private WebAppRuntimes stackSettings; + + /** + * Get the displayText property: Web App stack minor version (display only). + * + * @return the displayText value. + */ + public String displayText() { + return this.displayText; + } + + /** + * Get the value property: Web App stack major version name. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Get the stackSettings property: Settings associated with the minor version. + * + * @return the stackSettings value. + */ + public WebAppRuntimes stackSettings() { + return this.stackSettings; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (stackSettings() != null) { + stackSettings().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppRuntimeSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppRuntimeSettings.java new file mode 100644 index 0000000000000..e4010b32a23a9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppRuntimeSettings.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Web App runtime settings. */ +@Immutable +public final class WebAppRuntimeSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppRuntimeSettings.class); + + /* + * Web App stack minor version (runtime only). + */ + @JsonProperty(value = "runtimeVersion", access = JsonProperty.Access.WRITE_ONLY) + private String runtimeVersion; + + /* + * true if remote debugging is supported for the stack; + * otherwise, false. + */ + @JsonProperty(value = "remoteDebuggingSupported", access = JsonProperty.Access.WRITE_ONLY) + private Boolean remoteDebuggingSupported; + + /* + * Application Insights settings associated with the minor version. + */ + @JsonProperty(value = "appInsightsSettings", access = JsonProperty.Access.WRITE_ONLY) + private AppInsightsWebAppStackSettings appInsightsSettings; + + /* + * GitHub Actions settings associated with the minor version. + */ + @JsonProperty(value = "gitHubActionSettings", access = JsonProperty.Access.WRITE_ONLY) + private GitHubActionWebAppStackSettings gitHubActionSettings; + + /* + * true if the stack is in preview; otherwise, + * false. + */ + @JsonProperty(value = "isPreview", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPreview; + + /* + * true if the stack is deprecated; otherwise, + * false. + */ + @JsonProperty(value = "isDeprecated", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDeprecated; + + /* + * true if the stack should be hidden; otherwise, + * false. + */ + @JsonProperty(value = "isHidden", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isHidden; + + /* + * End-of-life date for the minor version. + */ + @JsonProperty(value = "endOfLifeDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endOfLifeDate; + + /* + * true if the stack version is auto-updated; otherwise, + * false. + */ + @JsonProperty(value = "isAutoUpdate", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isAutoUpdate; + + /* + * true if the minor version is early-access; otherwise, + * false. + */ + @JsonProperty(value = "isEarlyAccess", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEarlyAccess; + + /** + * Get the runtimeVersion property: Web App stack minor version (runtime only). + * + * @return the runtimeVersion value. + */ + public String runtimeVersion() { + return this.runtimeVersion; + } + + /** + * Get the remoteDebuggingSupported property: <code>true</code> if remote debugging is supported for the + * stack; otherwise, <code>false</code>. + * + * @return the remoteDebuggingSupported value. + */ + public Boolean remoteDebuggingSupported() { + return this.remoteDebuggingSupported; + } + + /** + * Get the appInsightsSettings property: Application Insights settings associated with the minor version. + * + * @return the appInsightsSettings value. + */ + public AppInsightsWebAppStackSettings appInsightsSettings() { + return this.appInsightsSettings; + } + + /** + * Get the gitHubActionSettings property: GitHub Actions settings associated with the minor version. + * + * @return the gitHubActionSettings value. + */ + public GitHubActionWebAppStackSettings gitHubActionSettings() { + return this.gitHubActionSettings; + } + + /** + * Get the isPreview property: <code>true</code> if the stack is in preview; otherwise, + * <code>false</code>. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Get the isDeprecated property: <code>true</code> if the stack is deprecated; otherwise, + * <code>false</code>. + * + * @return the isDeprecated value. + */ + public Boolean isDeprecated() { + return this.isDeprecated; + } + + /** + * Get the isHidden property: <code>true</code> if the stack should be hidden; otherwise, + * <code>false</code>. + * + * @return the isHidden value. + */ + public Boolean isHidden() { + return this.isHidden; + } + + /** + * Get the endOfLifeDate property: End-of-life date for the minor version. + * + * @return the endOfLifeDate value. + */ + public OffsetDateTime endOfLifeDate() { + return this.endOfLifeDate; + } + + /** + * Get the isAutoUpdate property: <code>true</code> if the stack version is auto-updated; otherwise, + * <code>false</code>. + * + * @return the isAutoUpdate value. + */ + public Boolean isAutoUpdate() { + return this.isAutoUpdate; + } + + /** + * Get the isEarlyAccess property: <code>true</code> if the minor version is early-access; otherwise, + * <code>false</code>. + * + * @return the isEarlyAccess value. + */ + public Boolean isEarlyAccess() { + return this.isEarlyAccess; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (appInsightsSettings() != null) { + appInsightsSettings().validate(); + } + if (gitHubActionSettings() != null) { + gitHubActionSettings().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppRuntimes.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppRuntimes.java new file mode 100644 index 0000000000000..8198715a24829 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppRuntimes.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Web App stack runtimes. */ +@Immutable +public final class WebAppRuntimes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppRuntimes.class); + + /* + * Linux-specific settings associated with the minor version. + */ + @JsonProperty(value = "linuxRuntimeSettings", access = JsonProperty.Access.WRITE_ONLY) + private WebAppRuntimeSettings linuxRuntimeSettings; + + /* + * Windows-specific settings associated with the minor version. + */ + @JsonProperty(value = "windowsRuntimeSettings", access = JsonProperty.Access.WRITE_ONLY) + private WebAppRuntimeSettings windowsRuntimeSettings; + + /* + * Linux-specific settings associated with the Java container minor + * version. + */ + @JsonProperty(value = "linuxContainerSettings", access = JsonProperty.Access.WRITE_ONLY) + private LinuxJavaContainerSettings linuxContainerSettings; + + /* + * Windows-specific settings associated with the Java container minor + * version. + */ + @JsonProperty(value = "windowsContainerSettings", access = JsonProperty.Access.WRITE_ONLY) + private WindowsJavaContainerSettings windowsContainerSettings; + + /** + * Get the linuxRuntimeSettings property: Linux-specific settings associated with the minor version. + * + * @return the linuxRuntimeSettings value. + */ + public WebAppRuntimeSettings linuxRuntimeSettings() { + return this.linuxRuntimeSettings; + } + + /** + * Get the windowsRuntimeSettings property: Windows-specific settings associated with the minor version. + * + * @return the windowsRuntimeSettings value. + */ + public WebAppRuntimeSettings windowsRuntimeSettings() { + return this.windowsRuntimeSettings; + } + + /** + * Get the linuxContainerSettings property: Linux-specific settings associated with the Java container minor + * version. + * + * @return the linuxContainerSettings value. + */ + public LinuxJavaContainerSettings linuxContainerSettings() { + return this.linuxContainerSettings; + } + + /** + * Get the windowsContainerSettings property: Windows-specific settings associated with the Java container minor + * version. + * + * @return the windowsContainerSettings value. + */ + public WindowsJavaContainerSettings windowsContainerSettings() { + return this.windowsContainerSettings; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (linuxRuntimeSettings() != null) { + linuxRuntimeSettings().validate(); + } + if (windowsRuntimeSettings() != null) { + windowsRuntimeSettings().validate(); + } + if (linuxContainerSettings() != null) { + linuxContainerSettings().validate(); + } + if (windowsContainerSettings() != null) { + windowsContainerSettings().validate(); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppStack.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppStack.java new file mode 100644 index 0000000000000..80ccb18fabb8a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppStack.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.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.WebAppStackInner; +import java.util.List; + +/** An immutable client-side representation of WebAppStack. */ +public interface WebAppStack { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the location property: Web App stack location. + * + * @return the location value. + */ + String location(); + + /** + * Gets the displayText property: Web App stack (display only). + * + * @return the displayText value. + */ + String displayText(); + + /** + * Gets the value property: Web App stack name. + * + * @return the value value. + */ + String value(); + + /** + * Gets the majorVersions property: List of major versions available. + * + * @return the majorVersions value. + */ + List majorVersions(); + + /** + * Gets the preferredOs property: Web App stack preferred OS. + * + * @return the preferredOs value. + */ + StackPreferredOs preferredOs(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.WebAppStackInner object. + * + * @return the inner object. + */ + WebAppStackInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppStackCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppStackCollection.java new file mode 100644 index 0000000000000..ded7cb96842f6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebAppStackCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebAppStackInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Web app Stacks. */ +@Fluent +public final class WebAppStackCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebAppStackCollection.class); + + /* + * 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; + + /** + * 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 WebAppStackCollection object itself. + */ + public WebAppStackCollection 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 WebAppStackCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebApps.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebApps.java new file mode 100644 index 0000000000000..7c38e30d8ee70 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebApps.java @@ -0,0 +1,12533 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.StreamResponse; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.AzureStoragePropertyDictionaryResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.BackupRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.ConnectionStringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.DeploymentInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.FunctionEnvelopeInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HostnameBindingInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.HybridConnectionInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.IdentifierInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.KeyInfoInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PremierAddOnInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PrivateAccessInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PublicCertificateInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.PushSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RelayServiceConnectionEntityInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.RestoreRequestInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteAuthSettingsV2Inner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteConfigResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteLogsConfigInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SitePatchResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SiteSourceControlInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SlotConfigNamesResourceInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.SwiftVirtualNetworkInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetGatewayInner; +import com.azure.resourcemanager.appservice.generated.fluent.models.VnetInfoResourceInner; +import java.io.InputStream; +import java.util.List; + +/** Resource collection API of WebApps. */ +public interface WebApps { + /** + * Description for Get all apps for a subscription. + * + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable list(); + + /** + * Description for Get all apps for a subscription. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable list(Context context); + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Description for Gets all web, mobile, and API apps in the specified resource group. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param includeSlots Specify <strong>true</strong> to include deployment slots in results. The default + * is false, which only gives you the production slot of all apps. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Boolean includeSlots, Context context); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + Site getByResourceGroup(String resourceGroupName, String name); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 a web app, a mobile app backend, or an API app. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String name); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteWithResponse( + String resourceGroupName, String name, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Context context); + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + CustomHostnameAnalysisResult analyzeCustomHostname(String resourceGroupName, String name); + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param hostname Custom hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + Response analyzeCustomHostnameWithResponse( + String resourceGroupName, String name, String hostname, Context context); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response applySlotConfigToProductionWithResponse( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + BackupItem backup(String resourceGroupName, String name, BackupRequestInner request); + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + Response backupWithResponse( + String resourceGroupName, String name, BackupRequestInner request, Context context); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listBackups(String resourceGroupName, String name); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listBackups(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + BackupItem getBackupStatus(String resourceGroupName, String name, String backupId); + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + Response getBackupStatusWithResponse( + String resourceGroupName, String name, String backupId, Context context); + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteBackup(String resourceGroupName, String name, String backupId); + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteBackupWithResponse(String resourceGroupName, String name, String backupId, Context context); + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + BackupItem listBackupStatusSecrets( + String resourceGroupName, String name, String backupId, BackupRequestInner request); + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param request Information on backup request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + Response listBackupStatusSecretsWithResponse( + String resourceGroupName, String name, String backupId, BackupRequestInner request, Context context); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restore(String resourceGroupName, String name, String backupId, RestoreRequestInner request, Context context); + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + PagedIterable listBasicPublishingCredentialsPolicies( + String resourceGroupName, String name); + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + PagedIterable listBasicPublishingCredentialsPolicies( + String resourceGroupName, String name, Context context); + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + CsmPublishingCredentialsPoliciesEntity getFtpAllowed(String resourceGroupName, String name); + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + Response getFtpAllowedWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + CsmPublishingCredentialsPoliciesEntity updateFtpAllowed( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + Response updateFtpAllowedWithResponse( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context); + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + CsmPublishingCredentialsPoliciesEntity getScmAllowed(String resourceGroupName, String name); + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + Response getScmAllowedWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + CsmPublishingCredentialsPoliciesEntity updateScmAllowed( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + Response updateScmAllowedWithResponse( + String resourceGroupName, + String name, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context); + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 site configurations. + */ + PagedIterable listConfigurations(String resourceGroupName, String name); + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 site configurations. + */ + PagedIterable listConfigurations(String resourceGroupName, String name, Context context); + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary updateApplicationSettings( + String resourceGroupName, String name, StringDictionaryInner appSettings); + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettings Application settings of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response updateApplicationSettingsWithResponse( + String resourceGroupName, String name, StringDictionaryInner appSettings, Context context); + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listApplicationSettings(String resourceGroupName, String name); + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listApplicationSettingsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + SiteAuthSettings updateAuthSettings(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings); + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettings Auth settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + Response updateAuthSettingsWithResponse( + String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings, Context context); + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + SiteAuthSettings getAuthSettings(String resourceGroupName, String name); + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + Response getAuthSettingsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + SiteAuthSettingsV2 getAuthSettingsV2WithoutSecrets(String resourceGroupName, String name); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + Response getAuthSettingsV2WithoutSecretsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + SiteAuthSettingsV2 updateAuthSettingsV2( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2); + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + Response updateAuthSettingsV2WithResponse( + String resourceGroupName, String name, SiteAuthSettingsV2Inner siteAuthSettingsV2, Context context); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + SiteAuthSettingsV2 getAuthSettingsV2(String resourceGroupName, String name); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + Response getAuthSettingsV2WithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + AzureStoragePropertyDictionaryResource updateAzureStorageAccounts( + String resourceGroupName, String name, AzureStoragePropertyDictionaryResourceInner azureStorageAccounts); + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param azureStorageAccounts Azure storage accounts of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + Response updateAzureStorageAccountsWithResponse( + String resourceGroupName, + String name, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context); + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + AzureStoragePropertyDictionaryResource listAzureStorageAccounts(String resourceGroupName, String name); + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + Response listAzureStorageAccountsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + BackupRequest updateBackupConfiguration(String resourceGroupName, String name, BackupRequestInner request); + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Edited backup configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + Response updateBackupConfigurationWithResponse( + String resourceGroupName, String name, BackupRequestInner request, Context context); + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteBackupConfiguration(String resourceGroupName, String name); + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteBackupConfigurationWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + BackupRequest getBackupConfiguration(String resourceGroupName, String name); + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + Response getBackupConfigurationWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getAppSettingsKeyVaultReferences(String resourceGroupName, String name); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getAppSettingsKeyVaultReferences( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + ApiKVReference getAppSettingKeyVaultReference(String resourceGroupName, String name, String appSettingKey); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + Response getAppSettingKeyVaultReferenceWithResponse( + String resourceGroupName, String name, String appSettingKey, Context context); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getSiteConnectionStringKeyVaultReferences(String resourceGroupName, String name); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getSiteConnectionStringKeyVaultReferences( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + ApiKVReference getSiteConnectionStringKeyVaultReference( + String resourceGroupName, String name, String connectionStringKey); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + Response getSiteConnectionStringKeyVaultReferenceWithResponse( + String resourceGroupName, String name, String connectionStringKey, Context context); + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + ConnectionStringDictionary updateConnectionStrings( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings); + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response updateConnectionStringsWithResponse( + String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings, Context context); + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + ConnectionStringDictionary listConnectionStrings(String resourceGroupName, String name); + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listConnectionStringsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + SiteLogsConfig getDiagnosticLogsConfiguration(String resourceGroupName, String name); + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + Response getDiagnosticLogsConfigurationWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + SiteLogsConfig updateDiagnosticLogsConfig( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig); + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + Response updateDiagnosticLogsConfigWithResponse( + String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig, Context context); + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary updateMetadata(String resourceGroupName, String name, StringDictionaryInner metadata); + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response updateMetadataWithResponse( + String resourceGroupName, String name, StringDictionaryInner metadata, Context context); + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listMetadata(String resourceGroupName, String name); + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listMetadataWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + User listPublishingCredentials(String resourceGroupName, String name); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + User listPublishingCredentials(String resourceGroupName, String name, Context context); + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + PushSettings updateSitePushSettings(String resourceGroupName, String name, PushSettingsInner pushSettings); + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param pushSettings Push settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + Response updateSitePushSettingsWithResponse( + String resourceGroupName, String name, PushSettingsInner pushSettings, Context context); + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + PushSettings listSitePushSettings(String resourceGroupName, String name); + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + Response listSitePushSettingsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + SlotConfigNamesResource listSlotConfigurationNames(String resourceGroupName, String name); + + /** + * Description for Gets the names of app settings and connection strings that stick to the slot (not swapped). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + Response listSlotConfigurationNamesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + SlotConfigNamesResource updateSlotConfigurationNames( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames); + + /** + * Description for Updates the names of application settings and connection string that remain with the slot during + * swap operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotConfigNames Names of application settings and connection strings. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return slot Config names azure resource. + */ + Response updateSlotConfigurationNamesWithResponse( + String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames, Context context); + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + SiteConfigResource getConfiguration(String resourceGroupName, String name); + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + Response getConfigurationWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + SiteConfigResource createOrUpdateConfiguration( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + Response createOrUpdateConfigurationWithResponse( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + SiteConfigResource updateConfiguration(String resourceGroupName, String name, SiteConfigResourceInner siteConfig); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + Response updateConfigurationWithResponse( + String resourceGroupName, String name, SiteConfigResourceInner siteConfig, Context context); + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metadata for the app configuration snapshots that can be restored. + */ + PagedIterable listConfigurationSnapshotInfo(String resourceGroupName, String name); + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metadata for the app configuration snapshots that can be restored. + */ + PagedIterable listConfigurationSnapshotInfo( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + SiteConfigResource getConfigurationSnapshot(String resourceGroupName, String name, String snapshotId); + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + Response getConfigurationSnapshotWithResponse( + String resourceGroupName, String name, String snapshotId, Context context); + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 recoverSiteConfigurationSnapshot(String resourceGroupName, String name, String snapshotId); + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response recoverSiteConfigurationSnapshotWithResponse( + String resourceGroupName, String name, String snapshotId, Context context); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + InputStream getWebSiteContainerLogs(String resourceGroupName, String name); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + StreamResponse getWebSiteContainerLogsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + InputStream getContainerLogsZip(String resourceGroupName, String name); + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 response. + */ + StreamResponse getContainerLogsZipWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + PagedIterable listContinuousWebJobs(String resourceGroupName, String name); + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + PagedIterable listContinuousWebJobs(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 continuous Web Job Information. + */ + ContinuousWebJob getContinuousWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 continuous Web Job Information. + */ + Response getContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteContinuousWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void startContinuousWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response startContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stopContinuousWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopContinuousWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app deployments. + */ + PagedIterable listDeployments(String resourceGroupName, String name); + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app deployments. + */ + PagedIterable listDeployments(String resourceGroupName, String name, Context context); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Deployment getDeployment(String resourceGroupName, String name, String id); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Response getDeploymentWithResponse(String resourceGroupName, String name, String id, Context context); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDeployment(String resourceGroupName, String name, String id); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteDeploymentWithResponse(String resourceGroupName, String name, String id, Context context); + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Deployment listDeploymentLog(String resourceGroupName, String name, String id); + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Response listDeploymentLogWithResponse( + String resourceGroupName, String name, String id, Context context); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + RestoreRequest discoverBackup(String resourceGroupName, String name, RestoreRequestInner request); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + Response discoverBackupWithResponse( + String resourceGroupName, String name, RestoreRequestInner request, Context context); + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + PagedIterable listDomainOwnershipIdentifiers(String resourceGroupName, String name); + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + PagedIterable listDomainOwnershipIdentifiers(String resourceGroupName, String name, Context context); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Identifier getDomainOwnershipIdentifier( + String resourceGroupName, String name, String domainOwnershipIdentifierName); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Response getDomainOwnershipIdentifierWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDomainOwnershipIdentifier(String resourceGroupName, String name, String domainOwnershipIdentifierName); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteDomainOwnershipIdentifierWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, Context context); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + MSDeployStatus getMSDeployStatus(String resourceGroupName, String name); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + Response getMSDeployStatusWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + MSDeployStatus createMSDeployOperation(String resourceGroupName, String name, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + MSDeployStatus createMSDeployOperation(String resourceGroupName, String name, MSDeploy mSDeploy, Context context); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + MSDeployLog getMSDeployLog(String resourceGroupName, String name); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web 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 mSDeploy log. + */ + Response getMSDeployLogWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu function information elements. + */ + PagedIterable listFunctions(String resourceGroupName, String name); + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu function information elements. + */ + PagedIterable listFunctions(String resourceGroupName, String name, Context context); + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + String getFunctionsAdminToken(String resourceGroupName, String name); + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response getFunctionsAdminTokenWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @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 function information. + */ + FunctionEnvelope getFunction(String resourceGroupName, String name, String functionName); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @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 function information. + */ + Response getFunctionWithResponse( + String resourceGroupName, String name, String functionName, Context context); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteFunction(String resourceGroupName, String name, String functionName); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteFunctionWithResponse( + String resourceGroupName, String name, String functionName, Context context); + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + KeyInfo createOrUpdateFunctionSecret( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key); + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + Response createOrUpdateFunctionSecretWithResponse( + String resourceGroupName, String name, String functionName, String keyName, KeyInfoInner key, Context context); + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteFunctionSecret(String resourceGroupName, String name, String functionName, String keyName); + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteFunctionSecretWithResponse( + String resourceGroupName, String name, String functionName, String keyName, Context context); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listFunctionKeys(String resourceGroupName, String name, String functionName); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listFunctionKeysWithResponse( + String resourceGroupName, String name, String functionName, Context context); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + FunctionSecrets listFunctionSecrets(String resourceGroupName, String name, String functionName); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + Response listFunctionSecretsWithResponse( + String resourceGroupName, String name, String functionName, Context context); + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + HostKeys listHostKeys(String resourceGroupName, String name); + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + Response listHostKeysWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 listSyncStatus(String resourceGroupName, String name); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response listSyncStatusWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctions(String resourceGroupName, String name); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response syncFunctionsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + KeyInfo createOrUpdateHostSecret( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key); + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + Response createOrUpdateHostSecretWithResponse( + String resourceGroupName, String name, String keyType, String keyName, KeyInfoInner key, Context context); + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteHostSecret(String resourceGroupName, String name, String keyType, String keyName); + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteHostSecretWithResponse( + String resourceGroupName, String name, String keyType, String keyName, Context context); + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + PagedIterable listHostnameBindings(String resourceGroupName, String name); + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + PagedIterable listHostnameBindings(String resourceGroupName, String name, Context context); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + HostnameBinding getHostnameBinding(String resourceGroupName, String name, String hostname); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + Response getHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteHostnameBinding(String resourceGroupName, String name, String hostname); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteHostnameBindingWithResponse( + String resourceGroupName, String name, String hostname, Context context); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + HybridConnection getHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + Response getHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteHybridConnection(String resourceGroupName, String name, String namespaceName, String relayName); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteHybridConnectionWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, Context context); + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + HybridConnection listHybridConnections(String resourceGroupName, String name); + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + Response listHybridConnectionsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + RelayServiceConnectionEntity listRelayServiceConnections(String resourceGroupName, String name); + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + Response listRelayServiceConnectionsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + RelayServiceConnectionEntity getRelayServiceConnection(String resourceGroupName, String name, String entityName); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + Response getRelayServiceConnectionWithResponse( + String resourceGroupName, String name, String entityName, Context context); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteRelayServiceConnection(String resourceGroupName, String name, String entityName); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteRelayServiceConnectionWithResponse( + String resourceGroupName, String name, String entityName, Context context); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app instances. + */ + PagedIterable listInstanceIdentifiers(String resourceGroupName, String name); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app instances. + */ + PagedIterable listInstanceIdentifiers( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + WebSiteInstanceStatus getInstanceInfo(String resourceGroupName, String name, String instanceId); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response getInstanceInfoWithResponse( + String resourceGroupName, String name, String instanceId, Context context); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + MSDeployStatus getInstanceMsDeployStatus(String resourceGroupName, String name, String instanceId); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + Response getInstanceMsDeployStatusWithResponse( + String resourceGroupName, String name, String instanceId, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + MSDeployStatus createInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + MSDeployStatus createInstanceMSDeployOperation( + String resourceGroupName, String name, String instanceId, MSDeploy mSDeploy, Context context); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + MSDeployLog getInstanceMSDeployLog(String resourceGroupName, String name, String instanceId); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + Response getInstanceMSDeployLogWithResponse( + String resourceGroupName, String name, String instanceId, Context context); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu process information elements. + */ + PagedIterable listInstanceProcesses(String resourceGroupName, String name, String instanceId); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu process information elements. + */ + PagedIterable listInstanceProcesses( + String resourceGroupName, String name, String instanceId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + ProcessInfo getInstanceProcess(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + Response getInstanceProcessWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteInstanceProcess(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteInstanceProcessWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream getInstanceProcessDump(String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse getInstanceProcessDumpWithResponse( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + PagedIterable listInstanceProcessModules( + String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + PagedIterable listInstanceProcessModules( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + ProcessModuleInfo getInstanceProcessModule( + String resourceGroupName, String name, String processId, String baseAddress, String instanceId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + Response getInstanceProcessModuleWithResponse( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String instanceId, + Context context); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + PagedIterable listInstanceProcessThreads( + String resourceGroupName, String name, String processId, String instanceId); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + PagedIterable listInstanceProcessThreads( + String resourceGroupName, String name, String processId, String instanceId, Context context); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + SiteCloneability isCloneable(String resourceGroupName, String name); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + Response isCloneableWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listSiteBackups(String resourceGroupName, String name); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listSiteBackups(String resourceGroupName, String name, Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + FunctionSecrets listSyncFunctionTriggers(String resourceGroupName, String name); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + Response listSyncFunctionTriggersWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + StorageMigrationResponse migrateStorage( + String subscriptionName, String resourceGroupName, String name, StorageMigrationOptions migrationOptions); + + /** + * Description for Restores a web app. + * + * @param subscriptionName Azure subscription. + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationOptions Migration migrationOptions. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return response for a migration of app content request. + */ + StorageMigrationResponse migrateStorage( + String subscriptionName, + String resourceGroupName, + String name, + StorageMigrationOptions migrationOptions, + Context context); + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 operation on a resource. + */ + Operation migrateMySql(String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope); + + /** + * Description for Migrates a local (in-app) MySql database to a remote MySql database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param migrationRequestEnvelope MySql migration options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 operation on a resource. + */ + Operation migrateMySql( + String resourceGroupName, String name, MigrateMySqlRequest migrationRequestEnvelope, Context context); + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + MigrateMySqlStatus getMigrateMySqlStatus(String resourceGroupName, String name); + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + Response getMigrateMySqlStatusWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + SwiftVirtualNetwork getSwiftVirtualNetworkConnection(String resourceGroupName, String name); + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + Response getSwiftVirtualNetworkConnectionWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + SwiftVirtualNetwork createOrUpdateSwiftVirtualNetworkConnectionWithCheck( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + Response createOrUpdateSwiftVirtualNetworkConnectionWithCheckWithResponse( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context); + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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. + */ + void deleteSwiftVirtualNetwork(String resourceGroupName, String name); + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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 response. + */ + Response deleteSwiftVirtualNetworkWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + SwiftVirtualNetwork updateSwiftVirtualNetworkConnectionWithCheck( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + Response updateSwiftVirtualNetworkConnectionWithCheckWithResponse( + String resourceGroupName, String name, SwiftVirtualNetworkInner connectionEnvelope, Context context); + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + NetworkFeatures listNetworkFeatures(String resourceGroupName, String name, String view); + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + Response listNetworkFeaturesWithResponse( + String resourceGroupName, String name, String view, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object getNetworkTraceOperation(String resourceGroupName, String name, String operationId); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Response getNetworkTraceOperationWithResponse( + String resourceGroupName, String name, String operationId, Context context); + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + String startWebSiteNetworkTrace(String resourceGroupName, String name); + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response startWebSiteNetworkTraceWithResponse( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startWebSiteNetworkTraceOperation( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startWebSiteNetworkTraceOperation(String resourceGroupName, String name); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startWebSiteNetworkTraceOperation( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopWebSiteNetworkTrace(String resourceGroupName, String name); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopWebSiteNetworkTraceWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + List getNetworkTraces(String resourceGroupName, String name, String operationId); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Response> getNetworkTracesWithResponse( + String resourceGroupName, String name, String operationId, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object getNetworkTraceOperationV2(String resourceGroupName, String name, String operationId); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Response getNetworkTraceOperationV2WithResponse( + String resourceGroupName, String name, String operationId, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + List getNetworkTracesV2(String resourceGroupName, String name, String operationId); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Response> getNetworkTracesV2WithResponse( + String resourceGroupName, String name, String operationId, Context context); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 generateNewSitePublishingPassword(String resourceGroupName, String name); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response generateNewSitePublishingPasswordWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 performance monitor counters. + */ + PagedIterable listPerfMonCounters(String resourceGroupName, String name); + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 performance monitor counters. + */ + PagedIterable listPerfMonCounters( + String resourceGroupName, String name, String filter, Context context); + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + SitePhpErrorLogFlag getSitePhpErrorLogFlag(String resourceGroupName, String name); + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + Response getSitePhpErrorLogFlagWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + PremierAddOn listPremierAddOns(String resourceGroupName, String name); + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + Response listPremierAddOnsWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + PremierAddOn getPremierAddOn(String resourceGroupName, String name, String premierAddOnName); + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + Response getPremierAddOnWithResponse( + String resourceGroupName, String name, String premierAddOnName, Context context); + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePremierAddOn(String resourceGroupName, String name, String premierAddOnName); + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deletePremierAddOnWithResponse( + String resourceGroupName, String name, String premierAddOnName, Context context); + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + PrivateAccess getPrivateAccess(String resourceGroupName, String name); + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + Response getPrivateAccessWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + PrivateAccess putPrivateAccessVnet(String resourceGroupName, String name, PrivateAccessInner access); + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param access The information for the private access. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + Response putPrivateAccessVnetWithResponse( + String resourceGroupName, String name, PrivateAccessInner access, Context context); + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name); + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getPrivateEndpointConnectionList( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + Response getPrivateEndpointConnectionWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnection( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnection(String resourceGroupName, String name, String privateEndpointConnectionName); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnection( + String resourceGroupName, String name, String privateEndpointConnectionName, Context context); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + PrivateLinkResourcesWrapper getPrivateLinkResources(String resourceGroupName, String name); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + Response getPrivateLinkResourcesWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu process information elements. + */ + PagedIterable listProcesses(String resourceGroupName, String name); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu process information elements. + */ + PagedIterable listProcesses(String resourceGroupName, String name, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 process Information. + */ + ProcessInfo getProcess(String resourceGroupName, String name, String processId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 process Information. + */ + Response getProcessWithResponse( + String resourceGroupName, String name, String processId, Context context); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteProcess(String resourceGroupName, String name, String processId); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteProcessWithResponse(String resourceGroupName, String name, String processId, Context context); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream getProcessDump(String resourceGroupName, String name, String processId); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse getProcessDumpWithResponse(String resourceGroupName, String name, String processId, Context context); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 collection of Kudu thread information elements. + */ + PagedIterable listProcessModules(String resourceGroupName, String name, String processId); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 collection of Kudu thread information elements. + */ + PagedIterable listProcessModules( + String resourceGroupName, String name, String processId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @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 process Module Information. + */ + ProcessModuleInfo getProcessModule(String resourceGroupName, String name, String processId, String baseAddress); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @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 process Module Information. + */ + Response getProcessModuleWithResponse( + String resourceGroupName, String name, String processId, String baseAddress, Context context); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 collection of Kudu thread information elements. + */ + PagedIterable listProcessThreads(String resourceGroupName, String name, String processId); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @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 collection of Kudu thread information elements. + */ + PagedIterable listProcessThreads( + String resourceGroupName, String name, String processId, Context context); + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 public certificates. + */ + PagedIterable listPublicCertificates(String resourceGroupName, String name); + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 public certificates. + */ + PagedIterable listPublicCertificates(String resourceGroupName, String name, Context context); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + PublicCertificate getPublicCertificate(String resourceGroupName, String name, String publicCertificateName); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + Response getPublicCertificateWithResponse( + String resourceGroupName, String name, String publicCertificateName, Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePublicCertificate(String resourceGroupName, String name, String publicCertificateName); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deletePublicCertificateWithResponse( + String resourceGroupName, String name, String publicCertificateName, Context context); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream listPublishingProfileXmlWithSecrets( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse listPublishingProfileXmlWithSecretsWithResponse( + String resourceGroupName, String name, CsmPublishingProfileOptions publishingProfileOptions, Context context); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetProductionSlotConfig(String resourceGroupName, String name); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resetProductionSlotConfigWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restart(String resourceGroupName, String name); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response restartWithResponse( + String resourceGroupName, String name, Boolean softRestart, Boolean synchronous, Context context); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlob(String resourceGroupName, String name, RestoreRequestInner request, Context context); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedApp(String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedApp( + String resourceGroupName, String name, DeletedAppRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshot(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshot(String resourceGroupName, String name, SnapshotRestoreRequest restoreRequest, Context context); + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu site extension information elements. + */ + PagedIterable listSiteExtensions(String resourceGroupName, String name); + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @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 collection of Kudu site extension information elements. + */ + PagedIterable listSiteExtensions(String resourceGroupName, String name, Context context); + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + SiteExtensionInfo getSiteExtension(String resourceGroupName, String name, String siteExtensionId); + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + Response getSiteExtensionWithResponse( + String resourceGroupName, String name, String siteExtensionId, Context context); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + SiteExtensionInfo installSiteExtension(String resourceGroupName, String name, String siteExtensionId); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @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 site Extension Information. + */ + SiteExtensionInfo installSiteExtension( + String resourceGroupName, String name, String siteExtensionId, Context context); + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSiteExtension(String resourceGroupName, String name, String siteExtensionId); + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteSiteExtensionWithResponse( + String resourceGroupName, String name, String siteExtensionId, Context context); + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable listSlots(String resourceGroupName, String name); + + /** + * Description for Gets an app's deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service apps. + */ + PagedIterable listSlots(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + Site getSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + Response getSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + Site createOrUpdateSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + Site createOrUpdateSlot( + String resourceGroupName, String name, String slot, SiteInner siteEnvelope, Context context); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app to delete. + * @param slot Name of the deployment slot to delete. By default, the API deletes the production slot. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteSlotWithResponse( + String resourceGroupName, + String name, + String slot, + Boolean deleteMetrics, + Boolean deleteEmptyServerFarm, + Context context); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + Site updateSlot(String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope); + + /** + * Description for Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Unique name of the app to create or update. To create or update a deployment slot, use the {slot} + * parameter. + * @param slot Name of the deployment slot to create or update. By default, this API attempts to create or modify + * the production slot. + * @param siteEnvelope A JSON representation of the app properties. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 web app, a mobile app backend, or an API app. + */ + Response updateSlotWithResponse( + String resourceGroupName, String name, String slot, SitePatchResourceInner siteEnvelope, Context context); + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + CustomHostnameAnalysisResult analyzeCustomHostnameSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Analyze a custom hostname. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param hostname Custom hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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. + */ + Response analyzeCustomHostnameSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 applySlotConfigurationSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Description for Applies the configuration settings from the target slot onto the current slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response applySlotConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + BackupItem backupSlot(String resourceGroupName, String name, String slot, BackupRequestInner request); + + /** + * Description for Creates a backup of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a backup for the + * production slot. + * @param request Backup configuration. You can use the JSON response from the POST action as input here. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + Response backupSlotWithResponse( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listBackupsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listBackupsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + BackupItem getBackupStatusSlot(String resourceGroupName, String name, String backupId, String slot); + + /** + * Description for Gets a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a backup of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + Response getBackupStatusSlotWithResponse( + String resourceGroupName, String name, String backupId, String slot, Context context); + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot); + + /** + * Description for Deletes a backup of an app by its ID. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a backup of the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteBackupSlotWithResponse( + String resourceGroupName, String name, String backupId, String slot, Context context); + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + BackupItem listBackupStatusSecretsSlot( + String resourceGroupName, String name, String backupId, String slot, BackupRequestInner request); + + /** + * Description for Gets status of a web app backup that may be in progress, including secrets associated with the + * backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is + * passed in the request body. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param backupId ID of backup. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param request Information on backup request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return backup description. + */ + Response listBackupStatusSecretsSlotWithResponse( + String resourceGroupName, + String name, + String backupId, + String slot, + BackupRequestInner request, + Context context); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request); + + /** + * Description for Restores a specific backup to another app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param backupId ID of the backup. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSlot( + String resourceGroupName, + String name, + String backupId, + String slot, + RestoreRequestInner request, + Context context); + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + PagedIterable listBasicPublishingCredentialsPoliciesSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Returns whether Scm basic auth is allowed and whether Ftp is allowed for a given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies entity collection ARM resource. + */ + PagedIterable listBasicPublishingCredentialsPoliciesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + CsmPublishingCredentialsPoliciesEntity getFtpAllowedSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + Response getFtpAllowedSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + CsmPublishingCredentialsPoliciesEntity updateFtpAllowedSlot( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Description for Updates whether FTP is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + Response updateFtpAllowedSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context); + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + CsmPublishingCredentialsPoliciesEntity getScmAllowedSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns whether Scm basic auth is allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + Response getScmAllowedSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + CsmPublishingCredentialsPoliciesEntity updateScmAllowedSlot( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity); + + /** + * Description for Updates whether user publishing credentials are allowed on the site or not. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param csmPublishingAccessPoliciesEntity Publishing Credentials Policies parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return publishing Credentials Policies parameters. + */ + Response updateScmAllowedSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingCredentialsPoliciesEntityInner csmPublishingAccessPoliciesEntity, + Context context); + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 site configurations. + */ + PagedIterable listConfigurationsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List the configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 site configurations. + */ + PagedIterable listConfigurationsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary updateApplicationSettingsSlot( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings); + + /** + * Description for Replaces the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the application settings + * for the production slot. + * @param appSettings Application settings of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response updateApplicationSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, StringDictionaryInner appSettings, Context context); + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listApplicationSettingsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the application settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the application settings + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listApplicationSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + SiteAuthSettings updateAuthSettingsSlot( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings); + + /** + * Description for Updates the Authentication / Authorization settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettings Auth settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + Response updateAuthSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings, Context context); + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + SiteAuthSettings getAuthSettingsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Authentication/Authorization settings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization feature. + */ + Response getAuthSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + SiteAuthSettingsV2 updateAuthSettingsV2Slot( + String resourceGroupName, String name, String slot, SiteAuthSettingsV2Inner siteAuthSettingsV2); + + /** + * Description for Updates site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param siteAuthSettingsV2 Auth settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + Response updateAuthSettingsV2SlotWithResponse( + String resourceGroupName, + String name, + String slot, + SiteAuthSettingsV2Inner siteAuthSettingsV2, + Context context); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + SiteAuthSettingsV2 getAuthSettingsV2Slot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets site's Authentication / Authorization settings for apps via the V2 format. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the settings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 App Service Authentication / Authorization V2 feature. + */ + Response getAuthSettingsV2SlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + AzureStoragePropertyDictionaryResource updateAzureStorageAccountsSlot( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts); + + /** + * Description for Updates the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param azureStorageAccounts Azure storage accounts of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + Response updateAzureStorageAccountsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + AzureStoragePropertyDictionaryResourceInner azureStorageAccounts, + Context context); + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + AzureStoragePropertyDictionaryResource listAzureStorageAccountsSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Azure storage account configurations of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the Azure storage + * account configurations for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return azureStorageInfo dictionary resource. + */ + Response listAzureStorageAccountsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + BackupRequest updateBackupConfigurationSlot( + String resourceGroupName, String name, String slot, BackupRequestInner request); + + /** + * Description for Updates the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the backup configuration + * for the production slot. + * @param request Edited backup configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + Response updateBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, BackupRequestInner request, Context context); + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteBackupConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Deletes the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the backup configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + BackupRequest getBackupConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the backup configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the backup configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a backup which will be performed. + */ + Response getBackupConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getAppSettingsKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getAppSettingsKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + ApiKVReference getAppSettingKeyVaultReferenceSlot( + String resourceGroupName, String name, String appSettingKey, String slot); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param appSettingKey App Setting key name. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + Response getAppSettingKeyVaultReferenceSlotWithResponse( + String resourceGroupName, String name, String appSettingKey, String slot, Context context); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getSiteConnectionStringKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the config reference app settings and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getSiteConnectionStringKeyVaultReferencesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + ApiKVReference getSiteConnectionStringKeyVaultReferenceSlot( + String resourceGroupName, String name, String connectionStringKey, String slot); + + /** + * Description for Gets the config reference and status of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param connectionStringKey The connectionStringKey parameter. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of site key vault references. + */ + Response getSiteConnectionStringKeyVaultReferenceSlotWithResponse( + String resourceGroupName, String name, String connectionStringKey, String slot, Context context); + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + ConnectionStringDictionary updateConnectionStringsSlot( + String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings); + + /** + * Description for Replaces the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the connection settings + * for the production slot. + * @param connectionStrings Connection strings of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response updateConnectionStringsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + ConnectionStringDictionaryInner connectionStrings, + Context context); + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + ConnectionStringDictionary listConnectionStringsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the connection strings of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the connection settings for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listConnectionStringsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + SiteLogsConfig getDiagnosticLogsConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the logging configuration + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + Response getDiagnosticLogsConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + SiteLogsConfig updateDiagnosticLogsConfigSlot( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig); + + /** + * Description for Updates the logging configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the logging + * configuration for the production slot. + * @param siteLogsConfig A SiteLogsConfig JSON object that contains the logging configuration to change in the + * "properties" property. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 of App Service site logs. + */ + Response updateDiagnosticLogsConfigSlotWithResponse( + String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig, Context context); + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary updateMetadataSlot( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata); + + /** + * Description for Replaces the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the metadata for the + * production slot. + * @param metadata Edited metadata of the app or deployment slot. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response updateMetadataSlotWithResponse( + String resourceGroupName, String name, String slot, StringDictionaryInner metadata, Context context); + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listMetadataSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the metadata of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the metadata for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listMetadataSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + User listPublishingCredentialsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Git/FTP publishing credentials of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing credentials + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + User listPublishingCredentialsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + PushSettings updateSitePushSettingsSlot( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings); + + /** + * Description for Updates the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param pushSettings Push settings associated with web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + Response updateSitePushSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, PushSettingsInner pushSettings, Context context); + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + PushSettings listSitePushSettingsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the Push settings associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return push settings for the App. + */ + Response listSitePushSettingsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + SiteConfigResource getConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the configuration of an app, such as platform version and bitness, default documents, + * virtual applications, Always On, etc. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + Response getConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + SiteConfigResource createOrUpdateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + Response createOrUpdateConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + SiteConfigResource updateConfigurationSlot( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig); + + /** + * Description for Updates the configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update configuration for the + * production slot. + * @param siteConfig JSON representation of a SiteConfig object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + Response updateConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, SiteConfigResourceInner siteConfig, Context context); + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metadata for the app configuration snapshots that can be restored. + */ + PagedIterable listConfigurationSnapshotInfoSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets a list of web app configuration snapshots identifiers. Each element of the list contains a + * timestamp and the ID of the snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 metadata for the app configuration snapshots that can be restored. + */ + PagedIterable listConfigurationSnapshotInfoSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + SiteConfigResource getConfigurationSnapshotSlot( + String resourceGroupName, String name, String snapshotId, String slot); + + /** + * Description for Gets a snapshot of the configuration of an app at a previous point in time. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web app configuration ARM resource. + */ + Response getConfigurationSnapshotSlotWithResponse( + String resourceGroupName, String name, String snapshotId, String slot, Context context); + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 recoverSiteConfigurationSnapshotSlot(String resourceGroupName, String name, String snapshotId, String slot); + + /** + * Description for Reverts the configuration of an app to a previous snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param snapshotId The ID of the snapshot to read. + * @param slot Name of the deployment slot. If a slot is not specified, the API will return configuration for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response recoverSiteConfigurationSnapshotSlotWithResponse( + String resourceGroupName, String name, String snapshotId, String slot, Context context); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream getWebSiteContainerLogsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the last lines of docker logs for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse getWebSiteContainerLogsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream getContainerLogsZipSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the ZIP archived docker log files for the given site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse getContainerLogsZipSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + PagedIterable listContinuousWebJobsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List continuous web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + PagedIterable listContinuousWebJobsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 continuous Web Job Information. + */ + ContinuousWebJob getContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Gets a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @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 continuous Web Job Information. + */ + Response getContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Delete a continuous web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void startContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Start a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response startContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void stopContinuousWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Stop a continuous web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopContinuousWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app deployments. + */ + PagedIterable listDeploymentsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List deployments for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app deployments. + */ + PagedIterable listDeploymentsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Deployment getDeploymentSlot(String resourceGroupName, String name, String id, String slot); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets a deployment for the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Response getDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context); + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Deployment createDeploymentSlot( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment); + + /** + * Description for Create a deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id ID of an existing deployment. + * @param slot Name of the deployment slot. If a slot is not specified, the API creates a deployment for the + * production slot. + * @param deployment Deployment details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Response createDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, DeploymentInner deployment, Context context); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id Deployment ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteDeploymentSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context); + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Deployment listDeploymentLogSlot(String resourceGroupName, String name, String id, String slot); + + /** + * Description for List deployment log for specific deployment for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param id The ID of a specific deployment. This is the value of the name property in the JSON response from "GET + * /api/sites/{siteName}/deployments". + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Response listDeploymentLogSlotWithResponse( + String resourceGroupName, String name, String id, String slot, Context context); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + RestoreRequest discoverBackupSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request); + + /** + * Description for Discovers an existing app backup that can be restored from a blob in Azure storage. Use this to + * get information about the databases stored in a backup. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will perform discovery for the + * production slot. + * @param request A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of a restore request. + */ + Response discoverBackupSlotWithResponse( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context); + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + PagedIterable listDomainOwnershipIdentifiersSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Lists ownership identifiers for domain associated with web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 identifiers. + */ + PagedIterable listDomainOwnershipIdentifiersSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Identifier getDomainOwnershipIdentifierSlot( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Response getDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Identifier createOrUpdateDomainOwnershipIdentifierSlot( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Response createOrUpdateDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDomainOwnershipIdentifierSlot( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, String name, String domainOwnershipIdentifierName, String slot, Context context); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Identifier updateDomainOwnershipIdentifierSlot( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier); + + /** + * Description for Creates a domain ownership identifier for web app, or updates an existing ownership identifier. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param domainOwnershipIdentifierName Name of domain ownership identifier. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param domainOwnershipIdentifier A JSON representation of the domain ownership properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Response updateDomainOwnershipIdentifierSlotWithResponse( + String resourceGroupName, + String name, + String domainOwnershipIdentifierName, + String slot, + IdentifierInner domainOwnershipIdentifier, + Context context); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + MSDeployStatus getMSDeployStatusSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + Response getMSDeployStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + MSDeployStatus createMSDeployOperationSlot(String resourceGroupName, String name, String slot, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + MSDeployStatus createMSDeployOperationSlot( + String resourceGroupName, String name, String slot, MSDeploy mSDeploy, Context context); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @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 mSDeploy log. + */ + MSDeployLog getMSDeployLogSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @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 mSDeploy log. + */ + Response getMSDeployLogSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @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 collection of Kudu function information elements. + */ + PagedIterable listInstanceFunctionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List the functions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @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 collection of Kudu function information elements. + */ + PagedIterable listInstanceFunctionsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + String getFunctionsAdminTokenSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Fetch a short lived token that can be exchanged for a master key. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response getFunctionsAdminTokenSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @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 function information. + */ + FunctionEnvelope getInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @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 function information. + */ + Response getInstanceFunctionSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + FunctionEnvelope createInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope); + + /** + * Description for Create function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param functionEnvelope Function details. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + FunctionEnvelope createInstanceFunctionSlot( + String resourceGroupName, + String name, + String functionName, + String slot, + FunctionEnvelopeInner functionEnvelope, + Context context); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteInstanceFunctionSlot(String resourceGroupName, String name, String functionName, String slot); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteInstanceFunctionSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context); + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + KeyInfo createOrUpdateFunctionSecretSlot( + String resourceGroupName, String name, String functionName, String keyName, String slot, KeyInfoInner key); + + /** + * Description for Add or update a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + Response createOrUpdateFunctionSecretSlotWithResponse( + String resourceGroupName, + String name, + String functionName, + String keyName, + String slot, + KeyInfoInner key, + Context context); + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteFunctionSecretSlot( + String resourceGroupName, String name, String functionName, String keyName, String slot); + + /** + * Description for Delete a function secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName The name of the function. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteFunctionSecretSlotWithResponse( + String resourceGroupName, String name, String functionName, String keyName, String slot, Context context); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + StringDictionary listFunctionKeysSlot(String resourceGroupName, String name, String functionName, String slot); + + /** + * Description for Get function keys for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return string dictionary resource. + */ + Response listFunctionKeysSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + FunctionSecrets listFunctionSecretsSlot(String resourceGroupName, String name, String functionName, String slot); + + /** + * Description for Get function secrets for a function in a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param functionName Function name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + Response listFunctionSecretsSlotWithResponse( + String resourceGroupName, String name, String functionName, String slot, Context context); + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + HostKeys listHostKeysSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get host secrets for a function app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return functions host level keys. + */ + Response listHostKeysSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 listSyncStatusSlot(String resourceGroupName, String name, String slot); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response listSyncStatusSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response syncFunctionsSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + KeyInfo createOrUpdateHostSecretSlot( + String resourceGroupName, String name, String keyType, String keyName, String slot, KeyInfoInner key); + + /** + * Description for Add or update a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param key The key to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function key info. + */ + Response createOrUpdateHostSecretSlotWithResponse( + String resourceGroupName, + String name, + String keyType, + String keyName, + String slot, + KeyInfoInner key, + Context context); + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteHostSecretSlot(String resourceGroupName, String name, String keyType, String keyName, String slot); + + /** + * Description for Delete a host level secret. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param keyType The type of host key. + * @param keyName The name of the key. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteHostSecretSlotWithResponse( + String resourceGroupName, String name, String keyType, String keyName, String slot, Context context); + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + PagedIterable listHostnameBindingsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get hostname bindings for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname bindings. + */ + PagedIterable listHostnameBindingsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + HostnameBinding getHostnameBindingSlot(String resourceGroupName, String name, String slot, String hostname); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + Response getHostnameBindingSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + HostnameBinding createOrUpdateHostnameBindingSlot( + String resourceGroupName, String name, String hostname, String slot, HostnameBindingInner hostnameBinding); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param hostname Hostname in the hostname binding. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param hostnameBinding Binding details. This is the JSON representation of a HostNameBinding object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + Response createOrUpdateHostnameBindingSlotWithResponse( + String resourceGroupName, + String name, + String hostname, + String slot, + HostnameBindingInner hostnameBinding, + Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteHostnameBindingSlot(String resourceGroupName, String name, String slot, String hostname); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param hostname Hostname in the hostname binding. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteHostnameBindingSlotWithResponse( + String resourceGroupName, String name, String slot, String hostname, Context context); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + HybridConnection getHybridConnectionSlot( + String resourceGroupName, String name, String namespaceName, String relayName, String slot); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + Response getHybridConnectionSlotWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + HybridConnection createOrUpdateHybridConnectionSlot( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + Response createOrUpdateHybridConnectionSlotWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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. + */ + void deleteHybridConnectionSlot( + String resourceGroupName, String name, String namespaceName, String relayName, String slot); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web 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 response. + */ + Response deleteHybridConnectionSlotWithResponse( + String resourceGroupName, String name, String namespaceName, String relayName, String slot, Context context); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + HybridConnection updateHybridConnectionSlot( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope); + + /** + * Description for Creates a new Hybrid Connection using a Service Bus relay. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param namespaceName The namespace for this hybrid connection. + * @param relayName The relay name for this hybrid connection. + * @param slot The name of the slot for the web app. + * @param connectionEnvelope The details of the hybrid connection. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + Response updateHybridConnectionSlotWithResponse( + String resourceGroupName, + String name, + String namespaceName, + String relayName, + String slot, + HybridConnectionInner connectionEnvelope, + Context context); + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + HybridConnection listHybridConnectionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Retrieves all Service Bus Hybrid Connections used by this Web App. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + Response listHybridConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + RelayServiceConnectionEntity listRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets hybrid connections configured for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get hybrid connections for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + Response listRelayServiceConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + RelayServiceConnectionEntity getRelayServiceConnectionSlot( + String resourceGroupName, String name, String entityName, String slot); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a hybrid connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + Response getRelayServiceConnectionSlotWithResponse( + String resourceGroupName, String name, String entityName, String slot, Context context); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + RelayServiceConnectionEntity createOrUpdateRelayServiceConnectionSlot( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + Response createOrUpdateRelayServiceConnectionSlotWithResponse( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete a hybrid connection for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteRelayServiceConnectionSlotWithResponse( + String resourceGroupName, String name, String entityName, String slot, Context context); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + RelayServiceConnectionEntity updateRelayServiceConnectionSlot( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope); + + /** + * Description for Creates a new hybrid connection configuration (PUT), or updates an existing one (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param entityName Name of the hybrid connection configuration. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid + * connection for the production slot. + * @param connectionEnvelope Details of the hybrid connection configuration. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + Response updateRelayServiceConnectionSlotWithResponse( + String resourceGroupName, + String name, + String entityName, + String slot, + RelayServiceConnectionEntityInner connectionEnvelope, + Context context); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app instances. + */ + PagedIterable listInstanceIdentifiersSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 app instances. + */ + PagedIterable listInstanceIdentifiersSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + WebSiteInstanceStatus getInstanceInfoSlot(String resourceGroupName, String name, String instanceId, String slot); + + /** + * Description for Gets all scale-out instances of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param instanceId The instanceId parameter. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets the production slot instances. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response getInstanceInfoSlotWithResponse( + String resourceGroupName, String name, String instanceId, String slot, Context context); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + MSDeployStatus getInstanceMsDeployStatusSlot(String resourceGroupName, String name, String slot, String instanceId); + + /** + * Description for Get the status of the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mSDeploy ARM response. + */ + Response getInstanceMsDeployStatusSlotWithResponse( + String resourceGroupName, String name, String slot, String instanceId, Context context); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy 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 mSDeploy ARM response. + */ + MSDeployStatus createInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy); + + /** + * Description for Invoke the MSDeploy web app extension. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @param mSDeploy Details of MSDeploy operation. + * @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 mSDeploy ARM response. + */ + MSDeployStatus createInstanceMSDeployOperationSlot( + String resourceGroupName, String name, String slot, String instanceId, MSDeploy mSDeploy, Context context); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + MSDeployLog getInstanceMSDeployLogSlot(String resourceGroupName, String name, String slot, String instanceId); + + /** + * Description for Get the MSDeploy Log for the last MSDeploy operation. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param instanceId ID of web app instance. + * @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 mSDeploy log. + */ + Response getInstanceMSDeployLogSlotWithResponse( + String resourceGroupName, String name, String slot, String instanceId, Context context); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu process information elements. + */ + PagedIterable listInstanceProcessesSlot( + String resourceGroupName, String name, String slot, String instanceId); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu process information elements. + */ + PagedIterable listInstanceProcessesSlot( + String resourceGroupName, String name, String slot, String instanceId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + ProcessInfo getInstanceProcessSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Information. + */ + Response getInstanceProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteInstanceProcessSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteInstanceProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream getInstanceProcessDumpSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse getInstanceProcessDumpSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + PagedIterable listInstanceProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + PagedIterable listInstanceProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + ProcessModuleInfo getInstanceProcessModuleSlot( + String resourceGroupName, String name, String processId, String baseAddress, String slot, String instanceId); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 process Module Information. + */ + Response getInstanceProcessModuleSlotWithResponse( + String resourceGroupName, + String name, + String processId, + String baseAddress, + String slot, + String instanceId, + Context context); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + PagedIterable listInstanceProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param instanceId ID of a specific scaled-out instance. This is the value of the name property in the JSON + * response from "GET api/sites/{siteName}/instances". + * @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 collection of Kudu thread information elements. + */ + PagedIterable listInstanceProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, String instanceId, Context context); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + SiteCloneability isCloneableSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Shows whether an app can be cloned to another resource group or subscription. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. By default, this API returns information on the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return represents whether or not an app is cloneable. + */ + Response isCloneableSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listSiteBackupsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets existing backups of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get backups of the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 backup items. + */ + PagedIterable listSiteBackupsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + FunctionSecrets listSyncFunctionTriggersSlot(String resourceGroupName, String name, String slot); + + /** + * Description for This is to allow calling via powershell and ARM template. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function secrets. + */ + Response listSyncFunctionTriggersSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + MigrateMySqlStatus getMigrateMySqlStatusSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns the status of MySql in app migration, if one is active, and whether or not MySql in app + * is enabled. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return mySQL migration status. + */ + Response getMigrateMySqlStatusSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + SwiftVirtualNetwork getSwiftVirtualNetworkConnectionSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets a Swift Virtual Network connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + Response getSwiftVirtualNetworkConnectionSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + SwiftVirtualNetwork createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + Response createOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context); + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSwiftVirtualNetworkSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Deletes a Swift Virtual Network connection from an app (or deployment slot). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteSwiftVirtualNetworkSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + SwiftVirtualNetwork updateSwiftVirtualNetworkConnectionWithCheckSlot( + String resourceGroupName, String name, String slot, SwiftVirtualNetworkInner connectionEnvelope); + + /** + * Description for Integrates this Web App with a Virtual Network. This requires that 1) "swiftSupported" is true + * when doing a GET against this resource, and 2) that the target Subnet has already been delegated, and is not in + * use by another App Service Plan other than the one this App is in. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will add or update connections for + * the production slot. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return swift Virtual Network Contract. + */ + Response updateSwiftVirtualNetworkConnectionWithCheckSlotWithResponse( + String resourceGroupName, + String name, + String slot, + SwiftVirtualNetworkInner connectionEnvelope, + Context context); + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + NetworkFeatures listNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot); + + /** + * Description for Gets all network features used by the app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param view The type of view. Only "summary" is supported at this time. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get network features for the + * production slot. + * @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 full view of network features for an app (presently VNET integration and Hybrid Connections). + */ + Response listNetworkFeaturesSlotWithResponse( + String resourceGroupName, String name, String view, String slot, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object getNetworkTraceOperationSlot(String resourceGroupName, String name, String operationId, String slot); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Response getNetworkTraceOperationSlotWithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context); + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + String startWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Start capturing network packets for the site (To be deprecated). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response startWebSiteNetworkTraceSlotWithResponse( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startWebSiteNetworkTraceOperationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startWebSiteNetworkTraceOperationSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopWebSiteNetworkTraceSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopWebSiteNetworkTraceSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + List getNetworkTracesSlot(String resourceGroupName, String name, String operationId, String slot); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Response> getNetworkTracesSlotWithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object getNetworkTraceOperationSlotV2(String resourceGroupName, String name, String operationId, String slot); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Response getNetworkTraceOperationSlotV2WithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + List getNetworkTracesSlotV2(String resourceGroupName, String name, String operationId, String slot); + + /** + * Description for Gets a named operation for a network trace capturing (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param operationId GUID of the operation. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get an operation for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Response> getNetworkTracesSlotV2WithResponse( + String resourceGroupName, String name, String operationId, String slot, Context context); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 generateNewSitePublishingPasswordSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Generates a new publishing password for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API generate a new publishing password + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response generateNewSitePublishingPasswordSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 performance monitor counters. + */ + PagedIterable listPerfMonCountersSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets perfmon counters for web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: + * $filter=(startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain eq + * duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 performance monitor counters. + */ + PagedIterable listPerfMonCountersSlot( + String resourceGroupName, String name, String slot, String filter, Context context); + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + SitePhpErrorLogFlag getSitePhpErrorLogFlagSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets web app's event logs. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return used for getting PHP error logging flag. + */ + Response getSitePhpErrorLogFlagSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + PremierAddOn listPremierAddOnsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the premier add-ons of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the premier add-ons for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + Response listPremierAddOnsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + PremierAddOn getPremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot); + + /** + * Description for Gets a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named add-on for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + Response getPremierAddOnSlotWithResponse( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + PremierAddOn addPremierAddOnSlot( + String resourceGroupName, String name, String premierAddOnName, String slot, PremierAddOnInner premierAddOn); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + Response addPremierAddOnSlotWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnInner premierAddOn, + Context context); + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePremierAddOnSlot(String resourceGroupName, String name, String premierAddOnName, String slot); + + /** + * Description for Delete a premier add-on from an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the named add-on for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deletePremierAddOnSlotWithResponse( + String resourceGroupName, String name, String premierAddOnName, String slot, Context context); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + PremierAddOn updatePremierAddOnSlot( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn); + + /** + * Description for Updates a named add-on of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param premierAddOnName Add-on name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the + * production slot. + * @param premierAddOn A JSON representation of the edited premier add-on. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + Response updatePremierAddOnSlotWithResponse( + String resourceGroupName, + String name, + String premierAddOnName, + String slot, + PremierAddOnPatchResource premierAddOn, + Context context); + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + PrivateAccess getPrivateAccessSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + Response getPrivateAccessSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + PrivateAccess putPrivateAccessVnetSlot( + String resourceGroupName, String name, String slot, PrivateAccessInner access); + + /** + * Description for Sets data around private site access enablement and authorized Virtual Networks that can access + * the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for the web app. + * @param access The information for the private access. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return description of the parameters of Private Access for a Web Site. + */ + Response putPrivateAccessVnetSlotWithResponse( + String resourceGroupName, String name, String slot, PrivateAccessInner access, Context context); + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getPrivateEndpointConnectionListSlot( + String resourceGroupName, String name, String slot); + + /** + * Description for Gets the list of private endpoint connections associated with a site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + PagedIterable getPrivateEndpointConnectionListSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource getPrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot); + + /** + * Description for Gets a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName Name of the private endpoint connection. + * @param slot Name of the site deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + Response getPrivateEndpointConnectionSlotWithResponse( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper); + + /** + * Description for Approves or rejects a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param privateEndpointWrapper Private Endpoint Connection Approval ARM resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return remote Private Endpoint Connection ARM resource. + */ + RemotePrivateEndpointConnectionArmResource approveOrRejectPrivateEndpointConnectionSlot( + String resourceGroupName, + String name, + String privateEndpointConnectionName, + String slot, + PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, + Context context); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot); + + /** + * Description for Deletes a private endpoint connection. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param privateEndpointConnectionName The privateEndpointConnectionName parameter. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return any object. + */ + Object deletePrivateEndpointConnectionSlot( + String resourceGroupName, String name, String privateEndpointConnectionName, String slot, Context context); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + PrivateLinkResourcesWrapper getPrivateLinkResourcesSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the private link resources. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the site. + * @param slot The slot parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return wrapper for a collection of private link resources. + */ + Response getPrivateLinkResourcesSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu process information elements. + */ + PagedIterable listProcessesSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get list of processes for a web site, or a deployment slot, or for a specific scaled-out instance + * in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu process information elements. + */ + PagedIterable listProcessesSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Information. + */ + ProcessInfo getProcessSlot(String resourceGroupName, String name, String processId, String slot); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Information. + */ + Response getProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteProcessSlot(String resourceGroupName, String name, String processId, String slot); + + /** + * Description for Terminate a process by its ID for a web site, or a deployment slot, or specific scaled-out + * instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteProcessSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream getProcessDumpSlot(String resourceGroupName, String name, String processId, String slot); + + /** + * Description for Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse getProcessDumpSlotWithResponse( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu thread information elements. + */ + PagedIterable listProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot); + + /** + * Description for List module information for a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu thread information elements. + */ + PagedIterable listProcessModulesSlot( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Module Information. + */ + ProcessModuleInfo getProcessModuleSlot( + String resourceGroupName, String name, String processId, String baseAddress, String slot); + + /** + * Description for Get process information by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param baseAddress Module base address. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 process Module Information. + */ + Response getProcessModuleSlotWithResponse( + String resourceGroupName, String name, String processId, String baseAddress, String slot, Context context); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu thread information elements. + */ + PagedIterable listProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot); + + /** + * Description for List the threads in a process by its ID for a specific scaled-out instance in a web site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param processId PID. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @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 collection of Kudu thread information elements. + */ + PagedIterable listProcessThreadsSlot( + String resourceGroupName, String name, String processId, String slot, Context context); + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 public certificates. + */ + PagedIterable listPublicCertificatesSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get public certificates for an app or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API gets hostname bindings for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 public certificates. + */ + PagedIterable listPublicCertificatesSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + PublicCertificate getPublicCertificateSlot( + String resourceGroupName, String name, String slot, String publicCertificateName); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API the named binding for the production + * slot. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + Response getPublicCertificateSlotWithResponse( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + PublicCertificate createOrUpdatePublicCertificateSlot( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate); + + /** + * Description for Creates a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param publicCertificateName Public certificate name. + * @param slot Name of the deployment slot. If a slot is not specified, the API will create a binding for the + * production slot. + * @param publicCertificate Public certificate details. This is the JSON representation of a PublicCertificate + * object. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + Response createOrUpdatePublicCertificateSlotWithResponse( + String resourceGroupName, + String name, + String publicCertificateName, + String slot, + PublicCertificateInner publicCertificate, + Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePublicCertificateSlot(String resourceGroupName, String name, String slot, String publicCertificateName); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the binding for the + * production slot. + * @param publicCertificateName Public certificate name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deletePublicCertificateSlotWithResponse( + String resourceGroupName, String name, String slot, String publicCertificateName, Context context); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + InputStream listPublishingProfileXmlWithSecretsSlot( + String resourceGroupName, String name, String slot, CsmPublishingProfileOptions publishingProfileOptions); + + /** + * Description for Gets the publishing profile for an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the publishing profile for + * the production slot. + * @param publishingProfileOptions Specifies publishingProfileOptions for publishing profile. For example, use + * {"format": "FileZilla3"} to get a FileZilla publishing profile. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + StreamResponse listPublishingProfileXmlWithSecretsSlotWithResponse( + String resourceGroupName, + String name, + String slot, + CsmPublishingProfileOptions publishingProfileOptions, + Context context); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 resetSlotConfigurationSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Resets the configuration settings of the current slot if they were previously modified by calling + * the API with POST. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API resets configuration settings for + * the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response resetSlotConfigurationSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restartSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Restarts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restart the production slot. + * @param softRestart Specify true to apply the configuration settings and restarts the app only if necessary. By + * default, the API always restarts and reprovisions the app. + * @param synchronous Specify true to block until the app is restarted. By default, it is set to false, and the API + * responds immediately (asynchronous). + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response restartSlotWithResponse( + String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous, Context context); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlobSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request); + + /** + * Description for Restores an app from a backup blob in Azure Storage. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will restore a backup of the + * production slot. + * @param request Information on restore request . + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromBackupBlobSlot( + String resourceGroupName, String name, String slot, RestoreRequestInner request, Context context); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest); + + /** + * Description for Restores a deleted web app to this web app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Deleted web app restore information. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreFromDeletedAppSlot( + String resourceGroupName, String name, String slot, DeletedAppRestoreRequest restoreRequest, Context context); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshotSlot(String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest); + + /** + * Description for Restores a web app from a snapshot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param restoreRequest Snapshot restore settings. Snapshot information can be obtained by calling GetDeletedSites + * or GetSiteSnapshots API. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 restoreSnapshotSlot( + String resourceGroupName, String name, String slot, SnapshotRestoreRequest restoreRequest, Context context); + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 collection of Kudu site extension information elements. + */ + PagedIterable listSiteExtensionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Get list of siteextensions for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 collection of Kudu site extension information elements. + */ + PagedIterable listSiteExtensionsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + SiteExtensionInfo getSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Description for Get site extension information by its ID for a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + Response getSiteExtensionSlotWithResponse( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + SiteExtensionInfo installSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Description for Install site extension on a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 site Extension Information. + */ + SiteExtensionInfo installSiteExtensionSlot( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context); + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSiteExtensionSlot(String resourceGroupName, String name, String siteExtensionId, String slot); + + /** + * Description for Remove a site extension from a web site, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param siteExtensionId Site extension name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteSiteExtensionSlotWithResponse( + String resourceGroupName, String name, String siteExtensionId, String slot, Context context); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + PagedIterable listSlotDifferencesSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + PagedIterable listSlotDifferencesSlot( + String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the source slot. If a slot is not specified, the production slot is used as the source slot. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + PagedIterable listSnapshotsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + PagedIterable listSnapshotsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + PagedIterable listSnapshotsFromDRSecondarySlot(String resourceGroupName, String name, String slot); + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param slot Website Slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + PagedIterable listSnapshotsFromDRSecondarySlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + SiteSourceControl getSourceControlSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the source control + * configuration for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + Response getSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + SiteSourceControl createOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + SiteSourceControl createOrUpdateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteSourceControlSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the source control + * configuration for the production slot. + * @param additionalFlags The additionalFlags parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, String additionalFlags, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + SiteSourceControl updateSourceControlSlot( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will update the source control + * configuration for the production slot. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + Response updateSourceControlSlotWithResponse( + String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 startSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will start the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response startSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTraceSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTraceSlot( + String resourceGroupName, + String name, + String slot, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will stop the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopSlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopNetworkTraceSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param slot The name of the slot for this web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopNetworkTraceSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncRepositorySlot(String resourceGroupName, String name, String slot); + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param slot Name of web app slot. If not specified then will default to production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response syncRepositorySlotWithResponse(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctionTriggersSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response syncFunctionTriggersSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + PagedIterable listTriggeredWebJobsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes a deployment for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + PagedIterable listTriggeredWebJobsSlot( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job Information. + */ + TriggeredWebJob getTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job Information. + */ + Response getTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API deletes web job for the production + * slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 collection of Kudu continuous web job information elements. + */ + PagedIterable listTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 collection of Kudu continuous web job information elements. + */ + PagedIterable listTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job History. + */ + TriggeredJobHistory getTriggeredWebJobHistorySlot( + String resourceGroupName, String name, String webJobName, String id, String slot); + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @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 triggered Web Job History. + */ + Response getTriggeredWebJobHistorySlotWithResponse( + String resourceGroupName, String name, String webJobName, String id, String slot, Context context); + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void runTriggeredWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param slot Name of the deployment slot. If a slot is not specified, the API uses the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response runTriggeredWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + PagedIterable listUsagesSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get quota information of the + * production slot. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + PagedIterable listUsagesSlot( + String resourceGroupName, String name, String slot, String filter, Context context); + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + List listVnetConnectionsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get virtual network connections + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + Response> listVnetConnectionsSlotWithResponse( + String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + VnetInfoResource getVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will get the named virtual network + * for the production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + Response getVnetConnectionSlotWithResponse( + String resourceGroupName, String name, String vnetName, String slot, Context context); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVnetConnectionSlot(String resourceGroupName, String name, String vnetName, String slot); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param slot Name of the deployment slot. If a slot is not specified, the API will delete the connection for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteVnetConnectionSlotWithResponse( + String resourceGroupName, String name, String vnetName, String slot, Context context); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @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 Virtual Network gateway contract. + */ + VnetGateway getVnetConnectionGatewaySlot( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param slot Name of the deployment slot. If a slot is not specified, the API will get a gateway for the + * production slot's Virtual Network. + * @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 Virtual Network gateway contract. + */ + Response getVnetConnectionGatewaySlotWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, String slot, Context context); + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu web job information elements. + */ + PagedIterable listWebJobsSlot(String resourceGroupName, String name, String slot); + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu web job information elements. + */ + PagedIterable listWebJobsSlot(String resourceGroupName, String name, String slot, Context context); + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + WebJob getWebJobSlot(String resourceGroupName, String name, String webJobName, String slot); + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param slot Name of the deployment slot. If a slot is not specified, the API returns deployments for the + * production slot. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + Response getWebJobSlotWithResponse( + String resourceGroupName, String name, String webJobName, String slot, Context context); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + PagedIterable listSlotDifferencesFromProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Description for Get the difference in configuration settings between two web app slots. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 slot differences. + */ + PagedIterable listSlotDifferencesFromProduction( + String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity); + + /** + * Description for Swaps two deployment slots of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param slotSwapEntity JSON object that contains the target slot name. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, Context context); + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + PagedIterable listSnapshots(String resourceGroupName, String name); + + /** + * Description for Returns all Snapshots to the user. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + PagedIterable listSnapshots(String resourceGroupName, String name, Context context); + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + PagedIterable listSnapshotsFromDRSecondary(String resourceGroupName, String name); + + /** + * Description for Returns all Snapshots to the user from DRSecondary endpoint. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Website Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 snapshots which can be used to revert an app to a previous time. + */ + PagedIterable listSnapshotsFromDRSecondary(String resourceGroupName, String name, Context context); + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + SiteSourceControl getSourceControl(String resourceGroupName, String name); + + /** + * Description for Gets the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + Response getSourceControlWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + SiteSourceControl createOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + SiteSourceControl createOrUpdateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the 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. + */ + void deleteSourceControl(String resourceGroupName, String name); + + /** + * Description for Deletes the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param additionalFlags The additionalFlags parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteSourceControlWithResponse( + String resourceGroupName, String name, String additionalFlags, Context context); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + SiteSourceControl updateSourceControl( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl); + + /** + * Description for Updates the source control configuration of an app. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param siteSourceControl JSON representation of a SiteSourceControl object. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return source control configuration for an app. + */ + Response updateSourceControlWithResponse( + String resourceGroupName, String name, SiteSourceControlInner siteSourceControl, Context context); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 start(String resourceGroupName, String name); + + /** + * Description for Starts an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response startWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTrace( + String resourceGroupName, String name, Integer durationInSeconds, Integer maxFrameLength, String sasUrl); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTrace(String resourceGroupName, String name); + + /** + * Description for Start capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param durationInSeconds The duration to keep capturing in seconds. + * @param maxFrameLength The maximum frame length in bytes (Optional). + * @param sasUrl The Blob URL to store capture file. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of NetworkTrace. + */ + Object startNetworkTrace( + String resourceGroupName, + String name, + Integer durationInSeconds, + Integer maxFrameLength, + String sasUrl, + Context context); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stop(String resourceGroupName, String name); + + /** + * Description for Stops an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 stopNetworkTrace(String resourceGroupName, String name); + + /** + * Description for Stop ongoing capturing network packets for the site. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name The name of the web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response stopNetworkTraceWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncRepository(String resourceGroupName, String name); + + /** + * Description for Sync web app repository. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of web app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response syncRepositoryWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 syncFunctionTriggers(String resourceGroupName, String name); + + /** + * Description for Syncs function trigger metadata to the management database. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response syncFunctionTriggersWithResponse(String resourceGroupName, String name, Context context); + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + PagedIterable listTriggeredWebJobs(String resourceGroupName, String name); + + /** + * Description for List triggered web jobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu continuous web job information elements. + */ + PagedIterable listTriggeredWebJobs(String resourceGroupName, String name, Context context); + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 triggered Web Job Information. + */ + TriggeredWebJob getTriggeredWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Gets a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 triggered Web Job Information. + */ + Response getTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteTriggeredWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Delete a triggered web job by its ID for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 collection of Kudu continuous web job information elements. + */ + PagedIterable listTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName); + + /** + * Description for List a triggered web job's history for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @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 collection of Kudu continuous web job information elements. + */ + PagedIterable listTriggeredWebJobHistory( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + TriggeredJobHistory getTriggeredWebJobHistory(String resourceGroupName, String name, String webJobName, String id); + + /** + * Description for Gets a triggered web job's history by its ID for an app, , or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param id History ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return triggered Web Job History. + */ + Response getTriggeredWebJobHistoryWithResponse( + String resourceGroupName, String name, String webJobName, String id, Context context); + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void runTriggeredWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Run a triggered web job for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of Web Job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response runTriggeredWebJobWithResponse( + String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + PagedIterable listUsages(String resourceGroupName, String name); + + /** + * Description for Gets the quota usage information of an app (or deployment slot, if specified). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param filter Return only information specified in the filter (using OData syntax). For example: + * $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + * endTime eq 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 CSM usage quotas. + */ + PagedIterable listUsages(String resourceGroupName, String name, String filter, Context context); + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + List listVnetConnections(String resourceGroupName, String name); + + /** + * Description for Gets the virtual networks the app (or deployment slot) is connected to. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return array of VnetInfoResource. + */ + Response> listVnetConnectionsWithResponse( + String resourceGroupName, String name, Context context); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + VnetInfoResource getVnetConnection(String resourceGroupName, String name, String vnetName); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + Response getVnetConnectionWithResponse( + String resourceGroupName, String name, String vnetName, Context context); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + VnetInfoResource createOrUpdateVnetConnection( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + Response createOrUpdateVnetConnectionWithResponse( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVnetConnection(String resourceGroupName, String name, String vnetName); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the virtual network. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteVnetConnectionWithResponse( + String resourceGroupName, String name, String vnetName, Context context); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + VnetInfoResource updateVnetConnection( + String resourceGroupName, String name, String vnetName, VnetInfoResourceInner connectionEnvelope); + + /** + * Description for Adds a Virtual Network connection to an app or slot (PUT) or updates the connection properties + * (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of an existing Virtual Network. + * @param connectionEnvelope Properties of the Virtual Network connection. See example. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + Response updateVnetConnectionWithResponse( + String resourceGroupName, + String name, + String vnetName, + VnetInfoResourceInner connectionEnvelope, + Context context); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @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 Virtual Network gateway contract. + */ + VnetGateway getVnetConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @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 Virtual Network gateway contract. + */ + Response getVnetConnectionGatewayWithResponse( + String resourceGroupName, String name, String vnetName, String gatewayName, Context context); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + VnetGateway createOrUpdateVnetConnectionGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + Response createOrUpdateVnetConnectionGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + VnetGateway updateVnetConnectionGateway( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope); + + /** + * Description for Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the app. + * @param vnetName Name of the Virtual Network. + * @param gatewayName Name of the gateway. Currently, the only supported string is "primary". + * @param connectionEnvelope The properties to update this gateway with. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + Response updateVnetConnectionGatewayWithResponse( + String resourceGroupName, + String name, + String vnetName, + String gatewayName, + VnetGatewayInner connectionEnvelope, + Context context); + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu web job information elements. + */ + PagedIterable listWebJobs(String resourceGroupName, String name); + + /** + * Description for List webjobs for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 Kudu web job information elements. + */ + PagedIterable listWebJobs(String resourceGroupName, String name, Context context); + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + WebJob getWebJob(String resourceGroupName, String name, String webJobName); + + /** + * Description for Get webjob information for an app, or a deployment slot. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Site name. + * @param webJobName Name of the web job. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return web Job Information. + */ + Response getWebJobWithResponse(String resourceGroupName, String name, String webJobName, Context context); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + Site getById(String id); + + /** + * Description for Gets the details of a web, mobile, or API app. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a web app, a mobile app backend, or an API app. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Deployment getDeploymentById(String id); + + /** + * Description for Get a deployment by its ID for an app, or a deployment slot. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return user credentials used for publishing activity. + */ + Response getDeploymentByIdWithResponse(String id, Context context); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Identifier getDomainOwnershipIdentifierById(String id); + + /** + * Description for Get domain ownership identifier for web app. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 domain specific resource identifier. + */ + Response getDomainOwnershipIdentifierByIdWithResponse(String id, Context context); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + FunctionEnvelope getFunctionById(String id); + + /** + * Description for Get function information by its ID for web site, or a deployment slot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return function information. + */ + Response getFunctionByIdWithResponse(String id, Context context); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.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 hostname binding object. + */ + HostnameBinding getHostnameBindingById(String id); + + /** + * Description for Get the named hostname binding for an app (or deployment slot, if specified). + * + * @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.appservice.generated.models.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 hostname binding object. + */ + Response getHostnameBindingByIdWithResponse(String id, Context context); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + HybridConnection getHybridConnectionById(String id); + + /** + * Description for Retrieves a specific Service Bus Hybrid Connection used by this Web App. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection contract. + */ + Response getHybridConnectionByIdWithResponse(String id, Context context); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + RelayServiceConnectionEntity getRelayServiceConnectionById(String id); + + /** + * Description for Gets a hybrid connection configuration by its name. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return hybrid Connection for an App Service app. + */ + Response getRelayServiceConnectionByIdWithResponse(String id, Context context); + + /** + * Description for Gets a named add-on of an app. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + PremierAddOn getPremierAddOnById(String id); + + /** + * Description for Gets a named add-on of an app. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return premier add-on. + */ + Response getPremierAddOnByIdWithResponse(String id, Context context); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + PublicCertificate getPublicCertificateById(String id); + + /** + * Description for Get the named public certificate for an app (or deployment slot, if specified). + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return public certificate object. + */ + Response getPublicCertificateByIdWithResponse(String id, Context context); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + VnetInfoResource getVnetConnectionSlotById(String id); + + /** + * Description for Gets a virtual network the app (or deployment slot) is connected to by name. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return virtual Network information ARM resource. + */ + Response getVnetConnectionSlotByIdWithResponse(String id, Context context); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + VnetGateway getVnetConnectionGatewaySlotById(String id); + + /** + * Description for Gets an app's Virtual Network gateway. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Virtual Network gateway contract. + */ + Response getVnetConnectionGatewaySlotByIdWithResponse(String id, Context context); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Description for Deletes a web, mobile, or API app, or one of the deployment slots. + * + * @param id the resource ID. + * @param deleteMetrics If true, web app metrics are also deleted. + * @param deleteEmptyServerFarm Specify false if you want to keep empty App Service plan. By default, empty App + * Service plan is deleted. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteByIdWithResponse( + String id, Boolean deleteMetrics, Boolean deleteEmptyServerFarm, Context context); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDeploymentById(String id); + + /** + * Description for Delete a deployment by its ID for an app, or a deployment slot. + * + * @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.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteDeploymentByIdWithResponse(String id, Context context); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteDomainOwnershipIdentifierById(String id); + + /** + * Description for Deletes a domain ownership identifier for a web app. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteDomainOwnershipIdentifierByIdWithResponse(String id, Context context); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteFunctionById(String id); + + /** + * Description for Delete a function for web site, or a deployment slot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteFunctionByIdWithResponse(String id, Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deleteHostnameBindingById(String id); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteHostnameBindingByIdWithResponse(String id, Context context); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteHybridConnectionById(String id); + + /** + * Description for Removes a Hybrid Connection from this site. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteHybridConnectionByIdWithResponse(String id, Context context); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteRelayServiceConnectionById(String id); + + /** + * Description for Deletes a relay service connection by its name. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteRelayServiceConnectionByIdWithResponse(String id, Context context); + + /** + * Description for Delete a premier add-on from an app. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePremierAddOnById(String id); + + /** + * Description for Delete a premier add-on from an app. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deletePremierAddOnByIdWithResponse(String id, Context context); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.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 deletePublicCertificateById(String id); + + /** + * Description for Deletes a hostname binding for an app. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appservice.generated.models.DefaultErrorResponseErrorException thrown if the + * request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deletePublicCertificateByIdWithResponse(String id, Context context); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteVnetConnectionSlotById(String id); + + /** + * Description for Deletes a connection from an app (or deployment slot to a named virtual network. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + Response deleteVnetConnectionSlotByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Site resource. + * + * @param name resource name. + * @return the first stage of the new Site definition. + */ + Site.DefinitionStages.Blank define(String name); + + /** + * Begins definition for a new Deployment resource. + * + * @param name resource name. + * @return the first stage of the new Deployment definition. + */ + Deployment.DefinitionStages.Blank defineDeployment(String name); + + /** + * Begins definition for a new Identifier resource. + * + * @param name resource name. + * @return the first stage of the new Identifier definition. + */ + Identifier.DefinitionStages.Blank defineDomainOwnershipIdentifier(String name); + + /** + * Begins definition for a new FunctionEnvelope resource. + * + * @param name resource name. + * @return the first stage of the new FunctionEnvelope definition. + */ + FunctionEnvelope.DefinitionStages.Blank defineFunction(String name); + + /** + * Begins definition for a new HostnameBinding resource. + * + * @param name resource name. + * @return the first stage of the new HostnameBinding definition. + */ + HostnameBinding.DefinitionStages.Blank defineHostnameBinding(String name); + + /** + * Begins definition for a new HybridConnection resource. + * + * @param name resource name. + * @return the first stage of the new HybridConnection definition. + */ + HybridConnection.DefinitionStages.Blank defineHybridConnection(String name); + + /** + * Begins definition for a new RelayServiceConnectionEntity resource. + * + * @param name resource name. + * @return the first stage of the new RelayServiceConnectionEntity definition. + */ + RelayServiceConnectionEntity.DefinitionStages.Blank defineRelayServiceConnection(String name); + + /** + * Begins definition for a new PremierAddOn resource. + * + * @param name resource name. + * @return the first stage of the new PremierAddOn definition. + */ + PremierAddOn.DefinitionStages.Blank definePremierAddOn(String name); + + /** + * Begins definition for a new PublicCertificate resource. + * + * @param name resource name. + * @return the first stage of the new PublicCertificate definition. + */ + PublicCertificate.DefinitionStages.Blank definePublicCertificate(String name); + + /** + * Begins definition for a new VnetInfoResource resource. + * + * @param name resource name. + * @return the first stage of the new VnetInfoResource definition. + */ + VnetInfoResource.DefinitionStages.Blank defineVnetConnectionSlot(String name); + + /** + * Begins definition for a new VnetGateway resource. + * + * @param name resource name. + * @return the first stage of the new VnetGateway definition. + */ + VnetGateway.DefinitionStages.Blank defineVnetConnectionGatewaySlot(String name); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJob.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJob.java new file mode 100644 index 0000000000000..72c87b8b4bc4f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJob.java @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.WebJobInner; +import java.util.Map; + +/** An immutable client-side representation of WebJob. */ +public interface WebJob { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the runCommand property: Run command. + * + * @return the runCommand value. + */ + String runCommand(); + + /** + * Gets the url property: Job URL. + * + * @return the url value. + */ + String url(); + + /** + * Gets the extraInfoUrl property: Extra Info URL. + * + * @return the extraInfoUrl value. + */ + String extraInfoUrl(); + + /** + * Gets the webJobType property: Job type. + * + * @return the webJobType value. + */ + WebJobType webJobType(); + + /** + * Gets the error property: Error information. + * + * @return the error value. + */ + String error(); + + /** + * Gets the usingSdk property: Using SDK?. + * + * @return the usingSdk value. + */ + Boolean usingSdk(); + + /** + * Gets the settings property: Job settings. + * + * @return the settings value. + */ + Map settings(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.WebJobInner object. + * + * @return the inner object. + */ + WebJobInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJobCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJobCollection.java new file mode 100644 index 0000000000000..318d3b8adee99 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJobCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.WebJobInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Kudu web job information elements. */ +@Fluent +public final class WebJobCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WebJobCollection.class); + + /* + * 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; + + /** + * 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 WebJobCollection object itself. + */ + public WebJobCollection 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 WebJobCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJobType.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJobType.java new file mode 100644 index 0000000000000..af107f1f2ad8b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebJobType.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for WebJobType. */ +public enum WebJobType { + /** Enum value Continuous. */ + CONTINUOUS("Continuous"), + + /** Enum value Triggered. */ + TRIGGERED("Triggered"); + + /** The actual serialized value for a WebJobType instance. */ + private final String value; + + WebJobType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a WebJobType instance. + * + * @param value the serialized value to parse. + * @return the parsed WebJobType object, or null if unable to parse. + */ + @JsonCreator + public static WebJobType fromString(String value) { + WebJobType[] items = WebJobType.values(); + for (WebJobType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebSiteInstanceStatus.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebSiteInstanceStatus.java new file mode 100644 index 0000000000000..e4f5e0bb2b05f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WebSiteInstanceStatus.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.resourcemanager.appservice.generated.fluent.models.WebSiteInstanceStatusInner; +import java.util.Map; + +/** An immutable client-side representation of WebSiteInstanceStatus. */ +public interface WebSiteInstanceStatus { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the state property: The state property. + * + * @return the state value. + */ + SiteRuntimeState state(); + + /** + * Gets the statusUrl property: Link to the GetStatusApi in Kudu. + * + * @return the statusUrl value. + */ + String statusUrl(); + + /** + * Gets the detectorUrl property: Link to the Diagnose and Solve Portal. + * + * @return the detectorUrl value. + */ + String detectorUrl(); + + /** + * Gets the consoleUrl property: Link to the console to web app instance. + * + * @return the consoleUrl value. + */ + String consoleUrl(); + + /** + * Gets the healthCheckUrl property: Link to the console to web app instance. + * + * @return the healthCheckUrl value. + */ + String healthCheckUrl(); + + /** + * Gets the containers property: Dictionary of <ContainerInfo>. + * + * @return the containers value. + */ + Map containers(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.WebSiteInstanceStatusInner object. + * + * @return the inner object. + */ + WebSiteInstanceStatusInner innerModel(); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WindowsJavaContainerSettings.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WindowsJavaContainerSettings.java new file mode 100644 index 0000000000000..64edeb5af4a3f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WindowsJavaContainerSettings.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.appservice.generated.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Windows Java Container settings. */ +@Immutable +public final class WindowsJavaContainerSettings { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WindowsJavaContainerSettings.class); + + /* + * Java container (runtime only). + */ + @JsonProperty(value = "javaContainer", access = JsonProperty.Access.WRITE_ONLY) + private String javaContainer; + + /* + * Java container version (runtime only). + */ + @JsonProperty(value = "javaContainerVersion", access = JsonProperty.Access.WRITE_ONLY) + private String javaContainerVersion; + + /* + * true if the stack is in preview; otherwise, + * false. + */ + @JsonProperty(value = "isPreview", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isPreview; + + /* + * true if the stack is deprecated; otherwise, + * false. + */ + @JsonProperty(value = "isDeprecated", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDeprecated; + + /* + * true if the stack should be hidden; otherwise, + * false. + */ + @JsonProperty(value = "isHidden", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isHidden; + + /* + * End-of-life date for the minor version. + */ + @JsonProperty(value = "endOfLifeDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endOfLifeDate; + + /* + * true if the stack version is auto-updated; otherwise, + * false. + */ + @JsonProperty(value = "isAutoUpdate", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isAutoUpdate; + + /* + * true if the minor version is early-access; otherwise, + * false. + */ + @JsonProperty(value = "isEarlyAccess", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isEarlyAccess; + + /** + * Get the javaContainer property: Java container (runtime only). + * + * @return the javaContainer value. + */ + public String javaContainer() { + return this.javaContainer; + } + + /** + * Get the javaContainerVersion property: Java container version (runtime only). + * + * @return the javaContainerVersion value. + */ + public String javaContainerVersion() { + return this.javaContainerVersion; + } + + /** + * Get the isPreview property: <code>true</code> if the stack is in preview; otherwise, + * <code>false</code>. + * + * @return the isPreview value. + */ + public Boolean isPreview() { + return this.isPreview; + } + + /** + * Get the isDeprecated property: <code>true</code> if the stack is deprecated; otherwise, + * <code>false</code>. + * + * @return the isDeprecated value. + */ + public Boolean isDeprecated() { + return this.isDeprecated; + } + + /** + * Get the isHidden property: <code>true</code> if the stack should be hidden; otherwise, + * <code>false</code>. + * + * @return the isHidden value. + */ + public Boolean isHidden() { + return this.isHidden; + } + + /** + * Get the endOfLifeDate property: End-of-life date for the minor version. + * + * @return the endOfLifeDate value. + */ + public OffsetDateTime endOfLifeDate() { + return this.endOfLifeDate; + } + + /** + * Get the isAutoUpdate property: <code>true</code> if the stack version is auto-updated; otherwise, + * <code>false</code>. + * + * @return the isAutoUpdate value. + */ + public Boolean isAutoUpdate() { + return this.isAutoUpdate; + } + + /** + * Get the isEarlyAccess property: <code>true</code> if the minor version is early-access; otherwise, + * <code>false</code>. + * + * @return the isEarlyAccess value. + */ + public Boolean isEarlyAccess() { + return this.isEarlyAccess; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerPoolCollection.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerPoolCollection.java new file mode 100644 index 0000000000000..44d63862c0834 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerPoolCollection.java @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appservice.generated.fluent.models.WorkerPoolResourceInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of worker pools. */ +@Fluent +public final class WorkerPoolCollection { + @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkerPoolCollection.class); + + /* + * 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; + + /** + * 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 WorkerPoolCollection object itself. + */ + public WorkerPoolCollection 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 WorkerPoolCollection")); + } else { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerPoolResource.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerPoolResource.java new file mode 100644 index 0000000000000..e33b98941a986 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerPoolResource.java @@ -0,0 +1,304 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.models; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.WorkerPoolResourceInner; +import java.util.List; + +/** An immutable client-side representation of WorkerPoolResource. */ +public interface WorkerPoolResource { + /** + * 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 kind property: Kind of resource. + * + * @return the kind value. + */ + String kind(); + + /** + * Gets the sku property: Description of a SKU for a scalable resource. + * + * @return the sku value. + */ + SkuDescription sku(); + + /** + * Gets the workerSizeId property: Worker size ID for referencing this worker pool. + * + * @return the workerSizeId value. + */ + Integer workerSizeId(); + + /** + * Gets the computeMode property: Shared or dedicated app hosting. + * + * @return the computeMode value. + */ + ComputeModeOptions computeMode(); + + /** + * Gets the workerSize property: VM size of the worker pool instances. + * + * @return the workerSize value. + */ + String workerSize(); + + /** + * Gets the workerCount property: Number of instances in the worker pool. + * + * @return the workerCount value. + */ + Integer workerCount(); + + /** + * Gets the instanceNames property: Names of all instances in the worker pool (read only). + * + * @return the instanceNames value. + */ + List instanceNames(); + + /** + * Gets the inner com.azure.resourcemanager.appservice.generated.fluent.models.WorkerPoolResourceInner object. + * + * @return the inner object. + */ + WorkerPoolResourceInner innerModel(); + + /** The entirety of the WorkerPoolResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The WorkerPoolResource definition stages. */ + interface DefinitionStages { + /** The first stage of the WorkerPoolResource definition. */ + interface Blank extends WithParentResource { + } + /** The stage of the WorkerPoolResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, name. + * + * @param resourceGroupName Name of the resource group to which the resource belongs. + * @param name Name of the App Service Environment. + * @return the next definition stage. + */ + WithCreate withExistingHostingEnvironment(String resourceGroupName, String name); + } + /** + * The stage of the WorkerPoolResource 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.WithKind, + DefinitionStages.WithSku, + DefinitionStages.WithWorkerSizeId, + DefinitionStages.WithComputeMode, + DefinitionStages.WithWorkerSize, + DefinitionStages.WithWorkerCount { + /** + * Executes the create request. + * + * @return the created resource. + */ + WorkerPoolResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + WorkerPoolResource create(Context context); + } + /** The stage of the WorkerPoolResource definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } + /** The stage of the WorkerPoolResource definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Description of a SKU for a scalable resource.. + * + * @param sku Description of a SKU for a scalable resource. + * @return the next definition stage. + */ + WithCreate withSku(SkuDescription sku); + } + /** The stage of the WorkerPoolResource definition allowing to specify workerSizeId. */ + interface WithWorkerSizeId { + /** + * Specifies the workerSizeId property: Worker size ID for referencing this worker pool.. + * + * @param workerSizeId Worker size ID for referencing this worker pool. + * @return the next definition stage. + */ + WithCreate withWorkerSizeId(Integer workerSizeId); + } + /** The stage of the WorkerPoolResource definition allowing to specify computeMode. */ + interface WithComputeMode { + /** + * Specifies the computeMode property: Shared or dedicated app hosting.. + * + * @param computeMode Shared or dedicated app hosting. + * @return the next definition stage. + */ + WithCreate withComputeMode(ComputeModeOptions computeMode); + } + /** The stage of the WorkerPoolResource definition allowing to specify workerSize. */ + interface WithWorkerSize { + /** + * Specifies the workerSize property: VM size of the worker pool instances.. + * + * @param workerSize VM size of the worker pool instances. + * @return the next definition stage. + */ + WithCreate withWorkerSize(String workerSize); + } + /** The stage of the WorkerPoolResource definition allowing to specify workerCount. */ + interface WithWorkerCount { + /** + * Specifies the workerCount property: Number of instances in the worker pool.. + * + * @param workerCount Number of instances in the worker pool. + * @return the next definition stage. + */ + WithCreate withWorkerCount(Integer workerCount); + } + } + /** + * Begins update for the WorkerPoolResource resource. + * + * @return the stage of resource update. + */ + WorkerPoolResource.Update update(); + + /** The template for WorkerPoolResource update. */ + interface Update + extends UpdateStages.WithKind, + UpdateStages.WithSku, + UpdateStages.WithWorkerSizeId, + UpdateStages.WithComputeMode, + UpdateStages.WithWorkerSize, + UpdateStages.WithWorkerCount { + /** + * Executes the update request. + * + * @return the updated resource. + */ + WorkerPoolResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + WorkerPoolResource apply(Context context); + } + /** The WorkerPoolResource update stages. */ + interface UpdateStages { + /** The stage of the WorkerPoolResource update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of resource.. + * + * @param kind Kind of resource. + * @return the next definition stage. + */ + Update withKind(String kind); + } + /** The stage of the WorkerPoolResource update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: Description of a SKU for a scalable resource.. + * + * @param sku Description of a SKU for a scalable resource. + * @return the next definition stage. + */ + Update withSku(SkuDescription sku); + } + /** The stage of the WorkerPoolResource update allowing to specify workerSizeId. */ + interface WithWorkerSizeId { + /** + * Specifies the workerSizeId property: Worker size ID for referencing this worker pool.. + * + * @param workerSizeId Worker size ID for referencing this worker pool. + * @return the next definition stage. + */ + Update withWorkerSizeId(Integer workerSizeId); + } + /** The stage of the WorkerPoolResource update allowing to specify computeMode. */ + interface WithComputeMode { + /** + * Specifies the computeMode property: Shared or dedicated app hosting.. + * + * @param computeMode Shared or dedicated app hosting. + * @return the next definition stage. + */ + Update withComputeMode(ComputeModeOptions computeMode); + } + /** The stage of the WorkerPoolResource update allowing to specify workerSize. */ + interface WithWorkerSize { + /** + * Specifies the workerSize property: VM size of the worker pool instances.. + * + * @param workerSize VM size of the worker pool instances. + * @return the next definition stage. + */ + Update withWorkerSize(String workerSize); + } + /** The stage of the WorkerPoolResource update allowing to specify workerCount. */ + interface WithWorkerCount { + /** + * Specifies the workerCount property: Number of instances in the worker pool.. + * + * @param workerCount Number of instances in the worker pool. + * @return the next definition stage. + */ + Update withWorkerCount(Integer workerCount); + } + } + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + WorkerPoolResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + WorkerPoolResource refresh(Context context); +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerSizeOptions.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerSizeOptions.java new file mode 100644 index 0000000000000..d0e4e04c0e0b8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/WorkerSizeOptions.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.appservice.generated.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for WorkerSizeOptions. */ +public enum WorkerSizeOptions { + /** Enum value Small. */ + SMALL("Small"), + + /** Enum value Medium. */ + MEDIUM("Medium"), + + /** Enum value Large. */ + LARGE("Large"), + + /** Enum value D1. */ + D1("D1"), + + /** Enum value D2. */ + D2("D2"), + + /** Enum value D3. */ + D3("D3"), + + /** Enum value SmallV3. */ + SMALL_V3("SmallV3"), + + /** Enum value MediumV3. */ + MEDIUM_V3("MediumV3"), + + /** Enum value LargeV3. */ + LARGE_V3("LargeV3"), + + /** Enum value NestedSmall. */ + NESTED_SMALL("NestedSmall"), + + /** Enum value NestedSmallLinux. */ + NESTED_SMALL_LINUX("NestedSmallLinux"), + + /** Enum value Default. */ + DEFAULT("Default"); + + /** The actual serialized value for a WorkerSizeOptions instance. */ + private final String value; + + WorkerSizeOptions(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a WorkerSizeOptions instance. + * + * @param value the serialized value to parse. + * @return the parsed WorkerSizeOptions object, or null if unable to parse. + */ + @JsonCreator + public static WorkerSizeOptions fromString(String value) { + WorkerSizeOptions[] items = WorkerSizeOptions.values(); + for (WorkerSizeOptions item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/package-info.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/package-info.java new file mode 100644 index 0000000000000..00ebf2dbfbd6a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/models/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the data models for WebSiteManagementClient. WebSite Management Client. */ +package com.azure.resourcemanager.appservice.generated.models; diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/package-info.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/package-info.java new file mode 100644 index 0000000000000..e2cdac70985e3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/package-info.java @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** Package containing the classes for WebSiteManagementClient. WebSite Management Client. */ +package com.azure.resourcemanager.appservice.generated; diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/module-info.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/module-info.java new file mode 100644 index 0000000000000..20a042339e430 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/module-info.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +module com.azure.resourcemanager.appservice.generated { + requires transitive com.azure.core.management; + + exports com.azure.resourcemanager.appservice.generated; + exports com.azure.resourcemanager.appservice.generated.fluent; + exports com.azure.resourcemanager.appservice.generated.fluent.models; + exports com.azure.resourcemanager.appservice.generated.models; + + opens com.azure.resourcemanager.appservice.generated.fluent.models to + com.azure.core, + com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.appservice.generated.models to + com.azure.core, + com.fasterxml.jackson.databind; +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsSamples.java new file mode 100644 index 0000000000000..e02ef92dae6c2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for AppServiceEnvironments GetInboundNetworkDependenciesEndpoints. */ +public final class AppServiceEnvironmentsGetInboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetInboundNetworkDependenciesEndpoints.json + */ + /** + * Sample code: Get Inbound Network Dependencies Endpoints. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getInboundNetworkDependenciesEndpoints( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .appServiceEnvironments() + .getInboundNetworkDependenciesEndpoints("Sample-WestUSResourceGroup", "SampleAse", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsSamples.java new file mode 100644 index 0000000000000..72588e28b7d24 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for AppServiceEnvironments GetOutboundNetworkDependenciesEndpoints. */ +public final class AppServiceEnvironmentsGetOutboundNetworkDependenciesEndpointsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetOutboundNetworkDependenciesEndpoints.json + */ + /** + * Sample code: Get Outbound Network Dependencies Endpoints. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getOutboundNetworkDependenciesEndpoints( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .appServiceEnvironments() + .getOutboundNetworkDependenciesEndpoints("Sample-WestUSResourceGroup", "SampleAse", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansCreateOrUpdateSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..a45f992e80c23 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansCreateOrUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; + +/** Samples for AppServicePlans CreateOrUpdate. */ +public final class AppServicePlansCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateAppServicePlan.json + */ + /** + * Sample code: Create Or Update App Service plan. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateAppServicePlan( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .appServicePlans() + .define("testsf6141") + .withRegion("East US") + .withExistingResourceGroup("testrg123") + .withSku( + new SkuDescription().withName("P1").withTier("Premium").withSize("P1").withFamily("P").withCapacity(1)) + .withKind("app") + .create(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansDeleteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansDeleteSamples.java new file mode 100644 index 0000000000000..c456a01756ac4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansDeleteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for AppServicePlans Delete. */ +public final class AppServicePlansDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteAppServicePlan.json + */ + /** + * Sample code: Delete App Service plan. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAppServicePlan(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.appServicePlans().deleteWithResponse("testrg123", "testsf6141", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansGetByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..7ccb7e5b48370 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansGetByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for AppServicePlans GetByResourceGroup. */ +public final class AppServicePlansGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetAppServicePlan.json + */ + /** + * Sample code: Get App Service plan. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppServicePlan(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.appServicePlans().getByResourceGroupWithResponse("testrg123", "testsf6141", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansListByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansListByResourceGroupSamples.java new file mode 100644 index 0000000000000..597d2d39c5b93 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansListByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for AppServicePlans ListByResourceGroup. */ +public final class AppServicePlansListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListAppServicePlansByResourceGroup.json + */ + /** + * Sample code: List App Service plans by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppServicePlansByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.appServicePlans().listByResourceGroup("testrg123", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansListSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansListSamples.java new file mode 100644 index 0000000000000..4716fc0e044c7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansListSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for AppServicePlans List. */ +public final class AppServicePlansListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListAppServicePlans.json + */ + /** + * Sample code: List App Service plans. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppServicePlans(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.appServicePlans().list(null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansUpdateSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansUpdateSamples.java new file mode 100644 index 0000000000000..d8c1db6663624 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/AppServicePlansUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.AppServicePlan; + +/** Samples for AppServicePlans Update. */ +public final class AppServicePlansUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/PatchAppServicePlan.json + */ + /** + * Sample code: Patch Service plan. + * + * @param manager Entry point to AppServiceManager. + */ + public static void patchServicePlan(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + AppServicePlan resource = + manager + .appServicePlans() + .getByResourceGroupWithResponse("testrg123", "testsf6141", Context.NONE) + .getValue(); + resource.update().withKind("app").apply(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseSamples.java new file mode 100644 index 0000000000000..cb6e232a4d8af --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for CertificateOrdersDiagnostics GetAppServiceCertificateOrderDetectorResponse. */ +public final class CertificateOrdersDiagnosticsGetAppServiceCertificateOrderDetectorResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-01/examples/Diagnostics_GetAppServiceCertificateOrderDetectorResponse.json + */ + /** + * Sample code: Get app service certificate order detector response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppServiceCertificateOrderDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .certificateOrdersDiagnostics() + .getAppServiceCertificateOrderDetectorResponseWithResponse( + "Sample-WestUSResourceGroup", + "SampleCertificateOrderName", + "AutoRenewStatus", + null, + null, + null, + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseSamples.java new file mode 100644 index 0000000000000..b80073e667013 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for CertificateOrdersDiagnostics ListAppServiceCertificateOrderDetectorResponse. */ +public final class CertificateOrdersDiagnosticsListAppServiceCertificateOrderDetectorResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-01/examples/Diagnostics_ListAppServiceCertificateOrderDetectorResponse.json + */ + /** + * Sample code: List app service certificate detector response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppServiceCertificateDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .certificateOrdersDiagnostics() + .listAppServiceCertificateOrderDetectorResponse( + "Sample-WestUSResourceGroup", "SampleCertificateOrderName", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateRegistrationProviderListOperationsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateRegistrationProviderListOperationsSamples.java new file mode 100644 index 0000000000000..6f4ab4bbfb47f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificateRegistrationProviderListOperationsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for CertificateRegistrationProvider ListOperations. */ +public final class CertificateRegistrationProviderListOperationsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.CertificateRegistration/stable/2021-03-01/examples/ListOperations.json + */ + /** + * Sample code: List operations. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listOperations(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificateRegistrationProviders().listOperations(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..73beaedd163e5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesCreateOrUpdateSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import java.util.Arrays; + +/** Samples for Certificates CreateOrUpdate. */ +public final class CertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateCertificate.json + */ + /** + * Sample code: Create Or Update Certificate. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateCertificate( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .certificates() + .define("testc6282") + .withRegion("East US") + .withExistingResourceGroup("testrg123") + .withPassword("") + .withHostNames(Arrays.asList("ServerCert")) + .create(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesDeleteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesDeleteSamples.java new file mode 100644 index 0000000000000..9b35849957d43 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesDeleteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Certificates Delete. */ +public final class CertificatesDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteCertificate.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificates().deleteWithResponse("testrg123", "testc6282", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesGetByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..a239880e0dbac --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesGetByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Certificates GetByResourceGroup. */ +public final class CertificatesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetCertificate.json + */ + /** + * Sample code: Get Certificate. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getCertificate(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificates().getByResourceGroupWithResponse("testrg123", "testc6282", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesListByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesListByResourceGroupSamples.java new file mode 100644 index 0000000000000..53a829c7f07e8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesListByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Certificates ListByResourceGroup. */ +public final class CertificatesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListCertificatesByResourceGroup.json + */ + /** + * Sample code: List Certificates by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listCertificatesByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificates().listByResourceGroup("testrg123", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesListSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesListSamples.java new file mode 100644 index 0000000000000..25ae5506769e8 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesListSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Certificates List. */ +public final class CertificatesListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListCertificates.json + */ + /** + * Sample code: List Certificates for subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listCertificatesForSubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.certificates().list(null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesUpdateSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesUpdateSamples.java new file mode 100644 index 0000000000000..1535cbd40efcf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/CertificatesUpdateSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.Certificate; + +/** Samples for Certificates Update. */ +public final class CertificatesUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/PatchCertificate.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to AppServiceManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + Certificate resource = + manager.certificates().getByResourceGroupWithResponse("testrg123", "testc6282", Context.NONE).getValue(); + resource.update().apply(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..94424836ef975 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsCreateOrUpdateSamples.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.resourcemanager.appservice.generated.models.Configuration; +import com.azure.resourcemanager.appservice.generated.models.Container; +import com.azure.resourcemanager.appservice.generated.models.CustomScaleRule; +import com.azure.resourcemanager.appservice.generated.models.Dapr; +import com.azure.resourcemanager.appservice.generated.models.Ingress; +import com.azure.resourcemanager.appservice.generated.models.Scale; +import com.azure.resourcemanager.appservice.generated.models.ScaleRule; +import com.azure.resourcemanager.appservice.generated.models.Template; +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/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateContainerApp.json + */ + /** + * Sample code: Create or Update Container App. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateContainerApp( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withKind("containerApp") + .withKubeEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.Web/kubeEnvironments/demokube") + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000))) + .withTemplate( + new Template() + .withContainers( + Arrays + .asList( + new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0"))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("httpscalingrule") + .withCustom( + new CustomScaleRule() + .withType("http") + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withDapr(new Dapr().withEnabled(true).withAppPort(3000))) + .create(); + } + + @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/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsDeleteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsDeleteSamples.java new file mode 100644 index 0000000000000..325dd0913bca0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsDeleteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerApps Delete. */ +public final class ContainerAppsDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteContainerApp.json + */ + /** + * Sample code: Delete Container App. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteContainerApp(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().delete("rg", "testWorkerApp0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsGetByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..ce4da016d49ab --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsGetByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerApps GetByResourceGroup. */ +public final class ContainerAppsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetContainerApp.json + */ + /** + * Sample code: Get Container App. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getContainerApp(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..91d59e04e6254 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerApps ListByResourceGroup. */ +public final class ContainerAppsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppsByResourceGroup.json + */ + /** + * Sample code: List Container Apps by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listContainerAppsByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().listByResourceGroup("rg", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListSamples.java new file mode 100644 index 0000000000000..fea71b9e578a2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerApps List. */ +public final class ContainerAppsListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppsBySubscription.json + */ + /** + * Sample code: List Container Apps by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listContainerAppsByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().list(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListSecretsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListSecretsSamples.java new file mode 100644 index 0000000000000..53001275fee2c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsListSecretsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerApps ListSecrets. */ +public final class ContainerAppsListSecretsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListContainerAppSecrets.json + */ + /** + * Sample code: List Container Apps Secrets. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listContainerAppsSecrets( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerApps().listSecretsWithResponse("testcontainerApp0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsActivateRevisionSamples.java new file mode 100644 index 0000000000000..750626a7e7ffd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsActivateRevisionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions ActivateRevision. */ +public final class ContainerAppsRevisionsActivateRevisionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ActivateRevision.json + */ + /** + * Sample code: Activate Container App's revision. + * + * @param manager Entry point to AppServiceManager. + */ + public static void activateContainerAppSRevision( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerAppsRevisions() + .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java new file mode 100644 index 0000000000000..2c9ef88c49f56 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsDeactivateRevisionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions DeactivateRevision. */ +public final class ContainerAppsRevisionsDeactivateRevisionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeactivateRevision.json + */ + /** + * Sample code: Deactivate Container App's revision. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deactivateContainerAppSRevision( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerAppsRevisions() + .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsGetRevisionSamples.java new file mode 100644 index 0000000000000..8cc4ef26d256d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsGetRevisionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions GetRevision. */ +public final class ContainerAppsRevisionsGetRevisionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetRevision.json + */ + /** + * Sample code: Get Container App's revision. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getContainerAppSRevision( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerAppsRevisions() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsListRevisionsSamples.java new file mode 100644 index 0000000000000..8bbd12123079f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsListRevisionsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions ListRevisions. */ +public final class ContainerAppsRevisionsListRevisionsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListRevisions.json + */ + /** + * Sample code: List Container App's revisions. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listContainerAppSRevisions( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsRestartRevisionSamples.java new file mode 100644 index 0000000000000..513fc65bd9e69 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ContainerAppsRevisionsRestartRevisionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsRevisions RestartRevision. */ +public final class ContainerAppsRevisionsRestartRevisionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/RestartRevision.json + */ + /** + * Sample code: Restart Container App's revision. + * + * @param manager Entry point to AppServiceManager. + */ + public static void restartContainerAppSRevision( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .containerAppsRevisions() + .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DeletedWebAppsGetDeletedWebAppByLocationSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DeletedWebAppsGetDeletedWebAppByLocationSamples.java new file mode 100644 index 0000000000000..b8adb000877f0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DeletedWebAppsGetDeletedWebAppByLocationSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for DeletedWebApps GetDeletedWebAppByLocation. */ +public final class DeletedWebAppsGetDeletedWebAppByLocationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetDeletedWebAppByLocation.json + */ + /** + * Sample code: Get Deleted Web App by Location. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDeletedWebAppByLocation( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.deletedWebApps().getDeletedWebAppByLocationWithResponse("West US 2", "9", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DeletedWebAppsListByLocationSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DeletedWebAppsListByLocationSamples.java new file mode 100644 index 0000000000000..e29054aa13436 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DeletedWebAppsListByLocationSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for DeletedWebApps ListByLocation. */ +public final class DeletedWebAppsListByLocationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListDeletedWebAppsByLocation.json + */ + /** + * Sample code: List Deleted Web App by Location. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listDeletedWebAppByLocation( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.deletedWebApps().listByLocation("West US 2", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteAnalysisSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteAnalysisSamples.java new file mode 100644 index 0000000000000..f620e64c20087 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteAnalysisSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ExecuteSiteAnalysis. */ +public final class DiagnosticsExecuteSiteAnalysisSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysis.json + */ + /** + * Sample code: Execute site analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteAnalysisWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "availability", + "apprestartanalyses", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json + */ + /** + * Sample code: Execute site slot analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteSlotAnalysis( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteAnalysisWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "availability", + "apprestartanalyses", + null, + null, + null, + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteAnalysisSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteAnalysisSlotSamples.java new file mode 100644 index 0000000000000..bf2fb7b3d01ba --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteAnalysisSlotSamples.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ExecuteSiteAnalysisSlot. */ +public final class DiagnosticsExecuteSiteAnalysisSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysis.json + */ + /** + * Sample code: Execute site analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteAnalysisSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "availability", + "apprestartanalyses", + "Production", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteAnalysisSlot.json + */ + /** + * Sample code: Execute site slot analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteSlotAnalysis( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteAnalysisSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "availability", + "apprestartanalyses", + "staging", + null, + null, + null, + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteDetectorSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteDetectorSamples.java new file mode 100644 index 0000000000000..37102bc585e5d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteDetectorSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ExecuteSiteDetector. */ +public final class DiagnosticsExecuteSiteDetectorSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetector.json + */ + /** + * Sample code: Execute site detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteDetectorWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "sitecrashes", + "availability", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json + */ + /** + * Sample code: Execute site slot detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteSlotDetector( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteDetectorWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "sitecrashes", + "availability", + null, + null, + null, + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteDetectorSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteDetectorSlotSamples.java new file mode 100644 index 0000000000000..f1d875f1e6f35 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsExecuteSiteDetectorSlotSamples.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ExecuteSiteDetectorSlot. */ +public final class DiagnosticsExecuteSiteDetectorSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetector.json + */ + /** + * Sample code: Execute site detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteDetectorSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "sitecrashes", + "availability", + "Production", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ExecuteSiteDetectorSlot.json + */ + /** + * Sample code: Execute site slot detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void executeSiteSlotDetector( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .executeSiteDetectorSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "sitecrashes", + "availability", + "staging", + null, + null, + null, + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetHostingEnvironmentDetectorResponseSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetHostingEnvironmentDetectorResponseSamples.java new file mode 100644 index 0000000000000..b47f7513b0f75 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetHostingEnvironmentDetectorResponseSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetHostingEnvironmentDetectorResponse. */ +public final class DiagnosticsGetHostingEnvironmentDetectorResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetHostingEnvironmentDetectorResponse.json + */ + /** + * Sample code: Get App Service Environment Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppServiceEnvironmentDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getHostingEnvironmentDetectorResponseWithResponse( + "Sample-WestUSResourceGroup", + "SampleAppServiceEnvironment", + "runtimeavailability", + null, + null, + null, + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteAnalysisSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteAnalysisSamples.java new file mode 100644 index 0000000000000..96f266fd1bf39 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteAnalysisSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteAnalysis. */ +public final class DiagnosticsGetSiteAnalysisSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysisSlot.json + */ + /** + * Sample code: Get App Slot Analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteAnalysisWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysis.json + */ + /** + * Sample code: Get App Analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteAnalysisWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteAnalysisSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteAnalysisSlotSamples.java new file mode 100644 index 0000000000000..c43612a1ca500 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteAnalysisSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteAnalysisSlot. */ +public final class DiagnosticsGetSiteAnalysisSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysisSlot.json + */ + /** + * Sample code: Get App Slot Analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteAnalysisSlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", "staging", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteAnalysis.json + */ + /** + * Sample code: Get App Analysis. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppAnalysis(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteAnalysisSlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "appanalysis", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorResponseSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorResponseSamples.java new file mode 100644 index 0000000000000..bf3dc8e0fc579 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorResponseSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDetectorResponse. */ +public final class DiagnosticsGetSiteDetectorResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + */ + /** + * Sample code: Get App Slot Detector Response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorResponseWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "runtimeavailability", null, null, null, Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponse.json + */ + /** + * Sample code: Get App Detector Response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorResponseWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "runtimeavailability", null, null, null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorResponseSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorResponseSlotSamples.java new file mode 100644 index 0000000000000..5781ea18c7219 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorResponseSlotSamples.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDetectorResponseSlot. */ +public final class DiagnosticsGetSiteDetectorResponseSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponseSlot.json + */ + /** + * Sample code: Get App Slot Detector Response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorResponseSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "runtimeavailability", + "staging", + null, + null, + null, + Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorResponse.json + */ + /** + * Sample code: Get App Detector Response. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetectorResponse( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorResponseSlotWithResponse( + "Sample-WestUSResourceGroup", + "SampleApp", + "runtimeavailability", + "staging", + null, + null, + null, + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorSamples.java new file mode 100644 index 0000000000000..1e782ccfc0d08 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDetector. */ +public final class DiagnosticsGetSiteDetectorSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetector.json + */ + /** + * Sample code: Get App Detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorSlot.json + */ + /** + * Sample code: Get App Slot Detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorSlotSamples.java new file mode 100644 index 0000000000000..435a972210657 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDetectorSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDetectorSlot. */ +public final class DiagnosticsGetSiteDetectorSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetector.json + */ + /** + * Sample code: Get App Detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorSlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", "Production", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDetectorSlot.json + */ + /** + * Sample code: Get App Slot Detector. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetector(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDetectorSlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "sitecrashes", "staging", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDiagnosticCategorySamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDiagnosticCategorySamples.java new file mode 100644 index 0000000000000..f1b843f1bb081 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDiagnosticCategorySamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDiagnosticCategory. */ +public final class DiagnosticsGetSiteDiagnosticCategorySamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + */ + /** + * Sample code: Get App Diagnostic Category. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDiagnosticCategory( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDiagnosticCategoryWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + */ + /** + * Sample code: Get App Slot Diagnostic Category. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDiagnosticCategory( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDiagnosticCategoryWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDiagnosticCategorySlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDiagnosticCategorySlotSamples.java new file mode 100644 index 0000000000000..569885b3add64 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsGetSiteDiagnosticCategorySlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics GetSiteDiagnosticCategorySlot. */ +public final class DiagnosticsGetSiteDiagnosticCategorySlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategory.json + */ + /** + * Sample code: Get App Diagnostic Category. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDiagnosticCategory( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDiagnosticCategorySlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "Production", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_GetSiteDiagnosticCategorySlot.json + */ + /** + * Sample code: Get App Slot Diagnostic Category. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDiagnosticCategory( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .getSiteDiagnosticCategorySlotWithResponse( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "staging", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListHostingEnvironmentDetectorResponsesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListHostingEnvironmentDetectorResponsesSamples.java new file mode 100644 index 0000000000000..1a756be5ca29b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListHostingEnvironmentDetectorResponsesSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListHostingEnvironmentDetectorResponses. */ +public final class DiagnosticsListHostingEnvironmentDetectorResponsesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListHostingEnvironmentDetectorResponses.json + */ + /** + * Sample code: Get App Service Environment Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppServiceEnvironmentDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listHostingEnvironmentDetectorResponses( + "Sample-WestUSResourceGroup", "SampleAppServiceEnvironment", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteAnalysesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteAnalysesSamples.java new file mode 100644 index 0000000000000..172b331621b20 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteAnalysesSamples.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteAnalyses. */ +public final class DiagnosticsListSiteAnalysesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalyses.json + */ + /** + * Sample code: List App Analyses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppAnalyses(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteAnalyses("Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalysesSlot.json + */ + /** + * Sample code: List App Slot Analyses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotAnalyses(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteAnalyses("Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteAnalysesSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteAnalysesSlotSamples.java new file mode 100644 index 0000000000000..7006d466e3f47 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteAnalysesSlotSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteAnalysesSlot. */ +public final class DiagnosticsListSiteAnalysesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalyses.json + */ + /** + * Sample code: List App Analyses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppAnalyses(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteAnalysesSlot( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "Production", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteAnalysesSlot.json + */ + /** + * Sample code: List App Slot Analyses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotAnalyses(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteAnalysesSlot("Sample-WestUSResourceGroup", "SampleApp", "availability", "staging", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorResponsesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorResponsesSamples.java new file mode 100644 index 0000000000000..32d757b387580 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorResponsesSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDetectorResponses. */ +public final class DiagnosticsListSiteDetectorResponsesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json + */ + /** + * Sample code: Get App Slot Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteDetectorResponses("Sample-WestUSResourceGroup", "SampleApp", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponses.json + */ + /** + * Sample code: Get App Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteDetectorResponses("Sample-WestUSResourceGroup", "SampleApp", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorResponsesSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorResponsesSlotSamples.java new file mode 100644 index 0000000000000..60e99779d6f5f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorResponsesSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDetectorResponsesSlot. */ +public final class DiagnosticsListSiteDetectorResponsesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponsesSlot.json + */ + /** + * Sample code: Get App Slot Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSlotDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectorResponsesSlot("Sample-WestUSResourceGroup", "SampleApp", "staging", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorResponses.json + */ + /** + * Sample code: Get App Detector Responses. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppDetectorResponses( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectorResponsesSlot("Sample-WestUSResourceGroup", "SampleApp", "staging", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorsSamples.java new file mode 100644 index 0000000000000..6e4954cfeed8b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDetectors. */ +public final class DiagnosticsListSiteDetectorsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectors.json + */ + /** + * Sample code: List App Detectors. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppDetectors(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectors("Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorsSlot.json + */ + /** + * Sample code: List App Slot Detectors. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotDetectors(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectors("Sample-WestUSResourceGroup", "SampleApp", "availability", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorsSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorsSlotSamples.java new file mode 100644 index 0000000000000..9c8d6e314f111 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDetectorsSlotSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDetectorsSlot. */ +public final class DiagnosticsListSiteDetectorsSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectors.json + */ + /** + * Sample code: List App Detectors. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppDetectors(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectorsSlot( + "Sample-WestUSResourceGroup", "SampleApp", "availability", "Production", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDetectorsSlot.json + */ + /** + * Sample code: List App Slot Detectors. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotDetectors(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDetectorsSlot("Sample-WestUSResourceGroup", "SampleApp", "availability", "staging", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDiagnosticCategoriesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDiagnosticCategoriesSamples.java new file mode 100644 index 0000000000000..f7aaebd79972d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDiagnosticCategoriesSamples.java @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDiagnosticCategories. */ +public final class DiagnosticsListSiteDiagnosticCategoriesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json + */ + /** + * Sample code: List App Slot Diagnostic Categories. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotDiagnosticCategories( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteDiagnosticCategories("Sample-WestUSResourceGroup", "SampleApp", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategories.json + */ + /** + * Sample code: List App Diagnostic Categories. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppDiagnosticCategories( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.diagnostics().listSiteDiagnosticCategories("Sample-WestUSResourceGroup", "SampleApp", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDiagnosticCategoriesSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDiagnosticCategoriesSlotSamples.java new file mode 100644 index 0000000000000..c0599c3cc17d7 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DiagnosticsListSiteDiagnosticCategoriesSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Diagnostics ListSiteDiagnosticCategoriesSlot. */ +public final class DiagnosticsListSiteDiagnosticCategoriesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategoriesSlot.json + */ + /** + * Sample code: List App Slot Diagnostic Categories. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppSlotDiagnosticCategories( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDiagnosticCategoriesSlot("Sample-WestUSResourceGroup", "SampleApp", "staging", Context.NONE); + } + + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/Diagnostics_ListSiteDiagnosticCategories.json + */ + /** + * Sample code: List App Diagnostic Categories. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listAppDiagnosticCategories( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .diagnostics() + .listSiteDiagnosticCategoriesSlot("Sample-WestUSResourceGroup", "SampleApp", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainRegistrationProviderListOperationsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainRegistrationProviderListOperationsSamples.java new file mode 100644 index 0000000000000..1d7be4cf03905 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainRegistrationProviderListOperationsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for DomainRegistrationProvider ListOperations. */ +public final class DomainRegistrationProviderListOperationsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/ListOperations.json + */ + /** + * Sample code: List operations. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listOperations(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.domainRegistrationProviders().listOperations(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainsRenewSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainsRenewSamples.java new file mode 100644 index 0000000000000..e2bdc566114d5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainsRenewSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Domains Renew. */ +public final class DomainsRenewSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/RenewDomain.json + */ + /** + * Sample code: Renew an existing domain. + * + * @param manager Entry point to AppServiceManager. + */ + public static void renewAnExistingDomain(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.domains().renewWithResponse("RG", "example.com", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainsTransferOutSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainsTransferOutSamples.java new file mode 100644 index 0000000000000..b95a2410a0168 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/DomainsTransferOutSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Domains TransferOut. */ +public final class DomainsTransferOutSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/TransferOutDomain.json + */ + /** + * Sample code: Transfer out domain. + * + * @param manager Entry point to AppServiceManager. + */ + public static void transferOutDomain(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.domains().transferOutWithResponse("testrg123", "example.com", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetDeletedWebAppSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetDeletedWebAppSamples.java new file mode 100644 index 0000000000000..827e21c17f09f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetDeletedWebAppSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Global GetDeletedWebApp. */ +public final class GlobalGetDeletedWebAppSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetDeletedWebApp.json + */ + /** + * Sample code: Get Deleted Web App. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDeletedWebApp(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.globals().getDeletedWebAppWithResponse("9", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetDeletedWebAppSnapshotsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetDeletedWebAppSnapshotsSamples.java new file mode 100644 index 0000000000000..47a15a96a06da --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetDeletedWebAppSnapshotsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Global GetDeletedWebAppSnapshots. */ +public final class GlobalGetDeletedWebAppSnapshotsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetDeletedWebAppSnapshots.json + */ + /** + * Sample code: Get Deleted Web App Snapshots. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDeletedWebAppSnapshots( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.globals().getDeletedWebAppSnapshotsWithResponse("9", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetSubscriptionOperationWithAsyncResponseSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetSubscriptionOperationWithAsyncResponseSamples.java new file mode 100644 index 0000000000000..21c2708e4d45c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/GlobalGetSubscriptionOperationWithAsyncResponseSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Global GetSubscriptionOperationWithAsyncResponse. */ +public final class GlobalGetSubscriptionOperationWithAsyncResponseSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSubscriptionOperationWithAsyncResponse.json + */ + /** + * Sample code: Gets an operation in a subscription and given region. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getsAnOperationInASubscriptionAndGivenRegion( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .globals() + .getSubscriptionOperationWithAsyncResponseWithResponse( + "West US", "34adfa4f-cedf-4dc0-ba29-b6d1a69ab5d5", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsCreateOrUpdateSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..9022c1adccd67 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsCreateOrUpdateSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +/** Samples for KubeEnvironments CreateOrUpdate. */ +public final class KubeEnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_CreateOrUpdate.json + */ + /** + * Sample code: Create kube environments. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createKubeEnvironments( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .kubeEnvironments() + .define("testkubeenv") + .withRegion("East US") + .withExistingResourceGroup("examplerg") + .withStaticIp("1.2.3.4") + .create(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsDeleteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsDeleteSamples.java new file mode 100644 index 0000000000000..2328905d3a643 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsDeleteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for KubeEnvironments Delete. */ +public final class KubeEnvironmentsDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_Delete.json + */ + /** + * Sample code: Delete kube environment by name. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteKubeEnvironmentByName( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.kubeEnvironments().delete("examplerg", "examplekenv", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsGetByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..be031e93381fa --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsGetByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for KubeEnvironments GetByResourceGroup. */ +public final class KubeEnvironmentsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_Get.json + */ + /** + * Sample code: Get kube environments by name. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getKubeEnvironmentsByName( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.kubeEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsListByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsListByResourceGroupSamples.java new file mode 100644 index 0000000000000..47cc4b0e8a631 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsListByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for KubeEnvironments ListByResourceGroup. */ +public final class KubeEnvironmentsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_ListByResourceGroup.json + */ + /** + * Sample code: List kube environments by resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listKubeEnvironmentsByResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.kubeEnvironments().listByResourceGroup("examplerg", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsListSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsListSamples.java new file mode 100644 index 0000000000000..81238ded35d0b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsListSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for KubeEnvironments List. */ +public final class KubeEnvironmentsListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_ListBySubscription.json + */ + /** + * Sample code: List kube environments by subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listKubeEnvironmentsBySubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.kubeEnvironments().list(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsUpdateSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsUpdateSamples.java new file mode 100644 index 0000000000000..09c15a45b5362 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/KubeEnvironmentsUpdateSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.KubeEnvironment; + +/** Samples for KubeEnvironments Update. */ +public final class KubeEnvironmentsUpdateSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/KubeEnvironments_Update.json + */ + /** + * Sample code: Update kube environments. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateKubeEnvironments( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + KubeEnvironment resource = + manager + .kubeEnvironments() + .getByResourceGroupWithResponse("examplerg", "testkubeenv", Context.NONE) + .getValue(); + resource.update().apply(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetFunctionAppStacksForLocationSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetFunctionAppStacksForLocationSamples.java new file mode 100644 index 0000000000000..56876eb187f29 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetFunctionAppStacksForLocationSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Provider GetFunctionAppStacksForLocation. */ +public final class ProviderGetFunctionAppStacksForLocationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetFunctionAppStacksForLocation.json + */ + /** + * Sample code: Get Locations Function App Stacks. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getLocationsFunctionAppStacks( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().getFunctionAppStacksForLocation("westus", null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetFunctionAppStacksSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetFunctionAppStacksSamples.java new file mode 100644 index 0000000000000..6405d8f5b2d85 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetFunctionAppStacksSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Provider GetFunctionAppStacks. */ +public final class ProviderGetFunctionAppStacksSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetFunctionAppStacks.json + */ + /** + * Sample code: Get Function App Stacks. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFunctionAppStacks(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().getFunctionAppStacks(null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetWebAppStacksForLocationSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetWebAppStacksForLocationSamples.java new file mode 100644 index 0000000000000..3edf2f7ece768 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetWebAppStacksForLocationSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Provider GetWebAppStacksForLocation. */ +public final class ProviderGetWebAppStacksForLocationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebAppStacksForLocation.json + */ + /** + * Sample code: Get Locations Web App Stacks. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getLocationsWebAppStacks( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().getWebAppStacksForLocation("westus", null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetWebAppStacksSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetWebAppStacksSamples.java new file mode 100644 index 0000000000000..486eb81a7064c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderGetWebAppStacksSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Provider GetWebAppStacks. */ +public final class ProviderGetWebAppStacksSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebAppStacks.json + */ + /** + * Sample code: Get Web App Stacks. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getWebAppStacks(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().getWebAppStacks(null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderListOperationsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderListOperationsSamples.java new file mode 100644 index 0000000000000..4c285979ccf5f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ProviderListOperationsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for Provider ListOperations. */ +public final class ProviderListOperationsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListOperations.json + */ + /** + * Sample code: List operations. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listOperations(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.providers().listOperations(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataGetBySiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataGetBySiteSamples.java new file mode 100644 index 0000000000000..9566350557919 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataGetBySiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata GetBySite. */ +public final class ResourceHealthMetadataGetBySiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetResourceHealthMetadataBySite.json + */ + /** + * Sample code: Get ResourceHealthMetadata. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getResourceHealthMetadata( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceHealthMetadatas() + .getBySiteWithResponse("Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataGetBySiteSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataGetBySiteSlotSamples.java new file mode 100644 index 0000000000000..82f36f7d61d57 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataGetBySiteSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata GetBySiteSlot. */ +public final class ResourceHealthMetadataGetBySiteSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetResourceHealthMetadataBySite.json + */ + /** + * Sample code: Get ResourceHealthMetadata. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getResourceHealthMetadata( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceHealthMetadatas() + .getBySiteSlotWithResponse( + "Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListByResourceGroupSamples.java new file mode 100644 index 0000000000000..838cb0ab1273d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata ListByResourceGroup. */ +public final class ResourceHealthMetadataListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataByResourceGroup.json + */ + /** + * Sample code: List ResourceHealthMetadata for a resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listResourceHealthMetadataForAResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.resourceHealthMetadatas().listByResourceGroup("Default-Web-NorthCentralUS", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListBySiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListBySiteSamples.java new file mode 100644 index 0000000000000..44fd6b06f84f3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListBySiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata ListBySite. */ +public final class ResourceHealthMetadataListBySiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataBySite.json + */ + /** + * Sample code: List ResourceHealthMetadata for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listResourceHealthMetadataForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceHealthMetadatas() + .listBySite("Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListBySiteSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListBySiteSlotSamples.java new file mode 100644 index 0000000000000..ac58092e4883d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListBySiteSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata ListBySiteSlot. */ +public final class ResourceHealthMetadataListBySiteSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataBySite.json + */ + /** + * Sample code: List ResourceHealthMetadata for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listResourceHealthMetadataForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceHealthMetadatas() + .listBySiteSlot("Default-Web-NorthCentralUS", "newsiteinnewASE-NCUS", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListSamples.java new file mode 100644 index 0000000000000..9b19c4663b253 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceHealthMetadataListSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceHealthMetadata List. */ +public final class ResourceHealthMetadataListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListResourceHealthMetadataBySubscription.json + */ + /** + * Sample code: List ResourceHealthMetadata for a subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listResourceHealthMetadataForASubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.resourceHealthMetadatas().list(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceProviderListCustomHostnameSitesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceProviderListCustomHostnameSitesSamples.java new file mode 100644 index 0000000000000..253c542f8cc96 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceProviderListCustomHostnameSitesSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for ResourceProvider ListCustomHostnameSites. */ +public final class ResourceProviderListCustomHostnameSitesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListCustomHostNameSites.json + */ + /** + * Sample code: Get custom hostnames under subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getCustomHostnamesUnderSubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.resourceProviders().listCustomHostnameSites(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceProviderVerifyHostingEnvironmentVnetSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceProviderVerifyHostingEnvironmentVnetSamples.java new file mode 100644 index 0000000000000..f368ef0a0c9ba --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/ResourceProviderVerifyHostingEnvironmentVnetSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.VnetParameters; + +/** Samples for ResourceProvider VerifyHostingEnvironmentVnet. */ +public final class ResourceProviderVerifyHostingEnvironmentVnetSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/VerifyHostingEnvironmentVnet.json + */ + /** + * Sample code: VerifyHostingEnvironmentVnet. + * + * @param manager Entry point to AppServiceManager. + */ + public static void verifyHostingEnvironmentVnet( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .resourceProviders() + .verifyHostingEnvironmentVnetWithResponse( + new VnetParameters() + .withVnetResourceGroup("vNet123rg") + .withVnetName("vNet123") + .withVnetSubnetName("vNet123SubNet"), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesApproveOrRejectPrivateEndpointConnectionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesApproveOrRejectPrivateEndpointConnectionSamples.java new file mode 100644 index 0000000000000..a13737b498efb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesApproveOrRejectPrivateEndpointConnectionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; + +/** Samples for StaticSites ApproveOrRejectPrivateEndpointConnection. */ +public final class StaticSitesApproveOrRejectPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ApproveRejectSitePrivateEndpointConnection.json + */ + /** + * Sample code: Approves or rejects a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void approvesOrRejectsAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .approveOrRejectPrivateEndpointConnection( + "rg", + "testSite", + "connection", + new PrivateLinkConnectionApprovalRequestResource() + .withPrivateLinkServiceConnectionState( + new PrivateLinkConnectionState() + .withStatus("Approved") + .withDescription("Approved by admin.") + .withActionsRequired("")), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteAppSettingsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteAppSettingsSamples.java new file mode 100644 index 0000000000000..60b3c7f98f7ab --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteAppSettingsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StaticSites CreateOrUpdateStaticSiteAppSettings. */ +public final class StaticSitesCreateOrUpdateStaticSiteAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteAppSettings.json + */ + /** + * Sample code: Creates or updates the app settings of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createsOrUpdatesTheAppSettingsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createOrUpdateStaticSiteAppSettingsWithResponse( + "rg", + "testStaticSite0", + new StringDictionaryInner().withProperties(mapOf("setting1", "someval", "setting2", "someval2")), + 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/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsSamples.java new file mode 100644 index 0000000000000..a30c3f293c078 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StaticSites CreateOrUpdateStaticSiteBuildAppSettings. */ +public final class StaticSitesCreateOrUpdateStaticSiteBuildAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteBuildAppSettings.json + */ + /** + * Sample code: Creates or updates the function app settings of a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createsOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createOrUpdateStaticSiteBuildAppSettingsWithResponse( + "rg", + "testStaticSite0", + "12", + new StringDictionaryInner().withProperties(mapOf("setting1", "someval", "setting2", "someval2")), + 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/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsSamples.java new file mode 100644 index 0000000000000..6079b95278420 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StaticSites CreateOrUpdateStaticSiteBuildFunctionAppSettings. */ +public final class StaticSitesCreateOrUpdateStaticSiteBuildFunctionAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteBuildFunctionAppSettings.json + */ + /** + * Sample code: Creates or updates the function app settings of a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createsOrUpdatesTheFunctionAppSettingsOfAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createOrUpdateStaticSiteBuildFunctionAppSettingsWithResponse( + "rg", + "testStaticSite0", + "12", + new StringDictionaryInner().withProperties(mapOf("setting1", "someval", "setting2", "someval2")), + 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/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteCustomDomainSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteCustomDomainSamples.java new file mode 100644 index 0000000000000..e42f4c9bccf9e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteCustomDomainSamples.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.appservice.generated.generated; + +/** Samples for StaticSites CreateOrUpdateStaticSiteCustomDomain. */ +public final class StaticSitesCreateOrUpdateStaticSiteCustomDomainSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteCustomDomain.json + */ + /** + * Sample code: Create or update a custom domain for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateACustomDomainForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .defineStaticSiteCustomDomain("custom.domain.net") + .withExistingStaticSite("rg", "testStaticSite0") + .create(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsSamples.java new file mode 100644 index 0000000000000..3476d963b5b07 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StringDictionaryInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for StaticSites CreateOrUpdateStaticSiteFunctionAppSettings. */ +public final class StaticSitesCreateOrUpdateStaticSiteFunctionAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSiteFunctionAppSettings.json + */ + /** + * Sample code: Creates or updates the function app settings of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createsOrUpdatesTheFunctionAppSettingsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createOrUpdateStaticSiteFunctionAppSettingsWithResponse( + "rg", + "testStaticSite0", + new StringDictionaryInner().withProperties(mapOf("setting1", "someval", "setting2", "someval2")), + 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/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteSamples.java new file mode 100644 index 0000000000000..1c08484dc2b2c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateOrUpdateStaticSiteSamples.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.appservice.generated.generated; + +import com.azure.resourcemanager.appservice.generated.models.SkuDescription; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildProperties; + +/** Samples for StaticSites CreateOrUpdateStaticSite. */ +public final class StaticSitesCreateOrUpdateStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateOrUpdateStaticSite.json + */ + /** + * Sample code: Create or update a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .defineStaticSite("testStaticSite0") + .withRegion("West US 2") + .withExistingResourceGroup("rg") + .withSku(new SkuDescription().withName("Basic").withTier("Basic")) + .withRepositoryUrl("https://github.com/username/RepoName") + .withBranch("master") + .withRepositoryToken("repoToken123") + .withBuildProperties( + new StaticSiteBuildProperties() + .withAppLocation("app") + .withApiLocation("api") + .withAppArtifactLocation("build")) + .create(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateUserRolesInvitationLinkSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateUserRolesInvitationLinkSamples.java new file mode 100644 index 0000000000000..f0ade2cb46740 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateUserRolesInvitationLinkSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteUserInvitationRequestResource; + +/** Samples for StaticSites CreateUserRolesInvitationLink. */ +public final class StaticSitesCreateUserRolesInvitationLinkSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/CreateUserRolesInvitationLink.json + */ + /** + * Sample code: Create an invitation link for a user for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createAnInvitationLinkForAUserForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createUserRolesInvitationLinkWithResponse( + "rg", + "testStaticSite0", + new StaticSiteUserInvitationRequestResource() + .withDomain("happy-sea-15afae3e.azurestaticwebsites.net") + .withProvider("aad") + .withUserDetails("username") + .withRoles("admin,contributor") + .withNumHoursToExpiration(1), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateZipDeploymentForStaticSiteBuildSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateZipDeploymentForStaticSiteBuildSamples.java new file mode 100644 index 0000000000000..de719bacbf786 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateZipDeploymentForStaticSiteBuildSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteZipDeploymentArmResource; + +/** Samples for StaticSites CreateZipDeploymentForStaticSiteBuild. */ +public final class StaticSitesCreateZipDeploymentForStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StaticSiteBuildZipDeploy.json + */ + /** + * Sample code: Deploy a site from a zipped package to a particular static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deployASiteFromAZippedPackageToAParticularStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createZipDeploymentForStaticSiteBuild( + "rg", + "testStaticSite0", + "12", + new StaticSiteZipDeploymentArmResource() + .withAppZipUrl( + "https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/app-zipdeploy.zip") + .withApiZipUrl( + "https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/api-zipdeploy.zip") + .withDeploymentTitle("Update index.html") + .withProvider("testProvider") + .withFunctionLanguage("testFunctionLanguage"), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateZipDeploymentForStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateZipDeploymentForStaticSiteSamples.java new file mode 100644 index 0000000000000..12a82652676dd --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesCreateZipDeploymentForStaticSiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteZipDeploymentArmResource; + +/** Samples for StaticSites CreateZipDeploymentForStaticSite. */ +public final class StaticSitesCreateZipDeploymentForStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StaticSiteZipDeploy.json + */ + /** + * Sample code: Deploy a site from a zipped package. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deployASiteFromAZippedPackage( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .createZipDeploymentForStaticSite( + "rg", + "testStaticSite0", + new StaticSiteZipDeploymentArmResource() + .withAppZipUrl( + "https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/app-zipdeploy.zip") + .withApiZipUrl( + "https://teststorageaccount.net/happy-sea-15afae3e-master-81828877/api-zipdeploy.zip") + .withDeploymentTitle("Update index.html") + .withProvider("testProvider") + .withFunctionLanguage("testFunctionLanguage"), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeletePrivateEndpointConnectionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeletePrivateEndpointConnectionSamples.java new file mode 100644 index 0000000000000..5cfb268d78fdb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeletePrivateEndpointConnectionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites DeletePrivateEndpointConnection. */ +public final class StaticSitesDeletePrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteSitePrivateEndpointConnection.json + */ + /** + * Sample code: Delete a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().deletePrivateEndpointConnection("rg", "testSite", "connection", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteSamples.java new file mode 100644 index 0000000000000..97d29bb5ef197 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites Delete. */ +public final class StaticSitesDeleteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteStaticSite.json + */ + /** + * Sample code: Delete a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAStaticSite(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().delete("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteBuildSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteBuildSamples.java new file mode 100644 index 0000000000000..05a43f971f383 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteBuildSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites DeleteStaticSiteBuild. */ +public final class StaticSitesDeleteStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteStaticSiteBuild.json + */ + /** + * Sample code: Delete a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().deleteStaticSiteBuild("rg", "testStaticSite0", "12", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteCustomDomainSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteCustomDomainSamples.java new file mode 100644 index 0000000000000..bdd0c5694febf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteCustomDomainSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites DeleteStaticSiteCustomDomain. */ +public final class StaticSitesDeleteStaticSiteCustomDomainSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteStaticSiteCustomDomain.json + */ + /** + * Sample code: Delete a custom domain for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteACustomDomainForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().deleteStaticSiteCustomDomain("rg", "testStaticSite0", "custom.domain.net", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteUserSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteUserSamples.java new file mode 100644 index 0000000000000..4bd3d71814c4b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDeleteStaticSiteUserSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites DeleteStaticSiteUser. */ +public final class StaticSitesDeleteStaticSiteUserSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteStaticSiteUser.json + */ + /** + * Sample code: Delete a user for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAUserForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().deleteStaticSiteUserWithResponse("rg", "testStaticSite0", "aad", "1234", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachStaticSiteSamples.java new file mode 100644 index 0000000000000..ce7d234a24377 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachStaticSiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites DetachStaticSite. */ +public final class StaticSitesDetachStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DetachStaticSite.json + */ + /** + * Sample code: Detach a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void detachAStaticSite(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().detachStaticSite("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildSamples.java new file mode 100644 index 0000000000000..c1aea441fa654 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites DetachUserProvidedFunctionAppFromStaticSiteBuild. */ +public final class StaticSitesDetachUserProvidedFunctionAppFromStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DetachUserProvidedFunctionAppFromStaticSiteBuild.json + */ + /** + * Sample code: Detach the user provided function app from the static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void detachTheUserProvidedFunctionAppFromTheStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .detachUserProvidedFunctionAppFromStaticSiteBuildWithResponse( + "rg", "testStaticSite0", "12", "testFunctionApp", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachUserProvidedFunctionAppFromStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachUserProvidedFunctionAppFromStaticSiteSamples.java new file mode 100644 index 0000000000000..e7c8b4d234f0b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesDetachUserProvidedFunctionAppFromStaticSiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites DetachUserProvidedFunctionAppFromStaticSite. */ +public final class StaticSitesDetachUserProvidedFunctionAppFromStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DetachUserProvidedFunctionAppFromStaticSite.json + */ + /** + * Sample code: Detach the user provided function app from the static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void detachTheUserProvidedFunctionAppFromTheStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .detachUserProvidedFunctionAppFromStaticSiteWithResponse( + "rg", "testStaticSite0", "testFunctionApp", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..3e5bdfaa2be37 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetByResourceGroup. */ +public final class StaticSitesGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSite.json + */ + /** + * Sample code: Get details for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getByResourceGroupWithResponse("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateEndpointConnectionListSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateEndpointConnectionListSamples.java new file mode 100644 index 0000000000000..dabf1e1e67be4 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateEndpointConnectionListSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetPrivateEndpointConnectionList. */ +public final class StaticSitesGetPrivateEndpointConnectionListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateEndpointConnectionList.json + */ + /** + * Sample code: Get a list of private endpoint connections associated with a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAListOfPrivateEndpointConnectionsAssociatedWithASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getPrivateEndpointConnectionList("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateEndpointConnectionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateEndpointConnectionSamples.java new file mode 100644 index 0000000000000..7fc5872431b8a --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateEndpointConnectionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetPrivateEndpointConnection. */ +public final class StaticSitesGetPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateEndpointConnection.json + */ + /** + * Sample code: Get a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getPrivateEndpointConnectionWithResponse("rg", "testSite", "connection", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateLinkResourcesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateLinkResourcesSamples.java new file mode 100644 index 0000000000000..c779fd254a704 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetPrivateLinkResourcesSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetPrivateLinkResources. */ +public final class StaticSitesGetPrivateLinkResourcesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateLinkResources.json + */ + /** + * Sample code: Get private link resources of a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getPrivateLinkResourcesOfASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getPrivateLinkResourcesWithResponse("rg", "testSite", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteBuildSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteBuildSamples.java new file mode 100644 index 0000000000000..86e2b5715a4ae --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteBuildSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetStaticSiteBuild. */ +public final class StaticSitesGetStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSiteBuild.json + */ + /** + * Sample code: Get a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAStaticSiteBuild(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getStaticSiteBuildWithResponse("rg", "testStaticSite0", "12", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteBuildsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteBuildsSamples.java new file mode 100644 index 0000000000000..c27529da95f60 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteBuildsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetStaticSiteBuilds. */ +public final class StaticSitesGetStaticSiteBuildsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSiteBuilds.json + */ + /** + * Sample code: Get all builds for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAllBuildsForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getStaticSiteBuilds("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteCustomDomainSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteCustomDomainSamples.java new file mode 100644 index 0000000000000..2b9d397089a54 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetStaticSiteCustomDomainSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetStaticSiteCustomDomain. */ +public final class StaticSitesGetStaticSiteCustomDomainSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSiteCustomDomain.json + */ + /** + * Sample code: Get custom domain for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getCustomDomainForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .getStaticSiteCustomDomainWithResponse("rg", "testStaticSite0", "custom.domain.net", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildSamples.java new file mode 100644 index 0000000000000..8ef463de0dc46 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetUserProvidedFunctionAppForStaticSiteBuild. */ +public final class StaticSitesGetUserProvidedFunctionAppForStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetUserProvidedFunctionAppForStaticSiteBuild.json + */ + /** + * Sample code: Get details of the user provided function app registered with a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .getUserProvidedFunctionAppForStaticSiteBuildWithResponse( + "rg", "testStaticSite0", "default", "testFunctionApp", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppForStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppForStaticSiteSamples.java new file mode 100644 index 0000000000000..8e4e2f161e1ba --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppForStaticSiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetUserProvidedFunctionAppForStaticSite. */ +public final class StaticSitesGetUserProvidedFunctionAppForStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetUserProvidedFunctionAppForStaticSite.json + */ + /** + * Sample code: Get details of the user provided function app registered with a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsOfTheUserProvidedFunctionAppRegisteredWithAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .getUserProvidedFunctionAppForStaticSiteWithResponse( + "rg", "testStaticSite0", "testFunctionApp", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildSamples.java new file mode 100644 index 0000000000000..9cfd434b29873 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetUserProvidedFunctionAppsForStaticSiteBuild. */ +public final class StaticSitesGetUserProvidedFunctionAppsForStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetUserProvidedFunctionAppsForStaticSiteBuild.json + */ + /** + * Sample code: Get details of the user provided function apps registered with a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .getUserProvidedFunctionAppsForStaticSiteBuild("rg", "testStaticSite0", "default", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppsForStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppsForStaticSiteSamples.java new file mode 100644 index 0000000000000..0414537d6993f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesGetUserProvidedFunctionAppsForStaticSiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites GetUserProvidedFunctionAppsForStaticSite. */ +public final class StaticSitesGetUserProvidedFunctionAppsForStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetUserProvidedFunctionAppsForStaticSite.json + */ + /** + * Sample code: Get details of the user provided function apps registered with a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getDetailsOfTheUserProvidedFunctionAppsRegisteredWithAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().getUserProvidedFunctionAppsForStaticSite("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListByResourceGroupSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListByResourceGroupSamples.java new file mode 100644 index 0000000000000..bf90c63f1bc98 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListByResourceGroupSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListByResourceGroup. */ +public final class StaticSitesListByResourceGroupSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSites.json + */ + /** + * Sample code: Get static sites for a resource group. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getStaticSitesForAResourceGroup( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listByResourceGroup("rg", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListSamples.java new file mode 100644 index 0000000000000..8234601d74101 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites List. */ +public final class StaticSitesListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetAllStaticSites.json + */ + /** + * Sample code: Get all static sites in a subscription. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAllStaticSitesInASubscription( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().list(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteAppSettingsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteAppSettingsSamples.java new file mode 100644 index 0000000000000..81e8a65cd83bc --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteAppSettingsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteAppSettings. */ +public final class StaticSitesListStaticSiteAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteAppSettings.json + */ + /** + * Sample code: Get app settings of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSettingsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteAppSettingsWithResponse("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildAppSettingsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildAppSettingsSamples.java new file mode 100644 index 0000000000000..42f00286f0bf9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildAppSettingsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteBuildAppSettings. */ +public final class StaticSitesListStaticSiteBuildAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteBuildAppSettings.json + */ + /** + * Sample code: Get app settings of a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAppSettingsOfAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteBuildAppSettingsWithResponse("rg", "testStaticSite0", "12", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildFunctionAppSettingsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildFunctionAppSettingsSamples.java new file mode 100644 index 0000000000000..d44ea73973850 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildFunctionAppSettingsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteBuildFunctionAppSettings. */ +public final class StaticSitesListStaticSiteBuildFunctionAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteBuildFunctionAppSettings.json + */ + /** + * Sample code: Get function app settings of a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFunctionAppSettingsOfAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .listStaticSiteBuildFunctionAppSettingsWithResponse("rg", "testStaticSite0", "12", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildFunctionsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildFunctionsSamples.java new file mode 100644 index 0000000000000..5f4a503ef5c54 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteBuildFunctionsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteBuildFunctions. */ +public final class StaticSitesListStaticSiteBuildFunctionsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteBuildFunctions.json + */ + /** + * Sample code: Gets the functions of a particular static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getsTheFunctionsOfAParticularStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteBuildFunctions("rg", "testStaticSite0", "default", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteConfiguredRolesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteConfiguredRolesSamples.java new file mode 100644 index 0000000000000..604b2ae75fecf --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteConfiguredRolesSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteConfiguredRoles. */ +public final class StaticSitesListStaticSiteConfiguredRolesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteConfiguredRoles.json + */ + /** + * Sample code: Lists the configured roles for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listsTheConfiguredRolesForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteConfiguredRolesWithResponse("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteCustomDomainsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteCustomDomainsSamples.java new file mode 100644 index 0000000000000..48e2d4bc311cb --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteCustomDomainsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteCustomDomains. */ +public final class StaticSitesListStaticSiteCustomDomainsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetStaticSiteCustomDomains.json + */ + /** + * Sample code: List custom domains for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listCustomDomainsForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteCustomDomains("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteFunctionAppSettingsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteFunctionAppSettingsSamples.java new file mode 100644 index 0000000000000..95e221232815d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteFunctionAppSettingsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteFunctionAppSettings. */ +public final class StaticSitesListStaticSiteFunctionAppSettingsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteFunctionAppSettings.json + */ + /** + * Sample code: Get function app settings of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFunctionAppSettingsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteFunctionAppSettingsWithResponse("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteFunctionsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteFunctionsSamples.java new file mode 100644 index 0000000000000..87c5fc24d07fe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteFunctionsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteFunctions. */ +public final class StaticSitesListStaticSiteFunctionsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteFunctions.json + */ + /** + * Sample code: Gets the functions of a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getsTheFunctionsOfAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteFunctions("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteSecretsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteSecretsSamples.java new file mode 100644 index 0000000000000..7b46996256998 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteSecretsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteSecrets. */ +public final class StaticSitesListStaticSiteSecretsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteSecrets.json + */ + /** + * Sample code: List secrets for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listSecretsForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteSecretsWithResponse("rg", "testStaticSite0", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteUsersSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteUsersSamples.java new file mode 100644 index 0000000000000..215575e936d9d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesListStaticSiteUsersSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for StaticSites ListStaticSiteUsers. */ +public final class StaticSitesListStaticSiteUsersSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListStaticSiteUsers.json + */ + /** + * Sample code: List users for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listUsersForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.staticSites().listStaticSiteUsers("rg", "testStaticSite0", "all", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesPreviewWorkflowSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesPreviewWorkflowSamples.java new file mode 100644 index 0000000000000..19f7980f2ce35 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesPreviewWorkflowSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteBuildProperties; +import com.azure.resourcemanager.appservice.generated.models.StaticSitesWorkflowPreviewRequest; + +/** Samples for StaticSites PreviewWorkflow. */ +public final class StaticSitesPreviewWorkflowSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GenerateStaticSiteWorkflowPreview.json + */ + /** + * Sample code: Generates a preview workflow file for the static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void generatesAPreviewWorkflowFileForTheStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .previewWorkflowWithResponse( + "West US 2", + new StaticSitesWorkflowPreviewRequest() + .withRepositoryUrl("https://github.com/username/RepoName") + .withBranch("master") + .withBuildProperties( + new StaticSiteBuildProperties() + .withAppLocation("app") + .withApiLocation("api") + .withAppArtifactLocation("build")), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildSamples.java new file mode 100644 index 0000000000000..b0d9da0c40d92 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +/** Samples for StaticSites RegisterUserProvidedFunctionAppWithStaticSiteBuild. */ +public final class StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteBuildSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/RegisterUserProvidedFunctionAppWithStaticSiteBuild.json + */ + /** + * Sample code: Register a user provided function app with a static site build. + * + * @param manager Entry point to AppServiceManager. + */ + public static void registerAUserProvidedFunctionAppWithAStaticSiteBuild( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .defineStaticSiteUserProvidedFunctionAppArmResource("testFunctionApp") + .withExistingBuild("rg", "testStaticSite0", "default") + .withFunctionAppResourceId( + "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp") + .withFunctionAppRegion("West US 2") + .withIsForced(true) + .create(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteSamples.java new file mode 100644 index 0000000000000..dc3b49917eda5 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserProvidedFunctionAppArmResourceInner; + +/** Samples for StaticSites RegisterUserProvidedFunctionAppWithStaticSite. */ +public final class StaticSitesRegisterUserProvidedFunctionAppWithStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/RegisterUserProvidedFunctionAppWithStaticSite.json + */ + /** + * Sample code: Register a user provided function app with a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void registerAUserProvidedFunctionAppWithAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .registerUserProvidedFunctionAppWithStaticSite( + "rg", + "testStaticSite0", + "testFunctionApp", + new StaticSiteUserProvidedFunctionAppArmResourceInner() + .withFunctionAppResourceId( + "/subscription/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/functionRG/providers/Microsoft.Web/sites/testFunctionApp") + .withFunctionAppRegion("West US 2"), + true, + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesResetStaticSiteApiKeySamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesResetStaticSiteApiKeySamples.java new file mode 100644 index 0000000000000..355c856c41ff2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesResetStaticSiteApiKeySamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteResetPropertiesArmResource; + +/** Samples for StaticSites ResetStaticSiteApiKey. */ +public final class StaticSitesResetStaticSiteApiKeySamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ResetStaticSiteApiKey.json + */ + /** + * Sample code: Reset the api key for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void resetTheApiKeyForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .resetStaticSiteApiKeyWithResponse( + "rg", + "testStaticSite0", + new StaticSiteResetPropertiesArmResource() + .withRepositoryToken("repoToken123") + .withShouldUpdateRepository(true), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesUpdateStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesUpdateStaticSiteSamples.java new file mode 100644 index 0000000000000..121aff1752c8c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesUpdateStaticSiteSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteArmResource; + +/** Samples for StaticSites UpdateStaticSite. */ +public final class StaticSitesUpdateStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/PatchStaticSite.json + */ + /** + * Sample code: Patch a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void patchAStaticSite(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + StaticSiteArmResource resource = + manager.staticSites().getByResourceGroupWithResponse("rg", "testStaticSite0", Context.NONE).getValue(); + resource.update().apply(); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesUpdateStaticSiteUserSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesUpdateStaticSiteUserSamples.java new file mode 100644 index 0000000000000..854936db9a305 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesUpdateStaticSiteUserSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.StaticSiteUserArmResourceInner; + +/** Samples for StaticSites UpdateStaticSiteUser. */ +public final class StaticSitesUpdateStaticSiteUserSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdateStaticSiteUser.json + */ + /** + * Sample code: Create or update a user for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void createOrUpdateAUserForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .updateStaticSiteUserWithResponse( + "rg", + "testStaticSite0", + "aad", + "1234", + new StaticSiteUserArmResourceInner().withRoles("contributor"), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesValidateCustomDomainCanBeAddedToStaticSiteSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesValidateCustomDomainCanBeAddedToStaticSiteSamples.java new file mode 100644 index 0000000000000..7df779a646fa0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/StaticSitesValidateCustomDomainCanBeAddedToStaticSiteSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.StaticSiteCustomDomainRequestPropertiesArmResource; + +/** Samples for StaticSites ValidateCustomDomainCanBeAddedToStaticSite. */ +public final class StaticSitesValidateCustomDomainCanBeAddedToStaticSiteSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ValidateStaticSiteCustomDomain.json + */ + /** + * Sample code: Validate a custom domain for a static site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void validateACustomDomainForAStaticSite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .staticSites() + .validateCustomDomainCanBeAddedToStaticSite( + "rg", + "testStaticSite0", + "custom.domain.net", + new StaticSiteCustomDomainRequestPropertiesArmResource(), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsGetSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsGetSamples.java new file mode 100644 index 0000000000000..d5f70f53a328d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsGetSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for TopLevelDomains Get. */ +public final class TopLevelDomainsGetSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/GetTopLevelDomain.json + */ + /** + * Sample code: Get Top Level Domain. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTopLevelDomain(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.topLevelDomains().getWithResponse("com", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsListAgreementsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsListAgreementsSamples.java new file mode 100644 index 0000000000000..cdb47cca0b8d3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsListAgreementsSamples.java @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.TopLevelDomainAgreementOption; + +/** Samples for TopLevelDomains ListAgreements. */ +public final class TopLevelDomainsListAgreementsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/ListTopLevelDomainAgreements.json + */ + /** + * Sample code: List Top Level Domain Agreements. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listTopLevelDomainAgreements( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .topLevelDomains() + .listAgreements( + "in", + new TopLevelDomainAgreementOption().withIncludePrivacy(true).withForTransfer(false), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsListSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsListSamples.java new file mode 100644 index 0000000000000..5cd0459667537 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/TopLevelDomainsListSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for TopLevelDomains List. */ +public final class TopLevelDomainsListSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.DomainRegistration/stable/2021-03-01/examples/ListTopLevelDomains.json + */ + /** + * Sample code: List Top Level Domains. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listTopLevelDomains(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.topLevelDomains().list(Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsApproveOrRejectPrivateEndpointConnectionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsApproveOrRejectPrivateEndpointConnectionSamples.java new file mode 100644 index 0000000000000..47b9ce76a53ab --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsApproveOrRejectPrivateEndpointConnectionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; + +/** Samples for WebApps ApproveOrRejectPrivateEndpointConnection. */ +public final class WebAppsApproveOrRejectPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ApproveRejectSitePrivateEndpointConnection.json + */ + /** + * Sample code: Approves or rejects a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void approvesOrRejectsAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .approveOrRejectPrivateEndpointConnection( + "rg", + "testSite", + "connection", + new PrivateLinkConnectionApprovalRequestResource() + .withPrivateLinkServiceConnectionState( + new PrivateLinkConnectionState() + .withStatus("Approved") + .withDescription("Approved by admin.") + .withActionsRequired("")), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsApproveOrRejectPrivateEndpointConnectionSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsApproveOrRejectPrivateEndpointConnectionSlotSamples.java new file mode 100644 index 0000000000000..02c6f81e19fae --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsApproveOrRejectPrivateEndpointConnectionSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionApprovalRequestResource; +import com.azure.resourcemanager.appservice.generated.models.PrivateLinkConnectionState; + +/** Samples for WebApps ApproveOrRejectPrivateEndpointConnectionSlot. */ +public final class WebAppsApproveOrRejectPrivateEndpointConnectionSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ApproveRejectSitePrivateEndpointConnectionSlot.json + */ + /** + * Sample code: Approves or rejects a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void approvesOrRejectsAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .approveOrRejectPrivateEndpointConnectionSlot( + "rg", + "testSite", + "connection", + "stage", + new PrivateLinkConnectionApprovalRequestResource() + .withPrivateLinkServiceConnectionState( + new PrivateLinkConnectionState() + .withStatus("Approved") + .withDescription("Approved by admin.") + .withActionsRequired("")), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsDeletePrivateEndpointConnectionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsDeletePrivateEndpointConnectionSamples.java new file mode 100644 index 0000000000000..45f58dbadcca1 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsDeletePrivateEndpointConnectionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps DeletePrivateEndpointConnection. */ +public final class WebAppsDeletePrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteSitePrivateEndpointConnection.json + */ + /** + * Sample code: Delete a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().deletePrivateEndpointConnection("rg", "testSite", "connection", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsDeletePrivateEndpointConnectionSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsDeletePrivateEndpointConnectionSlotSamples.java new file mode 100644 index 0000000000000..1b9721ec2efbe --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsDeletePrivateEndpointConnectionSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps DeletePrivateEndpointConnectionSlot. */ +public final class WebAppsDeletePrivateEndpointConnectionSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/DeleteSitePrivateEndpointConnectionSlot.json + */ + /** + * Sample code: Delete a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void deleteAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().deletePrivateEndpointConnectionSlot("rg", "testSite", "connection", "stage", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingKeyVaultReferenceSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingKeyVaultReferenceSamples.java new file mode 100644 index 0000000000000..2f7200ef28a34 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingKeyVaultReferenceSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetAppSettingKeyVaultReference. */ +public final class WebAppsGetAppSettingKeyVaultReferenceSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetKeyVaultReferencesForAppSetting.json + */ + /** + * Sample code: Get Azure Key Vault app setting reference. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAzureKeyVaultAppSettingReference( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getAppSettingKeyVaultReferenceWithResponse("testrg123", "testc6282", "setting", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingKeyVaultReferenceSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingKeyVaultReferenceSlotSamples.java new file mode 100644 index 0000000000000..a45d4289656f9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingKeyVaultReferenceSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetAppSettingKeyVaultReferenceSlot. */ +public final class WebAppsGetAppSettingKeyVaultReferenceSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetKeyVaultReferencesForAppSettingSlot.json + */ + /** + * Sample code: Get Azure Key Vault slot app setting reference. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAzureKeyVaultSlotAppSettingReference( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getAppSettingKeyVaultReferenceSlotWithResponse("testrg123", "testc6282", "setting", "stage", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingsKeyVaultReferencesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingsKeyVaultReferencesSamples.java new file mode 100644 index 0000000000000..3003a990e95b9 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingsKeyVaultReferencesSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetAppSettingsKeyVaultReferences. */ +public final class WebAppsGetAppSettingsKeyVaultReferencesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetKeyVaultReferencesForAppSettings.json + */ + /** + * Sample code: Get Azure Key Vault references for app settings. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAzureKeyVaultReferencesForAppSettings( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getAppSettingsKeyVaultReferences("testrg123", "testc6282", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingsKeyVaultReferencesSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingsKeyVaultReferencesSlotSamples.java new file mode 100644 index 0000000000000..cb5260a91ff53 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetAppSettingsKeyVaultReferencesSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetAppSettingsKeyVaultReferencesSlot. */ +public final class WebAppsGetAppSettingsKeyVaultReferencesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetKeyVaultReferencesForAppSettingsSlot.json + */ + /** + * Sample code: Get Azure Key Vault references for app settings for slot. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAzureKeyVaultReferencesForAppSettingsForSlot( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getAppSettingsKeyVaultReferencesSlot("testrg123", "testc6282", "stage", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetFtpAllowedSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetFtpAllowedSamples.java new file mode 100644 index 0000000000000..5e40f3de3e9aa --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetFtpAllowedSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetFtpAllowed. */ +public final class WebAppsGetFtpAllowedSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicy.json + */ + /** + * Sample code: Get FTP Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFTPAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getFtpAllowedWithResponse("rg", "testSite", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetFtpAllowedSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetFtpAllowedSlotSamples.java new file mode 100644 index 0000000000000..ed0ff97e53c9c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetFtpAllowedSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetFtpAllowedSlot. */ +public final class WebAppsGetFtpAllowedSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicySlot.json + */ + /** + * Sample code: Get FTP Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getFTPAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getFtpAllowedSlotWithResponse("rg", "testSite", "stage", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetInstanceInfoSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetInstanceInfoSamples.java new file mode 100644 index 0000000000000..2860f1fcc10ce --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetInstanceInfoSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetInstanceInfo. */ +public final class WebAppsGetInstanceInfoSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSiteInstanceInfo.json + */ + /** + * Sample code: Get site instance info. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getSiteInstanceInfo(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getInstanceInfoWithResponse("testrg123", "tests346", "134987120", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetInstanceInfoSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetInstanceInfoSlotSamples.java new file mode 100644 index 0000000000000..423eedbef0083 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetInstanceInfoSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetInstanceInfoSlot. */ +public final class WebAppsGetInstanceInfoSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSiteInstanceInfo.json + */ + /** + * Sample code: Get site instance info. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getSiteInstanceInfo(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getInstanceInfoSlotWithResponse("testrg123", "tests346", "134987120", "staging", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSamples.java new file mode 100644 index 0000000000000..b6311cf810af6 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraceOperation. */ +public final class WebAppsGetNetworkTraceOperationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Get the current status of a network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTheCurrentStatusOfANetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTraceOperationWithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSlotSamples.java new file mode 100644 index 0000000000000..748d067e3b8d3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraceOperationSlot. */ +public final class WebAppsGetNetworkTraceOperationSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Get the current status of a network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTheCurrentStatusOfANetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTraceOperationSlotWithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSlotV2Samples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSlotV2Samples.java new file mode 100644 index 0000000000000..c3c40e6795fab --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationSlotV2Samples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraceOperationSlotV2. */ +public final class WebAppsGetNetworkTraceOperationSlotV2Samples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Get the current status of a network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTheCurrentStatusOfANetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTraceOperationSlotV2WithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationV2Samples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationV2Samples.java new file mode 100644 index 0000000000000..3ba87a8e4003e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTraceOperationV2Samples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraceOperationV2. */ +public final class WebAppsGetNetworkTraceOperationV2Samples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Get the current status of a network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getTheCurrentStatusOfANetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTraceOperationV2WithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSamples.java new file mode 100644 index 0000000000000..4946ee50131b2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTraces. */ +public final class WebAppsGetNetworkTracesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json + */ + /** + * Sample code: Get NetworkTraces for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getNetworkTracesForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTracesWithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSlotSamples.java new file mode 100644 index 0000000000000..e5f09f4ec9598 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTracesSlot. */ +public final class WebAppsGetNetworkTracesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json + */ + /** + * Sample code: Get NetworkTraces for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getNetworkTracesForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTracesSlotWithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSlotV2Samples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSlotV2Samples.java new file mode 100644 index 0000000000000..1995066154561 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesSlotV2Samples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTracesSlotV2. */ +public final class WebAppsGetNetworkTracesSlotV2Samples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json + */ + /** + * Sample code: Get NetworkTraces for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getNetworkTracesForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTracesSlotV2WithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesV2Samples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesV2Samples.java new file mode 100644 index 0000000000000..4a3395c6ce3e3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetNetworkTracesV2Samples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetNetworkTracesV2. */ +public final class WebAppsGetNetworkTracesV2Samples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetWebSiteNetworkTraces.json + */ + /** + * Sample code: Get NetworkTraces for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getNetworkTracesForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getNetworkTracesV2WithResponse( + "testrg123", "SampleApp", "c291433b-53ad-4c49-8cae-0a293eae1c6d", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateEndpointConnectionSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateEndpointConnectionSamples.java new file mode 100644 index 0000000000000..374b2259ef670 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateEndpointConnectionSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetPrivateEndpointConnection. */ +public final class WebAppsGetPrivateEndpointConnectionSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateEndpointConnection.json + */ + /** + * Sample code: Get a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getPrivateEndpointConnectionWithResponse("rg", "testSite", "connection", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateEndpointConnectionSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateEndpointConnectionSlotSamples.java new file mode 100644 index 0000000000000..5fe2b1cdda0e3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateEndpointConnectionSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetPrivateEndpointConnectionSlot. */ +public final class WebAppsGetPrivateEndpointConnectionSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateEndpointConnectionSlot.json + */ + /** + * Sample code: Get a private endpoint connection for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getAPrivateEndpointConnectionForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .getPrivateEndpointConnectionSlotWithResponse("rg", "testSite", "connection", "stage", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateLinkResourcesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateLinkResourcesSamples.java new file mode 100644 index 0000000000000..3452882fcaed0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateLinkResourcesSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetPrivateLinkResources. */ +public final class WebAppsGetPrivateLinkResourcesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateLinkResources.json + */ + /** + * Sample code: Get private link resources of a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getPrivateLinkResourcesOfASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getPrivateLinkResourcesWithResponse("rg", "testSite", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateLinkResourcesSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateLinkResourcesSlotSamples.java new file mode 100644 index 0000000000000..c148193ec7b51 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetPrivateLinkResourcesSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetPrivateLinkResourcesSlot. */ +public final class WebAppsGetPrivateLinkResourcesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetSitePrivateLinkResourcesSlot.json + */ + /** + * Sample code: Get private link resources of a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getPrivateLinkResourcesOfASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getPrivateLinkResourcesSlotWithResponse("rg", "testSite", "stage", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetScmAllowedSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetScmAllowedSamples.java new file mode 100644 index 0000000000000..0443f609f293d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetScmAllowedSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetScmAllowed. */ +public final class WebAppsGetScmAllowedSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicy.json + */ + /** + * Sample code: Get SCM Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getSCMAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getScmAllowedWithResponse("rg", "testSite", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetScmAllowedSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetScmAllowedSlotSamples.java new file mode 100644 index 0000000000000..2c5cca06d19d3 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsGetScmAllowedSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps GetScmAllowedSlot. */ +public final class WebAppsGetScmAllowedSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/GetPublishingCredentialsPolicySlot.json + */ + /** + * Sample code: Get SCM Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void getSCMAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().getScmAllowedSlotWithResponse("rg", "testSite", "stage", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListBasicPublishingCredentialsPoliciesSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListBasicPublishingCredentialsPoliciesSamples.java new file mode 100644 index 0000000000000..7953da8343a44 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListBasicPublishingCredentialsPoliciesSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps ListBasicPublishingCredentialsPolicies. */ +public final class WebAppsListBasicPublishingCredentialsPoliciesSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListPublishingCredentialsPolicies.json + */ + /** + * Sample code: List Publishing Credentials Policies. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listPublishingCredentialsPolicies( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().listBasicPublishingCredentialsPolicies("testrg123", "testsite", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListBasicPublishingCredentialsPoliciesSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListBasicPublishingCredentialsPoliciesSlotSamples.java new file mode 100644 index 0000000000000..5687613a58215 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListBasicPublishingCredentialsPoliciesSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps ListBasicPublishingCredentialsPoliciesSlot. */ +public final class WebAppsListBasicPublishingCredentialsPoliciesSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListPublishingCredentialsPoliciesSlot.json + */ + /** + * Sample code: List Publishing Credentials Policies. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listPublishingCredentialsPolicies( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().listBasicPublishingCredentialsPoliciesSlot("testrg123", "testsite", "staging", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListSiteBackupsSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListSiteBackupsSamples.java new file mode 100644 index 0000000000000..a0f1757b62e1b --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListSiteBackupsSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps ListSiteBackups. */ +public final class WebAppsListSiteBackupsSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListSlotBackups.json + */ + /** + * Sample code: List backups. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listBackups(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().listSiteBackups("testrg123", "tests346", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListSiteBackupsSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListSiteBackupsSlotSamples.java new file mode 100644 index 0000000000000..a2fbec3a86560 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsListSiteBackupsSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps ListSiteBackupsSlot. */ +public final class WebAppsListSiteBackupsSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/ListSlotBackups.json + */ + /** + * Sample code: List backups. + * + * @param manager Entry point to AppServiceManager. + */ + public static void listBackups(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().listSiteBackupsSlot("testrg123", "tests346", "staging", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartNetworkTraceSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartNetworkTraceSamples.java new file mode 100644 index 0000000000000..dbc71f3b9035e --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartNetworkTraceSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps StartNetworkTrace. */ +public final class WebAppsStartNetworkTraceSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Start a new network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void startANewNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().startNetworkTrace("testrg123", "SampleApp", 60, null, null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartNetworkTraceSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartNetworkTraceSlotSamples.java new file mode 100644 index 0000000000000..b0595df7f717d --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartNetworkTraceSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps StartNetworkTraceSlot. */ +public final class WebAppsStartNetworkTraceSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Start a new network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void startANewNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().startNetworkTraceSlot("testrg123", "SampleApp", "Production", 60, null, null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartWebSiteNetworkTraceOperationSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartWebSiteNetworkTraceOperationSamples.java new file mode 100644 index 0000000000000..48ffdd42d2669 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartWebSiteNetworkTraceOperationSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps StartWebSiteNetworkTraceOperation. */ +public final class WebAppsStartWebSiteNetworkTraceOperationSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Start a new network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void startANewNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().startWebSiteNetworkTraceOperation("testrg123", "SampleApp", 60, null, null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartWebSiteNetworkTraceOperationSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartWebSiteNetworkTraceOperationSlotSamples.java new file mode 100644 index 0000000000000..4896f590c4a1f --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStartWebSiteNetworkTraceOperationSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps StartWebSiteNetworkTraceOperationSlot. */ +public final class WebAppsStartWebSiteNetworkTraceOperationSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StartWebSiteNetworkTraceOperation.json + */ + /** + * Sample code: Start a new network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void startANewNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .startWebSiteNetworkTraceOperationSlot( + "testrg123", "SampleApp", "Production", 60, null, null, Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopNetworkTraceSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopNetworkTraceSamples.java new file mode 100644 index 0000000000000..3f5a5f41c0a9c --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopNetworkTraceSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps StopNetworkTrace. */ +public final class WebAppsStopNetworkTraceSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json + */ + /** + * Sample code: Stop a currently running network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void stopACurrentlyRunningNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().stopNetworkTraceWithResponse("testrg123", "SampleApp", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopNetworkTraceSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopNetworkTraceSlotSamples.java new file mode 100644 index 0000000000000..66d4524d12803 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopNetworkTraceSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps StopNetworkTraceSlot. */ +public final class WebAppsStopNetworkTraceSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json + */ + /** + * Sample code: Stop a currently running network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void stopACurrentlyRunningNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().stopNetworkTraceSlotWithResponse("testrg123", "SampleApp", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopWebSiteNetworkTraceSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopWebSiteNetworkTraceSamples.java new file mode 100644 index 0000000000000..c728db27f1432 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopWebSiteNetworkTraceSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps StopWebSiteNetworkTrace. */ +public final class WebAppsStopWebSiteNetworkTraceSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json + */ + /** + * Sample code: Stop a currently running network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void stopACurrentlyRunningNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().stopWebSiteNetworkTraceWithResponse("testrg123", "SampleApp", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopWebSiteNetworkTraceSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopWebSiteNetworkTraceSlotSamples.java new file mode 100644 index 0000000000000..cb3c06bdc04f2 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsStopWebSiteNetworkTraceSlotSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; + +/** Samples for WebApps StopWebSiteNetworkTraceSlot. */ +public final class WebAppsStopWebSiteNetworkTraceSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/StopWebSiteNetworkTrace.json + */ + /** + * Sample code: Stop a currently running network trace operation for a site. + * + * @param manager Entry point to AppServiceManager. + */ + public static void stopACurrentlyRunningNetworkTraceOperationForASite( + com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager.webApps().stopWebSiteNetworkTraceSlotWithResponse("testrg123", "SampleApp", "Production", Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateFtpAllowedSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateFtpAllowedSamples.java new file mode 100644 index 0000000000000..629324d1a06d0 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateFtpAllowedSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** Samples for WebApps UpdateFtpAllowed. */ +public final class WebAppsUpdateFtpAllowedSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicy.json + */ + /** + * Sample code: Update FTP Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateFTPAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .updateFtpAllowedWithResponse( + "rg", "testSite", new CsmPublishingCredentialsPoliciesEntityInner().withAllow(true), Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateFtpAllowedSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateFtpAllowedSlotSamples.java new file mode 100644 index 0000000000000..53b6f1dccf038 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateFtpAllowedSlotSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** Samples for WebApps UpdateFtpAllowedSlot. */ +public final class WebAppsUpdateFtpAllowedSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicySlot.json + */ + /** + * Sample code: Update FTP Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateFTPAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .updateFtpAllowedSlotWithResponse( + "rg", + "testSite", + "stage", + new CsmPublishingCredentialsPoliciesEntityInner().withAllow(true), + Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateScmAllowedSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateScmAllowedSamples.java new file mode 100644 index 0000000000000..e858d9cc18244 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateScmAllowedSamples.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.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** Samples for WebApps UpdateScmAllowed. */ +public final class WebAppsUpdateScmAllowedSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicy.json + */ + /** + * Sample code: Update SCM Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateSCMAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .updateScmAllowedWithResponse( + "rg", "testSite", new CsmPublishingCredentialsPoliciesEntityInner().withAllow(true), Context.NONE); + } +} diff --git a/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateScmAllowedSlotSamples.java b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateScmAllowedSlotSamples.java new file mode 100644 index 0000000000000..5d36bf0318592 --- /dev/null +++ b/sdk/appservice/azure-resourcemanager-appservice-generated/src/samples/java/com/azure/resourcemanager/appservice/generated/generated/WebAppsUpdateScmAllowedSlotSamples.java @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appservice.generated.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appservice.generated.fluent.models.CsmPublishingCredentialsPoliciesEntityInner; + +/** Samples for WebApps UpdateScmAllowedSlot. */ +public final class WebAppsUpdateScmAllowedSlotSamples { + /* + * x-ms-original-file: specification/web/resource-manager/Microsoft.Web/stable/2021-03-01/examples/UpdatePublishingCredentialsPolicySlot.json + */ + /** + * Sample code: Update SCM Allowed. + * + * @param manager Entry point to AppServiceManager. + */ + public static void updateSCMAllowed(com.azure.resourcemanager.appservice.generated.AppServiceManager manager) { + manager + .webApps() + .updateScmAllowedSlotWithResponse( + "rg", + "testSite", + "stage", + new CsmPublishingCredentialsPoliciesEntityInner().withAllow(true), + Context.NONE); + } +} diff --git a/sdk/appservice/ci.yml b/sdk/appservice/ci.yml new file mode 100644 index 0000000000000..85c661240fdb0 --- /dev/null +++ b/sdk/appservice/ci.yml @@ -0,0 +1,39 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + paths: + include: + - sdk/appservice/ci.yml + - sdk/appservice/azure-resourcemanager-appservice-generated/ + exclude: + - sdk/appservice/pom.xml + - sdk/appservice/azure-resourcemanager-appservice-generated/pom.xml + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/appservice/ci.yml + - sdk/appservice/azure-resourcemanager-appservice-generated/ + exclude: + - sdk/appservice/pom.xml + - sdk/appservice/azure-resourcemanager-appservice-generated/pom.xml + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: appservice + Artifacts: + - name: azure-resourcemanager-appservice-generated + groupId: com.azure.resourcemanager + safeName: azureresourcemanagerappservicegenerated diff --git a/sdk/appservice/pom.xml b/sdk/appservice/pom.xml new file mode 100644 index 0000000000000..71f616dda3517 --- /dev/null +++ b/sdk/appservice/pom.xml @@ -0,0 +1,53 @@ + + + 4.0.0 + com.azure + azure-appservice-service + pom + 1.0.0 + + + + coverage + + + + + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.5 + + + report-aggregate + verify + + report-aggregate + + + ${project.reporting.outputDirectory}/test-coverage + + + + + + + + + default + + true + + + azure-resourcemanager-appservice-generated + + + +